Skip to main content

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.

Required scope: products:read

Grant 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

OK

Response Headers
    Content-Type