List Affected Sales Orders
GET/api/manufacturing/lot-genealogy/affected-sales-orders
Recall workflow — the sales orders / customers that consumed the traced batch (or a finished good produced from it). Forward trace only; backward traces (sources) have no customers. Authentication: requires a Bearer token (PAT).
manufacturing:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Resolves the batch the same way as GET /api/manufacturing/lot-genealogy (404 when nothing matches; 409 with a candidates array when the batch number is shared across multiple products).
Returns:
data— one row per (sales order, shipped product, shipped batch), with customer name/email/company, order date, shipped-at date, the shipped product, and the aggregated quantity of the traced batch that reached that order.order_ids— the distinct sales-order id list (use this directly as the{ids: [...]}selection payload forPOST /api/sales-orders/bulk-email).summary—customer_count,order_count,total_quantity.
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.