SHOP DESKDevelopers
shopdeskbd.com

Categories

The category tree used to organise a store’s catalogue.

Paste a key and every snippet on this page switches from the placeholder to your key — and the Try it panel under each endpoint is ready to send. It is stored in this browser only and goes nowhere except, if you press Send, straight to the API host you pick there.

List categories

GET/ext/v1/categoriesproducts:read

Catalog structure; parent_id builds the tree client-side.

Query parameters

NameTypeDescription
limitnumberdefault 25max 100Page size.
starting_afterstringReturn the page AFTER this object id (the previous page's next_cursor).
ending_beforestringReturn the page BEFORE this object id.
sortstringdefault -created_atNewest first by default. Only created_at is sortable — a cursor over a mutable key (like updated_at) cannot page reliably. Use updated_after to sync changes.created_at-created_at
store_idstringRestrict to one store. Required breadth control for company-scoped keys; on a store-scoped key it must match the key's own store.
statusstringFilter to one of the values below.activeinactive
searchstringMatch on name or slug (case-insensitive, partial) — how a name resolves to an id.

Request

export SHOPDESK_API_KEY="shopdesk_sk_YOUR_API_KEY"

curl -sS "https://api.shopdeskbd.com/ext/v1/categories?limit=25" \
  -H "Authorization: Bearer $SHOPDESK_API_KEY"
Try itruns from your browser
GEThttps://api.shopdeskbd.com/ext/v1/categories?search=shirts

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Query parameters

Blank fields are left out of the request.

Paste a key above to enable Send.

Responses

  • 200A cursor page of categories.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "data": [
    {
      "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
      "parent_id": null,
      "name": "T-Shirts",
      "slug": "t-shirts",
      "image": "https://cdn.example.com/companies/c1/categories/k1/image.webp",
      "banner_image": "https://cdn.example.com/companies/c1/categories/k1/banner.webp",
      "description": null,
      "seo": {
        "title": "Cotton T-Shirts",
        "description": "Breathable cotton tees in every size."
      },
      "status": "active",
      "position": 0,
      "created_at": "2026-08-11T10:00:00.000Z",
      "updated_at": "2026-08-11T10:00:00.000Z"
    }
  ],
  "meta": {
    "has_more": true,
    "next_cursor": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001"
  }
}

Create a category

POST/ext/v1/categoriescatalog:write

Creates a category, top-level or under parent_id, with an optional listing image (image_url or an image part) and banner (banner_url or a banner part). Send JSON, with images by link, or multipart/form-data with the files as parts (at most 10 MB each, 50 MB in all) and the other fields as text (seo as a JSON string). An image comes by link or as a part, not both. Images are stored re-encoded as WebP. On a multipart request the Idempotency-Key covers the route only — a retry under the same key replays the first answer whatever the form holds — so send a new key for a different request. Image links: https only, PNG/JPEG/WebP/GIF read from the bytes (never SVG), at most 10 MB and 8000 px on the longest side (and 40 megapixels in all; 16 for a GIF), fetched within 10 s each and 30 s for the call, at most 50 MB downloaded per call. One failing link fails the whole call and nothing is written. Each image a call carries — link or file — counts as one write against the key's per-minute write limit; calls that download or upload images run at most 2 at a time per key; and a company may have 2,000 links downloaded per UTC day. Past any of these the answer is 429 RATE_LIMITED with Retry-After.

Headers

NameTypeDescription
Idempotency-KeystringOptional, but honored: send it to make retries of this request safe.

Body parameters

NameTypeDescription
store_iduuidTarget store. REQUIRED with a company-scoped key; with a store-scoped key it may only repeat the key's own store.
slugstringURL slug: lowercase letters, digits and single hyphens (anything else is refused with 422). Derived from the name when omitted, and suffixed (-1, -2) when taken. A rename keeps the slug; send one to change it.
statusstringdefault active—activeinactive
seoSeoBodyDtoSearch-engine overrides. Send null to clear them. In a multipart form, send the object as a JSON string.
banner_urlstringDetails-page hero banner, by link. An https link the server downloads and stores a copy of (PNG, JPEG, WebP or GIF, at most 10 MB and 8000 px on the longest side; read from the bytes, never the extension). The link itself is not kept. A link that cannot be fetched or is not such an image fails the whole call with 422 naming this field, and nothing is written. Or upload the file in a banner part of a multipart request — not both.
positionintegerSort order among siblings, lowest first.
image_urlstringListing image, by link. An https link the server downloads and stores a copy of (PNG, JPEG, WebP or GIF, at most 10 MB and 8000 px on the longest side; read from the bytes, never the extension). The link itself is not kept. A link that cannot be fetched or is not such an image fails the whole call with 422 naming this field, and nothing is written. Or upload the file in an image part of a multipart request — not both.
namerequiredstring—
parent_iduuidParent category, in the same store. Omit for a top-level category.
descriptionstringShown on the category page.

