Skip to main content

List Cost Entry Allocations (Paginated)

GET 

/api/cost-entries/:costEntry/allocations/list

Paginated, filterable and sortable allocations of one cost entry — the same rows the cost entry's Allocations table shows. Each row carries the target's natural identifier (target_reference: SKU for products, sales order number for order lines, otherwise the name) and display name.

Required scope: purchase-orders:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Filters (all optional):

  • filter[search] — searches the target SKU / name, the target display name and (exact, numeric) the allocation ID. Narrow with search_columns=target,target_name,id.
  • filter_groups — base64-encoded JSON condition tree {"conjunction":"and","children":[{"type":"condition","condition":{"column":"target_type","operator":"is","value":"product"}}]}. Columns: id, amount, amount_in_tenant_currency (numeric: is, is_not, is_one_of, greater_than, less_than, between, is_empty…); target_type (product, brand, supplier, channel, sales_order_line), target (SKU / name), target_name, proration_strategy (text: is, contains, starts_with, is_one_of…); allocation_date, period_start, period_end (date, Y-m-d: is, before, after, between…); created_at (datetime); is_amortized (checkbox, operator is, true/false); reach_state (text: reached or no_sales, see below).
  • Flat form also works: filter[target_type.is]=brand, filter[amount.greater_than]=10.

Allowed sorts (prefix - for descending): id, reach_state, target, target_name, target_type, allocation_date, period_start, period_end, proration_strategy, amount, amount_in_tenant_currency, created_at. Default: -id.

Order reach. Each row carries order_reach: state is reached when the target had at least one non-draft order line in the allocation's period (the whole amount is then spread over those order_line_count lines and shows in their orders' indirect cost) or no_sales when it had none (the amount is allocated but sits on no order; it is still a cost of the period). The period is period_start–period_end, or the allocation date's month when the allocation has no period. Filter with filter[reach_state.is]=no_sales.

unfiltered_total is the entry's allocation count before filters.

Authentication: Requires Bearer token (scope purchase-orders:read).

Request​

Responses​

OK

Response Headers
    Content-Type