---
title: "Categories · API docs — Reeflip"
description: "Groups of products you fill by hand, each in its own order. A product can be in several."
url: "https://reeflip.com/docs/categories"
---

# Categories · API docs — Reeflip

Groups of products you fill by hand, each in its own order. A product can be in several.

Needs a key with Categories access: Read for GET requests, Read and write for the rest.

Every request follows [How requests work](https://reeflip.com/docs/requests.md).

## List categories

`GET /categories`

All your categories, in your order, each with how many products it has and photos of its first products. Flipbooks and catalogs show their categories in this order. Not paged.

### Example

```sh
curl https://app.reeflip.com/api/v1/categories \
  -H "Authorization: Bearer $REEFLIP_KEY"
```

### Response: 200 OK

```json
{
  "items": [
    {
      "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
      "name": "Chairs",
      "product_count": 1,
      "photos": [
        {
          "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
          "filename": "oak-chair.jpg",
          "content_type": "image/jpeg",
          "size_bytes": 482133,
          "status": "ready",
          "created_at": "2026-12-02T09:30:00Z",
          "width": 1600,
          "height": 1200,
          "placeholder": "",
          "jpeg_width": 1600,
          "webp_widths": [
            480,
            960,
            1600
          ],
          "avif_widths": [
            480,
            960,
            1600
          ],
          "url": "https://reeflip.com/northwood/spring"
        }
      ],
      "created_at": "2026-12-02T09:30:00Z",
      "updated_at": "2026-12-02T09:30:00Z"
    }
  ],
  "product_count": 1,
  "uncategorized_count": 1
}
```

## Get a category

`GET /categories/{category_id}`

One category, with how many products it has.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | id | Yes | The category's id. |

### Example

```sh
curl https://app.reeflip.com/api/v1/categories/b583a629-3fe1-4575-aba1-7314e10419cc \
  -H "Authorization: Bearer $REEFLIP_KEY"
```

### Response: 200 OK

```json
{
  "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
  "name": "Chairs",
  "product_count": 1,
  "created_at": "2026-12-02T09:30:00Z",
  "updated_at": "2026-12-02T09:30:00Z"
}
```

Other errors: `category_not_found`

## Create a category

`POST /categories`

Makes an empty category. Two categories never share a name, whatever the case.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | text | Yes | The category's name. |

### Example

```sh
curl -X POST https://app.reeflip.com/api/v1/categories \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Chairs"
  }'
```

### Response: 201 Created

```json
{
  "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
  "name": "Chairs",
  "product_count": 1,
  "created_at": "2026-12-02T09:30:00Z",
  "updated_at": "2026-12-02T09:30:00Z"
}
```

Other errors: `category_name_taken`

## Save a category with its products

`POST /categories/save`

Makes a category, or changes the one with `id`, so that it has `name` and exactly the products in `product_ids`, in that order. Products you don't send leave the category; the products themselves stay.

A product sent twice counts once, where it comes first. A name another category has gets `category_name_taken`, and a product that isn't yours gets `product_not_found`; then nothing changes.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | id | No | The category to change; leave it out to make one. |
| `name` | text | Yes | The category's name. |
| `product_ids` | list of ids | Yes | Every product the category has, in order; an empty list empties it. |

### Example

```sh
curl -X POST https://app.reeflip.com/api/v1/categories/save \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Chairs",
    "product_ids": [
      "e49efc9b-26be-4b3c-ac8a-012a8e3582af"
    ]
  }'
```

### Response: 200 OK

```json
{
  "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
  "name": "Chairs",
  "product_count": 1,
  "created_at": "2026-12-02T09:30:00Z",
  "updated_at": "2026-12-02T09:30:00Z"
}
```

Other errors: `category_not_found`, `category_name_taken`, `product_not_found`

## Rename a category

`PATCH /categories/{category_id}`

Gives the category a new name. Two categories never share a name, whatever the case.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | id | Yes | The category's id. |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | text | Yes | The category's name. |

### Example

```sh
curl -X PATCH https://app.reeflip.com/api/v1/categories/b583a629-3fe1-4575-aba1-7314e10419cc \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Chairs"
  }'
```

### Response: 200 OK

```json
{
  "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
  "name": "Chairs",
  "product_count": 1,
  "created_at": "2026-12-02T09:30:00Z",
  "updated_at": "2026-12-02T09:30:00Z"
}
```

Other errors: `category_not_found`, `category_name_taken`

## Delete a category

`DELETE /categories/{category_id}`

Deletes the category. Its products stay, and stay in any other categories they are in.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | id | Yes | The category's id. |

### Example

```sh
curl -X DELETE https://app.reeflip.com/api/v1/categories/b583a629-3fe1-4575-aba1-7314e10419cc \
  -H "Authorization: Bearer $REEFLIP_KEY"
```

### Response: 204 No Content

Nothing in the body.

Other errors: `category_not_found`

## List a category's products

`GET /categories/{category_id}/products`

The category's products, in its order. Not paged.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | id | Yes | The category's id. |

### Example

```sh
curl https://app.reeflip.com/api/v1/categories/b583a629-3fe1-4575-aba1-7314e10419cc/products \
  -H "Authorization: Bearer $REEFLIP_KEY"
```

### Response: 200 OK

```json
{
  "items": [
    {
      "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
      "title": "Chairs",
      "status": "active",
      "cover": {
        "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
        "filename": "oak-chair.jpg",
        "content_type": "image/jpeg",
        "size_bytes": 482133,
        "status": "ready",
        "created_at": "2026-12-02T09:30:00Z",
        "width": 1600,
        "height": 1200,
        "placeholder": "",
        "jpeg_width": 1600,
        "webp_widths": [
          480,
          960,
          1600
        ],
        "avif_widths": [
          480,
          960,
          1600
        ],
        "url": "https://reeflip.com/northwood/spring"
      },
      "price_display": "show",
      "variant_count": 2,
      "price_min": "129.00",
      "price_max": "129.00",
      "availabilities": [
        "in_stock"
      ],
      "in_stock_count": 2,
      "sku": "CH-OAK-01",
      "option_names": [
        "Finish"
      ]
    }
  ]
}
```

Other errors: `category_not_found`

## Add products to a category

`POST /categories/{category_id}/products`

Adds up to 250 products after the category's last one, in the order sent. Products already in it keep their place. A product that isn't yours gets `product_not_found`, and nothing is added.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | id | Yes | The category's id. |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `product_ids` | list of ids | Yes | Up to 250 product ids, in order. |

### Example

```sh
curl -X POST https://app.reeflip.com/api/v1/categories/b583a629-3fe1-4575-aba1-7314e10419cc/products \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_ids": [
      "e49efc9b-26be-4b3c-ac8a-012a8e3582af"
    ]
  }'
```

### Response: 200 OK

```json
{
  "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
  "name": "Chairs",
  "product_count": 1,
  "created_at": "2026-12-02T09:30:00Z",
  "updated_at": "2026-12-02T09:30:00Z"
}
```

Other errors: `category_not_found`, `product_not_found`

## Remove products from a category

`POST /categories/{category_id}/products/remove`

Takes up to 250 products out of the category. The products themselves stay. Products not in it are skipped.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | id | Yes | The category's id. |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `product_ids` | list of ids | Yes | Up to 250 product ids, in order. |

### Example

```sh
curl -X POST https://app.reeflip.com/api/v1/categories/b583a629-3fe1-4575-aba1-7314e10419cc/products/remove \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_ids": [
      "e49efc9b-26be-4b3c-ac8a-012a8e3582af"
    ]
  }'
```

### Response: 200 OK

```json
{
  "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
  "name": "Chairs",
  "product_count": 1,
  "created_at": "2026-12-02T09:30:00Z",
  "updated_at": "2026-12-02T09:30:00Z"
}
```

Other errors: `category_not_found`

## Reorder a category's products

`PUT /categories/{category_id}/products/order`

Puts the category's products in the order you send. Send every product in the category, each once; anything else gets `invalid_request` and changes nothing.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | id | Yes | The category's id. |

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `product_ids` | list of ids | Yes | Every product in the category, each once, in the new order. |

### Example

```sh
curl -X PUT https://app.reeflip.com/api/v1/categories/b583a629-3fe1-4575-aba1-7314e10419cc/products/order \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_ids": [
      "e49efc9b-26be-4b3c-ac8a-012a8e3582af"
    ]
  }'
```

### Response: 200 OK

```json
{
  "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
  "name": "Chairs",
  "product_count": 1,
  "created_at": "2026-12-02T09:30:00Z",
  "updated_at": "2026-12-02T09:30:00Z"
}
```

Other errors: `category_not_found`

## Reorder your categories

`PUT /categories/order`

Puts your categories in the order you send. Flipbooks and catalogs show their categories in this order, and a new category goes at the end. Send every category you have, each once; anything else gets `invalid_request` and changes nothing.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `ids` | list of ids | Yes | Every category you have, each once, in the new order. |

### Example

```sh
curl -X PUT https://app.reeflip.com/api/v1/categories/order \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "aff88055-9e1a-40a5-a2de-9a10c9400438"
    ]
  }'
```

### Response: 200 OK

```json
{
  "items": [
    {
      "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
      "name": "Chairs",
      "product_count": 1,
      "photos": [
        {
          "id": "aff88055-9e1a-40a5-a2de-9a10c9400438",
          "filename": "oak-chair.jpg",
          "content_type": "image/jpeg",
          "size_bytes": 482133,
          "status": "ready",
          "created_at": "2026-12-02T09:30:00Z",
          "width": 1600,
          "height": 1200,
          "placeholder": "",
          "jpeg_width": 1600,
          "webp_widths": [
            480,
            960,
            1600
          ],
          "avif_widths": [
            480,
            960,
            1600
          ],
          "url": "https://reeflip.com/northwood/spring"
        }
      ],
      "created_at": "2026-12-02T09:30:00Z",
      "updated_at": "2026-12-02T09:30:00Z"
    }
  ],
  "product_count": 1,
  "uncategorized_count": 1
}
```