seo fields

NameTypeDescription
titlestringPage title for search engines; stored cut to 200 characters.
descriptionstringMeta description; stored cut to 500 characters.

Request

export SHOPDESK_API_KEY="shopdesk_sk_YOUR_API_KEY"

curl -sS -X POST "https://api.shopdeskbd.com/ext/v1/categories" \
  -H "Authorization: Bearer $SHOPDESK_API_KEY" \
  -H "Idempotency-Key: 3f2b8c1e-9d4a-4e7b-8a6f-2c5d1e0b9a47" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "T-Shirts",
  "image_url": "https://cdn.example.com/categories/t-shirts.jpg"
}'
Try itruns from your browser
POSThttps://api.shopdeskbd.com/ext/v1/categories

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Valid JSON
Idempotency-Keyoptional
generating…

A new value is generated whenever you edit this request, and kept while you do not — so sending twice without changing anything is a real retry and comes back Idempotent-Replayed: true instead of writing again.

Paste a key above to enable Send.

Responses

  • 201The new category.
  • 400An Idempotency-Key header was sent but is empty or longer than 255 characters (VALIDATION_ERROR; error.fields names the header).
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 409A request with this Idempotency-Key is still in flight (IDEMPOTENCY_IN_FLIGHT) — retry once it has finished.
  • 413A file part is larger than 10 MB, or the parts total more than 50 MB.
  • 422Validation failed (an unknown parent_id is named in error.fields.parent_id). An image link that cannot be downloaded, or a link or file that is not an allowed image, is refused here with error.fields naming it.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "parent_id": null,
  "name": "T-Shirts",
  "slug": "t-shirts",
  "image": "https://cdn.example.com/companies/c1/categories/k1/image.webp",
  "banner_image": "https://cdn.example.com/companies/c1/categories/k1/banner.webp",
  "description": null,
  "seo": {
    "title": "Cotton T-Shirts",
    "description": "Breathable cotton tees in every size."
  },
  "status": "active",
  "position": 0,
  "created_at": "2026-08-11T10:00:00.000Z",
  "updated_at": "2026-08-11T10:00:00.000Z"
}

Get a category by id

GET/ext/v1/categories/{id}products:read

One category node; follow parent_id for its ancestors.

Path parameters

NameTypeDescription
idrequireduuidThe category id.

Query parameters

NameTypeDescription
store_iduuidRestrict the lookup to one store. Breadth control for company-scoped keys; on a store-scoped key it must match the key's own store.

Request

export SHOPDESK_API_KEY="shopdesk_sk_YOUR_API_KEY"

curl -sS "https://api.shopdeskbd.com/ext/v1/categories/REPLACE_WITH_ID" \
  -H "Authorization: Bearer $SHOPDESK_API_KEY"
Try itruns from your browser
GEThttps://api.shopdeskbd.com/ext/v1/categories/5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Path parameters

Query parameters

Blank fields are left out of the request.

Paste a key above to enable Send.

Responses

  • 200The category.
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 404Category not found.
  • 422Validation failed — error.fields maps each offending field to its messages.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "parent_id": null,
  "name": "T-Shirts",
  "slug": "t-shirts",
  "image": "https://cdn.example.com/companies/c1/categories/k1/image.webp",
  "banner_image": "https://cdn.example.com/companies/c1/categories/k1/banner.webp",
  "description": null,
  "seo": {
    "title": "Cotton T-Shirts",
    "description": "Breathable cotton tees in every size."
  },
  "status": "active",
  "position": 0,
  "created_at": "2026-08-11T10:00:00.000Z",
  "updated_at": "2026-08-11T10:00:00.000Z"
}

Update a category

PATCH/ext/v1/categories/{id}catalog:write

Changes the fields sent and leaves the rest alone. A new image or banner replaces the old one, which is deleted only after the new one is saved; remove_image / remove_banner delete them. parent_id: null makes the category top-level; it cannot move under itself or its own descendants. Send JSON, with images by link, or multipart/form-data with the files as parts (at most 10 MB each, 50 MB in all) and the other fields as text (seo as a JSON string). An image comes by link or as a part, not both. Images are stored re-encoded as WebP. On a multipart request the Idempotency-Key covers the route only — a retry under the same key replays the first answer whatever the form holds — so send a new key for a different request. Image links: https only, PNG/JPEG/WebP/GIF read from the bytes (never SVG), at most 10 MB and 8000 px on the longest side (and 40 megapixels in all; 16 for a GIF), fetched within 10 s each and 30 s for the call, at most 50 MB downloaded per call. One failing link fails the whole call and nothing is written. Each image a call carries — link or file — counts as one write against the key's per-minute write limit; calls that download or upload images run at most 2 at a time per key; and a company may have 2,000 links downloaded per UTC day. Past any of these the answer is 429 RATE_LIMITED with Retry-After.

