APIAPI referenceCatalog Push API
Push Categories
Upsert categories (parents by parent_external_id).
POST/v1/stores/{store_id}/catalog/categories:batchScope catalog:write
- Scope:
catalog:write(scopes and plan access) - Rate limit: 600 requests/min per API key (test keys: 60/min); catalog batches 120/min per store (rate limits)
Upsert categories (parents by `parent_external_id`).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| store_idrequired | path | string | |
| Idempotency-Keyrequired | header | string | Replays return the original |
Request body (CategoriesBatch)
| Field | Type | Description |
|---|---|---|
| categoriesrequired | CatalogCategoryInput[] | CatalogCategoryInput items (validated individually; invalid items are reported in rejected[])≥ 1 items · ≤ 500 items |
| categories[].external_idrequired | string | 1–128 characters |
| categories[].namerequired | string | 1–255 characters |
| categories[].parent_external_id | string | 1–128 characters |
| categories[].position | integer | |
| categories[].url | string | format uri · ≤ 2048 characters |
Example request
curl -X POST "https://api.shopassist.coec.dk/v1/stores/sto_01j8000000e008000000000000/catalog/categories:batch" \
-H "Authorization: Bearer $SHOPASSIST_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"categories":[{"external_id":"string","name":"string","parent_external_id":"string","position":1,"url":"https://shop.example/products/linen-shirt"}]}'Response 202 (BatchAccepted)
| Field | Type | Description |
|---|---|---|
| acceptedrequired | integer | ≥ 0 |
| rejectedrequired | ItemRejection[] | |
| rejected[].errorrequired | ItemError | `{ code; message }` of a rejected item. |
| rejected[].error.coderequired | "validation_error" | "currency_mismatch" | "duplicate_external_id" | "too_many_variants" | "url_not_allowed" | |
| rejected[].error.messagerequired | string | |
| rejected[].indexrequired | integer | ≥ 0 |
| sync_run_idrequired | string | pattern `^sync_[0-9a-hjkmnp-tv-z]{26}$` |
{
"accepted": 0,
"rejected": [
{
"error": {
"code": "validation_error",
"message": "string"
},
"index": 0
}
],
"sync_run_id": "sync_01j8000000e008000000000000"
}Errors
Every error uses the error envelope; the code field is stable.
400Bad Request401Unauthorized403Forbidden404Not Found409Conflict413Content Too Large422Unprocessable Content429Too Many Requests
Last updated on