Sellvik / developers
Admin API

Categories

Category tree — flat or nested.

Categories group products for storefront navigation. They can nest one level (parent / child); deeper trees aren't supported in v1.

Category object

{
  "id": "c1d2e3f4-...",
  "name": "Sarees",
  "slug": "sarees",
  "description": "Cotton and silk sarees.",
  "imageUrl": "https://r2.sellvik.com/categories/sarees.jpg",
  "parentId": null,
  "isFeatured": true,
  "sortOrder": 1,
  "productCount": 47,
  "createdAt": "2026-05-15T10:00:00.000Z"
}

List categories

GET /api/v1/admin/categories

Scope: categories:read

Query parameters

NameTypeNotes
limitinteger (1–100)Default 50 — categories are small.
cursorstringOpaque cursor.
qstringSubstring match on name.

Create a category

POST /api/v1/admin/categories

Scope: categories:write

Request body

{
  "name": "Sarees",
  "slug": "sarees",
  "description": "Cotton and silk sarees.",
  "imageUrl": "https://r2.sellvik.com/categories/sarees.jpg",
  "parentId": null,
  "isFeatured": true,
  "sortOrder": 1
}
FieldRequiredNotes
nameyes1–80 chars.
slugnoAuto-derived from name if omitted.
parentIdnoUUID of parent category (top-level if omitted/null).
sortOrdernoLower numbers appear first. Default 100.

Errors

StatusCodeWhen
409duplicate_slugSlug already exists in this shop.
400invalid_parentparentId points to a non-root category.

Get a category

GET /api/v1/admin/categories/{id}

Scope: categories:read


Update a category

PATCH /api/v1/admin/categories/{id}

Scope: categories:write

Example

curl -X PATCH "https://api.sellvik.app/api/v1/admin/categories/c1d2..." \
  -H "Authorization: Bearer <admin-key>" \
  -H "Content-Type: application/json" \
  -d '{ "isFeatured": false }'

Delete a category

DELETE /api/v1/admin/categories/{id}

Scope: categories:write

Response

204 on success.

Errors

StatusCodeWhen
409has_subcategoriesCategory still has children. Delete those first.

Hard-delete: products linked to the category are not deleted; they become uncategorised. Re-link them through PATCH /v1/admin/products/{id} with a new categoryIds array.

On this page