Docs menu
Get started
API reference
Classification
Landed cost
Products
Compliance
Reference
Origin
Bulk
Catalogue
- GETList products
- POSTCreate a product
- GETGet a product
- PATCHUpdate a product
- POSTArchive a product
- GETA product’s history
- GETA product’s codes
- POSTAdd a code
- POSTSuggest codes
- POSTApprove a code
- POSTReject a code
- POSTClassify many products
- GETYour imports
- POSTImport a CSV file
- GETAn import
- GETExport as CSV
- POSTSync records from a source
- GETApproved codes to write back
- GETCatalogue vocabularies
- GETSource kinds
- GETDefault target markets
- POSTSet default target markets
API reference
Suggest codes
POST https://api.border.bot/v1/catalog/products/{id}/classifications/suggest
Requires an API key (Authorization: Bearer bb_live_…).
Classifies the product for each market from its title, description, materials, page and photo, and keeps each answer as a suggestion to review (approve it to quote with it). Each market is charged like POST /classify and refunded if it fails.
API key scope: classify.
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | The product’s id. |
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 |
|---|---|---|---|
markets |
string[] | yes | |
mode |
string | no |
Responses#
200: A suggestion (or the error) per market, and the credits charged. (CatalogSuggestResponse)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/catalog/products/{id}/classifications/suggest' \
-H 'Authorization: Bearer bb_live_...' \
-H 'Content-Type: application/json' \
-d '{"markets":["US","GB","DE"]}'