Product costs
Time-versioned product cost catalog. Historical profit does not rewrite when costs change.
PUT /v1/products/costs
Scope: products:write. Auth: Authorization: Bearer sk_plp_...
Body: batch of catalog rows upserted by natural key (sku, effective_from).
{
"costs": [
{
"sku": "MUG-BLUE",
"effective_from": "2026-01-01",
"unit_cost": "41.20",
"currency": "DKK"
}
]
}
| Field | Required | Notes |
|---|---|---|
sku | yes | Catalog join key on order lines |
effective_from | yes | YYYY-MM-DD; most recent version on or before the order date wins |
unit_cost | yes | Non-negative decimal string |
currency | yes | ISO-4217; a mismatch with the order currency leaves the line cost unresolved |
How a line cost resolves
- Inline
line_items[].unit_costsetscost_source=inline(never overwritten by catalog) - Else the catalog version with
effective_fromon or before the orderevent_datesetscost_source=catalog - Else
0andcost_source=none(cogs_complete=0on the order)
Late catalog pushes
Pushing a cost triggers a re-price sweep: open orders with cost_source of catalog or none for the affected SKUs are re-resolved from stored lines and re-upserted. Inline costs are left alone. No merchant re-send required.