Path parameters

NameTypeDescription
idrequireduuidThe category id.

Headers

NameTypeDescription
Idempotency-KeystringOptional, but honored: send it to make retries of this request safe.

Body parameters

NameTypeDescription
store_iduuidTarget store. REQUIRED with a company-scoped key; with a store-scoped key it may only repeat the key's own store.
slugstringURL slug: lowercase letters, digits and single hyphens (anything else is refused with 422). Derived from the name when omitted, and suffixed (-1, -2) when taken. A rename keeps the slug; send one to change it.
statusstringdefault active—activeinactive
seoSeoBodyDtoSearch-engine overrides. Send null to clear them. In a multipart form, send the object as a JSON string.
banner_urlstringDetails-page hero banner, by link. An https link the server downloads and stores a copy of (PNG, JPEG, WebP or GIF, at most 10 MB and 8000 px on the longest side; read from the bytes, never the extension). The link itself is not kept. A link that cannot be fetched or is not such an image fails the whole call with 422 naming this field, and nothing is written. Or upload the file in a banner part of a multipart request — not both.
positionintegerSort order among siblings, lowest first.
image_urlstringListing image, by link. An https link the server downloads and stores a copy of (PNG, JPEG, WebP or GIF, at most 10 MB and 8000 px on the longest side; read from the bytes, never the extension). The link itself is not kept. A link that cannot be fetched or is not such an image fails the whole call with 422 naming this field, and nothing is written. Or upload the file in an image part of a multipart request — not both.
namestring—
parent_iduuidMove under another category of the store, or null to make it top-level. A category cannot move under itself or its own descendants.
descriptionstringSend null to clear it.
remove_imagebooleanRemove the current listing image. Cannot be combined with a new one.
remove_bannerbooleanRemove the current banner. Cannot be combined with a new one.

seo fields

NameTypeDescription
titlestringPage title for search engines; stored cut to 200 characters.
descriptionstringMeta description; stored cut to 500 characters.

Request

export SHOPDESK_API_KEY="shopdesk_sk_YOUR_API_KEY"

curl -sS -X PATCH "https://api.shopdeskbd.com/ext/v1/categories/REPLACE_WITH_ID" \
  -H "Authorization: Bearer $SHOPDESK_API_KEY" \
  -H "Idempotency-Key: 3f2b8c1e-9d4a-4e7b-8a6f-2c5d1e0b9a47" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Tees",
  "position": 2
}'
Try itruns from your browser
PATCHhttps://api.shopdeskbd.com/ext/v1/categories/5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001

Stored in this browser only and never sent anywhere except to the API host you picked above — these pages are static files with no server behind them.

Path parameters

Valid JSON
Idempotency-Keyoptional
generating…

A new value is generated whenever you edit this request, and kept while you do not — so sending twice without changing anything is a real retry and comes back Idempotent-Replayed: true instead of writing again.

Paste a key above to enable Send.

Responses

  • 200The updated category.
  • 400An Idempotency-Key header was sent but is empty or longer than 255 characters (VALIDATION_ERROR; error.fields names the header).
  • 401Missing/invalid API key, revoked or expired key, plan without API access, or a dead store.
  • 403The key's scopes do not cover this endpoint.
  • 404Category not found.
  • 409A request with this Idempotency-Key is still in flight (IDEMPOTENCY_IN_FLIGHT) — retry once it has finished.
  • 413A file part is larger than 10 MB, or the parts total more than 50 MB.
  • 422Validation failed: an unknown parent_id or a move into its own subtree (error.fields.parent_id), or a remove flag sent with a new image. An image link that cannot be downloaded, or a link or file that is not an allowed image, is refused here with error.fields naming it.
  • 429Rate limit exceeded for this key. Honor Retry-After and the X-RateLimit-* headers.

Every failure uses the one error envelope — Errors lists each code and what to do with it.

Example 200 response
{
  "id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "store_id": "5f7d2f60-0d1c-4b3a-9a68-6f4d21f6a001",
  "parent_id": null,
  "name": "T-Shirts",
  "slug": "t-shirts",
  "image": "https://cdn.example.com/companies/c1/categories/k1/image.webp",
  "banner_image": "https://cdn.example.com/companies/c1/categories/k1/banner.webp",
  "description": null,
  "seo": {
    "title": "Cotton T-Shirts",
    "description": "Breathable cotton tees in every size."
  },
  "status": "active",
  "position": 0,
  "created_at": "2026-08-11T10:00:00.000Z",
  "updated_at": "2026-08-11T10:00:00.000Z"
}