List Affected Lots and Suppliers
GET/api/manufacturing/lot-genealogy/affected-lots-by-sales-orders
Recall (reverse) — the implicated lots + suppliers behind a set of sales orders: every raw-ingredient / finished-good lot that fed the orders' shipped goods, deduplicated, with supplier and a count of how many of the orders each lot touches. Authentication: requires a Bearer token (PAT).
manufacturing:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Quantities are summed across DISTINCT consumption edges, so a shared upstream ingredient consumed once by a finished good isn't double-counted across the multiple orders that finished good shipped to (finished-good shipment quantities to different orders ARE summed). Supplier-backed lots (the recall-actionable raw materials) sort first.
Returns data (one row per implicated lot — batch, product, lot_type, supplier, source_reference, quantity, order_count) and summary (lot_count, supplier_count, order_count, total_quantity). 422 when no ids / over 500.
Request
Responses
- 200
- 401
- 403
- 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.
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.