Search Batch Numbers (Typeahead)
GET/api/manufacturing/lot-genealogy/batches
Typeahead for the "Trace a Lot" batch-number field. Returns up to 25 distinct FIFO-layer batch numbers matching the search term, each with single-product context. Authentication: requires a Bearer token (PAT).
manufacturing:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Returns an empty array ({"data": []}) for searches under 2 characters.
When a batch number maps to exactly one product, product_count is 1 and product_id/product_sku/product_name are populated. When product_count is greater than 1 the batch spans multiple products, so those context fields are null and the caller should also supply a product_id on the genealogy trace request (or follow the 409 candidates disambiguation flow from GET /api/manufacturing/lot-genealogy).
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.