Skip to main content

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).

Required scope: manufacturing:read

Grant 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 for POST /api/sales-orders/bulk-email).
  • summarycustomer_count, order_count, total_quantity.

Request

Responses

OK

Response Headers
    Content-Type