Margin-by-SKU report (landed cost + sales velocity)

GET/api/v1/inventory/reports/margin-by-sku

Returns per-variant landed cost (latest cost snapshot), current sell price, gross margin, and trailing Shopify sales over the configured lookback window. Powers the Landed COGS 'Truth' tab.

Operation ID: get_margin_by_sku_api_v1_inventory_reports_margin_by_sku_get·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Parameters

Query

lookback_daysintegerdefault: 30

Trailing window (days) used to compute revenue + units sold.

limitintegerdefault: 100

Max variants returned (sorted by trailing revenue desc).

Responses

200Successful Response

successboolean
messagestring
codestring
dataMarginByVariantResponse

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject