Skip to main content

List FBA Reimbursement COGS Postings

GET 

/api/amazon/unified/fba-reimbursement-cogs

Lists the reimbursed-unit COGS journals, one per Amazon settlement period and kind. When Amazon pays for lost units, the FIFO cost those units consumed moves from the FBA loss account into cost of goods sold in the settlement period that carried the cash; a clawback moves it back. Returns the standard Laravel paginator.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Filters:

  • filter[integration_instance_ids] — comma-separated Amazon integration IDs.
  • filter[kind] — reimbursed or reversed.
  • filter[posted] — true: postings with a live journal in the ledger; false: postings not posted yet (postings with zero cost are left out). Discarded or reversed journals do not count as posted.
  • filter[date_from], filter[date_to] — period end on or after / on or before (m/d/Y).
  • filter[search] — searches id (exact match), currency and the Amazon account name (integrationInstance.name), partial match. Restrict it with search_columns (comma-separated: id, currency, integrationInstance.name) and force exact matching per column with search_strict_columns.

Sorting: sort=<field> ascending or sort=-<field> descending. Allowed: id, effective_at (the period end), units, cost_total, reimbursed_total. Default: -effective_at.

Advanced operator filters use the syntax filter[column.operator]=value; a bare filter[column]=value is treated as the is operator (except kind, whose bare key is the exact filter above).

  • Text columns (kind, currency) support: contains, does_not_contain, is, is_not, is_one_of, is_not_one_of, starts_with, does_not_start_with, ends_with, does_not_end_with, is_empty, is_not_empty.
  • Numeric columns (id, units, cost_total, reimbursed_total) support: is, is_not, is_one_of, is_not_one_of, greater_than, less_than, greater_than_or_equal, less_than_or_equal, between, is_empty, is_not_empty.
  • Date columns (effective_at (the period end)) support: is, is_not, before, after, on_or_before, on_or_after, between, is_empty, is_not_empty, today, yesterday, tomorrow, past_week, past_month, past_year, next_week, next_month, next_year, days_ago, days_from_now, past_days, next_days. Date values use Y-m-d; between takes two comma-separated values.

Complex AND/OR filter trees can be sent as filter_groups: a base64-encoded JSON tree of the form {"conjunction": "and", "children": [{"type": "condition", "condition": {"column": "cost_total.greater_than", "operator": "greater_than", "value": "100"}}, {"type": "group", "group": {"conjunction": "or", "children": [...]}}]}. Each condition's column is the column.operator key and operator the operator, from the columns and operators above. Other flat filters still apply alongside the tree (AND). An unknown column/operator pair returns 400. Numeric filters on cost_total compare the stored amount, which is always positive; the response signs it negative on reversed postings.

Posting fields:

  • kind — reimbursed (payments: the consumed FIFO cost moves out of FBA loss into cost of goods sold) or reversed (clawbacks: the move is undone for exactly the loss units each clawback reverses — the quantity and cost of the loss events its reversal links land on).
  • amazon_financial_event_group_id and settled — the settlement that carried the cash; a payment no settlement carries within 60 days posts in its approval month instead (settled is false), with one posting per approval month and currency so payouts in different currencies never mix.
  • period_start — the settlement period start (null when no settlement carried the cash); period_end — the settlement period end (or approval month end) the journal belongs to; posts_on — the date the journal is dated at; post_on_override — set when a held posting was moved into the first open period.
  • units, cost_total, reimbursed_total and variance (reimbursed_total minus cost_total) in currency. cost_total and reimbursed_total are signed: negative on a reversed posting (a clawback).
  • status — posted (a journal is in the ledger), held (its date falls in a locked accounting period; use Post to Open Period), disabled (reimbursed-unit COGS is switched off for the Amazon account), pending (waiting for the ledger to post it).
  • journal — the current ledger journal (id, reference, effective_at, total, status), or null when nothing is posted.

Request​

Responses​

OK

Response Headers
    Content-Type