Get Product Lot Genealogy
GET/api/v2/products/:product/lots/:fifoLayer/genealogy
Read-only lot genealogy / traceability tree for a single FIFO layer (lot) of this product.
products:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Returns two trees:
- forward: downstream consumers (where the lot went — sales orders, manufacturing orders, transfers that consumed it).
- backward: upstream ingredients (what was consumed to produce this lot, for manufactured lots). Purchased lots have an empty backward tree.
Each node carries entity_type ('manufacturing_order' | 'purchase_order' | 'sales_order' | 'warehouse_transfer' | 'fifo_layer'), reference, product info, batch_number, quantity, consumed_quantity (qty travelling along the parent->node edge), date, fifo_layer_id, and recursive children.
Returns 404 if the FIFO layer does not belong to the product.
Authentication: Requires Bearer token.
Request
Responses
- 200
- 401
- 403
- 404
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.