> Documentation index: https://docs.sellhidden.com/llms.txt

# Categories

Source: https://docs.sellhidden.com/reference/categories

Up to 100 categories per store. Deleting one leaves its products uncategorised.

## Endpoints

6 endpoints · [categories:read](https://docs.sellhidden.com/start?scope=categories%3Aread#scopes) · [categories:write](https://docs.sellhidden.com/start?scope=categories%3Awrite#scopes)

Base URL https://api.sellhidden.com/v1 · Authorization: Bearer · 120/min per key · cursor pagination · Idempotency-Key on POST · No test mode

### GET /categories — List categories

Scope `categories:read`.

```bash
curl https://api.sellhidden.com/v1/categories \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{ "ok": true, "categories": [ { "id": "clx…", "name": "Software", "slug": "software", "position": 0, "productCount": 12, "activeProductCount": 11, "createdAt": "…" } ] }
```

### POST /categories — Create a category

Scope `categories:write`. Accepts `Idempotency-Key`. Returns 201.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `name` (required) | string | Unique in the store, up to 60 characters. |
| `slug` | string | Derived from the name when omitted. |

```bash
curl -X POST https://api.sellhidden.com/v1/categories \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"name":"Software"}'
```

### GET /categories/{id} — Get a category

Scope `categories:read`.

```bash
curl https://api.sellhidden.com/v1/categories/ID \
  -H "Authorization: Bearer hsk_live_…"
```

### PATCH /categories/{id} — Update a category

Scope `categories:write`.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `name` | string |  |
| `slug` | string |  |
| `position` | integer | Display position, 0 first. |

```bash
curl -X PATCH https://api.sellhidden.com/v1/categories/ID \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"Licenses"}'
```

### DELETE /categories/{id} — Delete a category

Scope `categories:write`.

```bash
curl -X DELETE https://api.sellhidden.com/v1/categories/ID \
  -H "Authorization: Bearer hsk_live_…"
```

Response (200):

```json
{ "ok": true, "id": "clx…", "uncategorisedProducts": 3 }
```

### POST /categories/reorder — Reorder categories

Scope `categories:write`. Accepts `Idempotency-Key`.

**Body**

| Body | Type | Description |
| --- | --- | --- |
| `order` (required) | string[] | Category ids in display order. |

```bash
curl -X POST \
  https://api.sellhidden.com/v1/categories/reorder \
  -H "Authorization: Bearer hsk_live_…" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"order":["clx1","clx2"]}'
```
