Docs menu
Get started
API reference
Classification
Landed cost
Products
Compliance
Reference
Origin
API reference
Infer or check the origin of up to 50 products
POST https://api.border.bot/v1/origin/batch
Requires an API key (Authorization: Bearer bb_live_…).
Each item is inferred, or validated when it has declaredOrigin. Items run four at a time, each charged as one origin call; one failing (bad photo, insufficient credits) never stops the others. With an Idempotency-Key, each item replays on its own.
API key scope: origin.
Headers#
| Name | Type | Required | Description |
|---|---|---|---|
idempotency-key |
string | no | Make retries safe: a repeat with the same key returns the original result without charging again (keys are scoped to your workspace). |
Request body (JSON)#
| Name | Type | Required | Description |
|---|---|---|---|
items |
object[] | yes | |
reviewThreshold |
number | no | The review threshold for every item that doesn’t set its own reviewThreshold (see POST /v1/origin). |
Responses#
200: One result per item, in order. (OriginBatchResponse)400: Invalid input (invalid_input). (Error)401: Missing, invalid, revoked or expired API key (unauthorized). (Error)402: Not enough credits (insufficient_credits). Nothing was charged. (Error)403: Workspace suspended, action disabled, or the key lacks the scope (org_suspended,action_disabled,forbidden). (Error)409: A request with this Idempotency-Key is still in progress (conflict). (Error)429: Rate limited (rate_limited). Retry afterRetry-Afterseconds;RateLimitsays which limit was hit (r=0,tseconds until its window ends) andRateLimit-Policyits quota. (Error)500: Unexpected error (internal). (Error)502: The engine failed (upstream_error). The credits are refunded automatically. (Error)504: The engine timed out (upstream_timeout). The credits are refunded automatically. (Error)
Example#
curl -X POST 'https://api.border.bot/v1/origin/batch' \
-H 'Authorization: Bearer bb_live_...' \
-H 'Content-Type: application/json' \
-d '{"items":[{"title":"Organic cotton tee","brand":"Example"},{"title":"Wireless earbuds","declaredOrigin":"US","gtin":"6901234567892"}]}'