# Categories

Create, read, update, delete, bulk manage, translate, and subscribe to product categories through the Store API.

Categories require product scopes. Reads use `read_products`; writes use `write_products`. Categories support `parent_id`, `name`, `slug`, `description`, `seo_title`, `seo_description`, `image_id`, and `template_handle` fields. `slug` is optional on create and generated from the name when omitted; on update, omit it to keep the current slug or send an empty string to regenerate it from the name. `parent_id` builds the category hierarchy. Assigning a non-empty `image_id` also requires `read_files` for the referenced upload image. On create, omitting `template_handle` assigns `default_category`. Use `default_category` for the default Category template, or pass an alternate Category template handle configured for the store. Omit `template_handle` on update to leave the current assignment unchanged; an empty string is invalid. AI translation is not exposed through the Store API.

## Endpoints

## Category limits

`GET /api/2025-01/categories/limits`

Returns the per-field maximum lengths, hierarchy depth, and request caps that apply to Category endpoints. Useful for clients to validate inputs before sending them and to size UIs. `max_per_store` is this store's plan cap, `count` is how many exist now, and `usage` is the label as Tringify shows it, in English.

Scope: `read_products`

```curl
curl 'https://api-store.tringify.com/api/2025-01/categories/limits' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "count": 4,
    "fields": {
      "description": {
        "max_length": 5000
      },
      "name": {
        "max_length": 100
      },
      "seo_description": {
        "max_length": 160
      },
      "seo_title": {
        "max_length": 70
      },
      "slug": {
        "max_length": 100
      }
    },
    "max_per_store": 500,
    "request_caps": {
      "bulk_create_max_count": 50,
      "bulk_delete_max_count": 500,
      "list_max_limit": 100,
      "max_depth": 5,
      "max_per_store": 500,
      "search_max_length": 200,
      "search_max_limit": 50,
      "slug_retry_max": 100,
      "tree_max_limit": 500
    },
    "resource_type": "category",
    "usage": "Categories 4 of 500"
  },
  "success": true
}
```

## List categories

`GET /api/2025-01/categories`

Returns paginated categories. With `tree=true` and no search or filters, `limit` paginates root categories; the selected roots and their descendants are then expanded into one nested page. Expansion is deterministic and ancestor-first, with siblings ordered by name and then id, and is capped at `request_caps.tree_max_limit` total category nodes across the whole root page, including the roots, and at the 512 KiB reply budget. When more nodes exist or the next node would pass the budget, the response returns the prefix that fits and sets `truncated: true`; later descendants or entire later root subtrees can therefore be absent even when `has_next` is false. `has_next`, `has_previous`, `next_cursor`, `previous_cursor`, and `total` describe root-category pagination only and do not describe omitted descendants. To retrieve every category, use the flat list (`tree=false`) with cursor pagination; add `ancestor_id` when a complete flat listing of one category's descendants is needed. Any search or filter also switches the response to the ordinary flat, cursor-paginated list, where `truncated` is false. A flat page holds at most `list_max_limit` (100) categories with every field, description included. `next_cursor` is present only when `has_next` is true, and `previous_cursor` only when `has_previous` is true. `storefront_url` is the canonical absolute URL on the store's primary domain. `storefront_path` is the domain-independent baseline route; join it to the storefront address you are targeting. Hosted storefront responses apply translated slugs and locale/country prefixes.

Scope: `read_products`

```curl
curl 'https://api-store.tringify.com/api/2025-01/categories?ancestor_id=12&cursor=eyJ2IjoxLCJyIjoiY2F0ZWdvcnkifQ&has_children=true&has_images=true&limit=20&parent_id=null&search=apparel&sort_by=name&sort_direction=asc&tree=false' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "categories": [
      {
        "created_at": "2026-06-09T12:00:00-04:00",
        "description": "Clothing and fashion.",
        "has_children": true,
        "id": 7,
        "image_cdn_url": null,
        "image_id": null,
        "image_url": null,
        "name": "Apparel",
        "parent_id": 12,
        "parent_name": "Collections",
        "product_count": 42,
        "seo_description": "Browse clothing, shoes, and accessories.",
        "seo_title": "Shop Apparel",
        "slug": "apparel",
        "store_id": "74e634ea-84ec-43b8-b66b-986214c2c5a3",
        "storefront_path": "/category/apparel",
        "storefront_url": "https://store.example.com/category/apparel",
        "template_handle": "default_category",
        "updated_at": "2026-06-09T12:00:00-04:00"
      }
    ],
    "has_next": true,
    "has_previous": false,
    "limit": 20,
    "next_cursor": "eyJ2IjoxLCJyIjoiY2F0ZWdvcnkifQ",
    "resource_type": "category",
    "sort_by": "name",
    "sort_direction": "asc",
    "total": 21,
    "total_all": 21,
    "truncated": false
  },
  "success": true
}
```

## Search categories

`GET /api/2025-01/categories/search`

Returns lightweight category suggestions by query, one `page` of `limit` at a time, for pickers and simple selection UIs, ranked exact name, name prefix, exact slug, slug prefix, then other matches. `items` holds the page. `total` and `match_count` count the matches exactly up to 10,000; above that both are 10,000 and `match_count_is_capped` is true (without `q`, they count every category the same way). Pages reach the first 10,000 matches; a later page is empty, so narrow `q` instead. Use the list endpoint with `search` for full rows, filters, sorting and cursors.

Scope: `read_products`

```curl
curl 'https://api-store.tringify.com/api/2025-01/categories/search?limit=10&page=1&q=apparel' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "items": [
      {
        "id": 7,
        "name": "Apparel",
        "slug": "apparel"
      }
    ],
    "match_count": 1,
    "match_count_is_capped": false,
    "total": 1
  },
  "success": true
}
```

## Get a category

`GET /api/2025-01/categories/{id}`

Returns the category if it belongs to the token's store. `storefront_url` is the canonical absolute URL on the store's primary domain. `storefront_path` is the domain-independent baseline route; join it to the storefront address you are targeting. Hosted storefront responses apply translated slugs and locale/country prefixes.

Scope: `read_products`

```curl
curl 'https://api-store.tringify.com/api/2025-01/categories/7' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Clothing and fashion.",
    "has_children": true,
    "id": 7,
    "image_cdn_url": null,
    "image_id": null,
    "image_url": null,
    "name": "Apparel",
    "parent_id": 12,
    "parent_name": "Collections",
    "product_count": 42,
    "seo_description": "Browse clothing, shoes, and accessories.",
    "seo_title": "Shop Apparel",
    "slug": "apparel",
    "store_id": "74e634ea-84ec-43b8-b66b-986214c2c5a3",
    "storefront_path": "/category/apparel",
    "storefront_url": "https://store.example.com/category/apparel",
    "template_handle": "default_category",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "success": true
}
```

## List category metafields

`GET /api/2025-01/categories/{id}/metafields`

Returns paginated metafield values the token can read. `total` counts only visible values. Identify each value by `namespace` and `key`.

Scope: `read_products`

```curl
curl 'https://api-store.tringify.com/api/2025-01/categories/7/metafields' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "limit": 20,
    "metafields": [
      {
        "created_at": "2026-11-22T23:01:45+05:30",
        "definition": {
          "app_access": "private",
          "created_at": "2026-11-22T15:18:37+05:30",
          "id": "623a7f6c-fd13-4ac8-9333-ef7110c63c71",
          "is_translatable": true,
          "key": "material",
          "merchant_access": "read_write",
          "name": "Material",
          "namespace": "specs",
          "owner_type": "category",
          "sort_order": 0,
          "type": "string",
          "updated_at": "2026-11-22T15:18:37+05:30"
        },
        "updated_at": "2026-11-22T23:01:45+05:30",
        "value": "Organic cotton"
      }
    ],
    "page": 1,
    "total": 1,
    "total_pages": 1
  },
  "success": true
}
```

## Set category metafields

`PUT /api/2025-01/categories/{id}/metafields`

Send namespace-and-key entries. A string value creates or replaces a value; `null` or an empty string deletes it. App tokens (`tpat_`, `tast_`) write values only for definitions their app owns; a definition another app shares is readable but not writable. Store admin tokens (`tsat_`) and connected AI tools write as the merchant: merchant-owned definitions, and app-owned definitions whose `merchant_access` is `read_write`. Definition access, type, constraint, reference, translation-staleness, search-index, audit, and webhook rules are applied in the same transaction.

Scope: `write_products`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/categories/7/metafields' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "metafields": [
    {
      "key": "care",
      "namespace": "details",
      "value": "Hand wash"
    }
  ]
}'
```

Response:

```json
{
  "data": {
    "limit": 20,
    "metafields": [
      {
        "created_at": "2026-11-22T23:01:45+05:30",
        "definition": {
          "app_access": "private",
          "created_at": "2026-11-22T15:18:37+05:30",
          "id": "623a7f6c-fd13-4ac8-9333-ef7110c63c71",
          "is_translatable": true,
          "key": "material",
          "merchant_access": "read_write",
          "name": "Material",
          "namespace": "specs",
          "owner_type": "category",
          "sort_order": 0,
          "type": "string",
          "updated_at": "2026-11-22T15:18:37+05:30"
        },
        "updated_at": "2026-11-22T23:01:45+05:30",
        "value": "Organic cotton"
      }
    ],
    "page": 1,
    "total": 1,
    "total_pages": 1
  },
  "success": true
}
```

## Create a category

`POST /api/2025-01/categories`

Creates a category. `name` is required; optional text fields, hierarchy assignment, image assignment, and template assignment follow the Category resource contract. If `image_id` is non-empty, it must point to an upload image in the same store and the token must also have `read_files`. `storefront_url` is the canonical absolute URL on the store's primary domain. `storefront_path` is the domain-independent baseline route; join it to the storefront address you are targeting. Hosted storefront responses apply translated slugs and locale/country prefixes.

Scope: `write_products`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/categories' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "Clothing and fashion.",
  "image_id": "8f2a1c2b-9d4e-4a56-b789-0123456789ab",
  "name": "Apparel",
  "parent_id": 12,
  "seo_description": "Browse clothing, shoes, and accessories.",
  "seo_title": "Shop Apparel",
  "slug": "apparel",
  "template_handle": "default_category"
}'
```

Response:

```json
{
  "code": "CATEGORY_CREATED",
  "data": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Clothing and fashion.",
    "has_children": false,
    "id": 7,
    "image_cdn_url": null,
    "image_id": null,
    "image_url": null,
    "name": "Apparel",
    "parent_id": 12,
    "parent_name": "Collections",
    "product_count": 0,
    "seo_description": "Browse clothing, shoes, and accessories.",
    "seo_title": "Shop Apparel",
    "slug": "apparel",
    "store_id": "74e634ea-84ec-43b8-b66b-986214c2c5a3",
    "storefront_path": "/category/apparel",
    "storefront_url": "https://store.example.com/category/apparel",
    "template_handle": "default_category",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "message": "Category 'Apparel' created.",
  "success": true
}
```

## Bulk create categories

`POST /api/2025-01/categories/bulk-create`

Creates multiple root categories from names. Slugs are generated automatically; existing names are skipped and reported in `skipped`. The plan cap applies per row: when the batch would pass it, the rows that fit are created and the response is still 200, with each refused name in `row_errors` (code `CATEGORY_PLAN_LIMIT_REACHED`, a localized `message` and `args.max`). Every other refused name is in `row_errors` too, blank names included (`CATEGORY_NAME_REQUIRED`); each row error carries `row_number`, the name's 1-based position in `names`. A name repeated in the request is created once and its repeats are reported in `skipped`. Check `row_errors` on every response. The top-level `code` is `CATEGORY_BULK_CREATED` when every name was created, `CATEGORY_BULK_PARTIAL` when some were skipped or failed, and `CATEGORY_BULK_NOOP` when none was created. The response is compact: `totals` counts `created`, `skipped` and `failed` names; `created` lists each new item's `id` and the `name` you sent; `skipped` and `row_errors` are unchanged. Get an item for its other fields.

Scope: `write_products`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/categories/bulk-create' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "names": [
    "Apparel",
    "Accessories"
  ]
}'
```

Response:

```json
{
  "code": "CATEGORY_BULK_PARTIAL",
  "data": {
    "created": [
      {
        "id": 7,
        "name": "Apparel"
      }
    ],
    "row_errors": [],
    "skipped": [
      "Accessories"
    ],
    "totals": {
      "created": 1,
      "failed": 0,
      "skipped": 1
    }
  },
  "message": "1 category created; skipped: 1, failed: 0.",
  "success": true
}
```

## Update a category

`PUT /api/2025-01/categories/{id}`

Updates provided Category fields. Omitted fields are left unchanged. Sending `parent_id: 0` moves the category to the root. Sending an empty `image_id` clears the image; sending a non-empty `image_id` requires `read_files` and the referenced file must be an upload image in the same store. When the slug changes, a redirect from the old category URL is created (`redirects/create`, kind `auto_slug`) unless `create_redirect` is `false`. An empty `slug` regenerates it from the name (the new name when `name` is sent too), with `-2`, `-3`, ... added when it is taken. Translated slugs are unchanged by a source slug change. `storefront_url` is the canonical absolute URL on the store's primary domain. `storefront_path` is the domain-independent baseline route; join it to the storefront address you are targeting. Hosted storefront responses apply translated slugs and locale/country prefixes.

Scope: `write_products`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/categories/7' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "create_redirect": true,
  "description": "Clothing and fashion.",
  "image_id": "8f2a1c2b-9d4e-4a56-b789-0123456789ab",
  "name": "Apparel",
  "parent_id": 12,
  "seo_description": "Browse clothing, shoes, and accessories.",
  "seo_title": "Shop Apparel",
  "slug": "apparel",
  "template_handle": "default_category"
}'
```

Response:

```json
{
  "code": "CATEGORY_UPDATED",
  "data": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Clothing and fashion.",
    "has_children": true,
    "id": 7,
    "image_cdn_url": null,
    "image_id": null,
    "image_url": null,
    "name": "Apparel",
    "parent_id": 12,
    "parent_name": "Collections",
    "product_count": 42,
    "seo_description": "Browse clothing, shoes, and accessories.",
    "seo_title": "Shop Apparel",
    "slug": "apparel",
    "store_id": "74e634ea-84ec-43b8-b66b-986214c2c5a3",
    "storefront_path": "/category/apparel",
    "storefront_url": "https://store.example.com/category/apparel",
    "template_handle": "default_category",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "message": "Category 'Apparel' updated.",
  "success": true
}
```

## Delete a category

`DELETE /api/2025-01/categories/{id}`

Deletes the category, its translations, and its metafield values. Its subcategories move up a level: into its parent, or to the top level. It also takes the category off its products (the products themselves stay) and removes the collection rules, cash on delivery product rules, discount targets and menu links that use it. Each discount that loses the category as a target sends `discounts/update` with a new `updated_at` shortly after the delete is confirmed; a discount whose target categories are all deleted is disabled as well (its `status` becomes `disabled`, and the confirmation's warnings name it). Each collection that loses a rule sends `collections/update` with `changed_fields` `rules` and its remaining rules, shortly after the delete. When anything uses the category or it has subcategories, the first request returns `CONFIRMATION_REQUIRED` with `error.details.warnings` (a summary to show) and `error.details.impact`: `products.count` (each changed product once), the first 50 subcategories that move with `children_total` (each with `new_parent_id`, null for the top level), the first 50 changed collections with `collections_total`, the discounts aimed at those collections or at the category itself with `discounts_total`, and the first 50 cash on delivery rules removed with `cod_rules_total`. Confirmation covers the full impact, including entries past the first 50. Repeat with `confirmed: true` and the returned `confirmation_token`; if the impact changed in between, a new confirmation is returned. If moving a subcategory up would give two categories under the same parent the same name, in the source language or a translation, the request returns `CATEGORY_DELETE_NAME_CONFLICT` with `error.details.name_conflicts` (each with `category_id`, `name`, `existing_id`, `existing_name`, `locale`, `new_parent_id`, null for the top level, and a `message`) and the rest of the impact in `error.details.impact` and nothing is deleted; rename one category of each pair (its source name, or its translated name in that locale) and delete again. A delete that changes 250 products or fewer completes in the request. A larger one moves the subcategories and removes the rules at once, hides the category (it can no longer be assigned, used in rules or given subcategories), and takes it off its products in background batches, each sending `products/update`. `categories/delete` is sent when the delete is confirmed, before those batches. Menu links may update shortly after the response. The redirects Tringify created when the category's slug changed (`auto_slug`, in every language) end on its URLs and are removed shortly after the response, each sending `redirects/delete`; redirects you created are kept, and its subcategories keep their URLs. The confirmation also lists the storefront places that use it in a theme, since they go empty.

Scope: `write_products`

```curl
curl -X DELETE 'https://api-store.tringify.com/api/2025-01/categories/7' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "code": "CATEGORY_DELETED",
  "data": {
    "deleted": true,
    "id": 7,
    "name": "Apparel"
  },
  "message": "Category 'Apparel' deleted.",
  "success": true
}
```

## Bulk delete categories

`POST /api/2025-01/categories/bulk-delete`

Send category ids in `category_ids`. Each selected category is deleted as the single delete describes; a subcategory of a deleted category moves to its nearest ancestor that is not deleted, or to the top level. The confirmation and `CATEGORY_DELETE_NAME_CONFLICT` cover the whole selection; retry the same ids with `confirmed: true` and the returned `confirmation_token`. The response lists deleted ids in `deleted` and ids that do not exist in `failed` (with a `reason`); a request whose ids all fail still returns 200. All database changes for the deleted ids commit together; past 250 products the products are detached in background batches. The confirmation also lists the storefront places that use it in a theme, since they go empty.

Scope: `write_products`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/categories/bulk-delete' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "category_ids": [
    7,
    11
  ]
}'
```

Response:

```json
{
  "code": "CATEGORY_BULK_DELETED",
  "data": {
    "deleted": [
      7
    ],
    "failed": [
      {
        "id": 11,
        "reason": "Category not found."
      }
    ]
  },
  "message": "1 category deleted.",
  "success": true
}
```

## Delete category metafield

`DELETE /api/2025-01/categories/{id}/metafields/{namespace}/{key}`

Address the existing definition by namespace and key. Requires the same write scope and ownership as setting the value. Apps can clear only their own values; merchant callers need write access to the definition's values. The value row is removed, not set to null. The deletion is recorded in the store's activity log and sends the same metafield webhooks as a delete in Store Admin. Repeating the request for an absent value succeeds with the same success envelope (no data or deleted-count field). An unknown or unreadable definition fails. No request body or confirmation token is required.

Scope: `write_products`

```curl
curl -X DELETE 'https://api-store.tringify.com/api/2025-01/categories/7/metafields/details/subtitle' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{"success":true,"code":"METAFIELD_DELETED","message":"Metafield deleted."}
```

## Fields

| Field | Type | Create | Update | Required | Translatable |
| --- | --- | --- | --- | --- | --- |
| `id` | id | No | No | - | No |
| `store_id` | text | No | No | - | No |
| `name` | text | Yes | Yes | create | Yes |
| `slug` | slug | Yes | Yes | - | Yes |
| `parent_id` | integer | Yes | Yes | - | No |
| `description` | textarea | Yes | Yes | - | Yes |
| `seo_title` | text | Yes | Yes | - | Yes |
| `seo_description` | textarea | Yes | Yes | - | Yes |
| `image_id` | image | Yes | Yes | - | No |
| `image_url` | text | No | No | - | No |
| `image_cdn_url` | text | No | No | - | No |
| `template_handle` | template | Yes | Yes | - | No |
| `create_redirect` | boolean | No | Yes | - | No |
| `parent_name` | text | No | No | - | No |
| `has_children` | boolean | No | No | - | No |
| `product_count` | integer | No | No | - | No |
| `created_at` | datetime | No | No | - | No |
| `updated_at` | datetime | No | No | - | No |
| `storefront_url` | url | No | No | No | No |
| `storefront_path` | string | No | No | No | No |

> `storefront_url` is the read-only canonical HTTPS URL on the store's primary domain. `storefront_path` is the read-only, domain-independent baseline route for clients targeting another configured storefront domain. Resources with storefront visibility conditions return both fields as `null` when those conditions are not met. Hosted storefront responses return request-addressed paths with translated slugs and locale/country prefixes.

## Webhook events

Subscribe to these events to keep your integration in sync with categories. Each event shows the required Store API scope and store permission, the available payload fields, and an example payload. Subscription setup is validated against those permissions; delivery is always restricted to the subscription's store.

Metafield events are filtered for every subscriber. An app receives events for definitions it owns. With the event's required scope, it also receives merchant-owned definitions and definitions shared by another app through `app_access: shared`; another app's private definitions are not delivered. A store-level webhook endpoint receives merchant-owned definitions and app-owned definitions unless `merchant_access` is `hidden`. If an event cannot identify the definition owner or its access settings, Tringify does not deliver it.

## Category created

Event: `categories/create` · App scope: `read_products` · Staff permission: `products:write`

Fired when a product category is created.

```json
{
  "category": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Clothing and accessories.",
    "has_children": false,
    "id": 5,
    "image_cdn_url": null,
    "image_id": null,
    "image_url": null,
    "name": "Apparel",
    "parent_id": null,
    "parent_name": null,
    "product_count": 0,
    "seo_description": "Shop apparel.",
    "seo_title": "Apparel",
    "slug": "apparel",
    "template_handle": "default_category",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

## Category updated

Event: `categories/update` · App scope: `read_products` · Staff permission: `products:write`

Fired when a product category is updated. `changed_fields` lists what changed. When products are added to or removed from the category (product edits, bulk actions, CSV imports, product deletes), `changed_fields` is `product_count` and the payload carries the new count; a CSV import sends it once per import chunk. Also fired when a deleted Media file was its image: `changed_fields` is `image_id` and the image is now empty. A field edit (Store Admin, Store API, MCP or a CSV update) also carries `previous`, the category before the edit; it is omitted for the other updates. Undelivered updates of the same category are merged: the latest state is delivered once, with the union of `changed_fields` and the `previous` from before the first of them.

```json
{
  "category": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Clothing and accessories.",
    "has_children": true,
    "id": 5,
    "image_cdn_url": null,
    "image_id": null,
    "image_url": null,
    "name": "Apparel",
    "parent_id": null,
    "parent_name": null,
    "product_count": 87,
    "seo_description": "Shop apparel.",
    "seo_title": "Apparel",
    "slug": "apparel",
    "template_handle": "default_category",
    "updated_at": "2026-06-09T12:00:00-04:00"
  },
  "changed_fields": [
    "name",
    "slug"
  ],
  "previous": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Clothing and accessories.",
    "has_children": true,
    "id": 5,
    "image_cdn_url": null,
    "image_id": null,
    "image_url": null,
    "name": "Clothing",
    "parent_id": null,
    "parent_name": null,
    "product_count": 87,
    "seo_description": "Shop apparel.",
    "seo_title": "Apparel",
    "slug": "clothing",
    "template_handle": "default_category",
    "updated_at": "2026-06-01T08:00:00-04:00"
  }
}
```

## Category deleted

Event: `categories/delete` · App scope: `read_products` · Staff permission: `products:write`

Fired when a product category is deleted. Each subcategory that moved up a level gets categories/update (`parent_id`), each translation categories/translations/delete and each metafield value category_metafields/delete; these are queued before categories/delete, but deliveries are sent in parallel and can arrive in a different order. Its products are removed from it with products/update (`category_ids`). categories/delete is sent when the delete is confirmed; when the category had more than 250 products, they are removed after it in background batches.

```json
{
  "category": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "description": "Clothing and accessories.",
    "has_children": true,
    "id": 5,
    "image_cdn_url": null,
    "image_id": null,
    "image_url": null,
    "name": "Apparel",
    "parent_id": null,
    "parent_name": null,
    "product_count": 87,
    "seo_description": "Shop apparel.",
    "seo_title": "Apparel",
    "slug": "apparel",
    "template_handle": "default_category",
    "updated_at": "2026-06-09T12:00:00-04:00"
  }
}
```

## Category metafield value created

Event: `category_metafields/create` · App scope: `read_products` · Staff permission: `products:write`

Fired when a category metafield value is created.

```json
{
  "category": {
    "id": 5,
    "name": "Apparel",
    "slug": "apparel"
  },
  "metafield": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "definition": {
      "app_access": "shared",
      "app_id": "d6a26466-7903-4e2f-8fd7-7c59f3c8cd9a",
      "created_at": "2026-06-09T12:00:00-04:00",
      "description": "How to care for products in this category.",
      "id": "6b56de32-3f8c-4a25-a4cb-2d217ad7a8aa",
      "is_translatable": true,
      "key": "care",
      "max_list_items": null,
      "max_value_length": null,
      "merchant_access": "read_write",
      "name": "Care instructions",
      "namespace": "app:catalog-sync.details",
      "owner_type": "category",
      "sort_order": 0,
      "type": "string",
      "updated_at": "2026-06-09T12:00:00-04:00"
    },
    "display_value": null,
    "display_value_map": {},
    "updated_at": "2026-06-09T12:00:00-04:00",
    "value": "Hand wash"
  }
}
```

## Category metafield value updated

Event: `category_metafields/update` · App scope: `read_products` · Staff permission: `products:write`

Fired when a category metafield value changes.

```json
{
  "category": {
    "id": 5,
    "name": "Apparel",
    "slug": "apparel"
  },
  "changed_fields": [
    "value"
  ],
  "current": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "definition": {
      "app_access": "shared",
      "app_id": "d6a26466-7903-4e2f-8fd7-7c59f3c8cd9a",
      "created_at": "2026-06-09T12:00:00-04:00",
      "description": "How to care for products in this category.",
      "id": "6b56de32-3f8c-4a25-a4cb-2d217ad7a8aa",
      "is_translatable": true,
      "key": "care",
      "max_list_items": null,
      "max_value_length": null,
      "merchant_access": "read_write",
      "name": "Care instructions",
      "namespace": "app:catalog-sync.details",
      "owner_type": "category",
      "sort_order": 0,
      "type": "string",
      "updated_at": "2026-06-09T12:00:00-04:00"
    },
    "display_value": null,
    "display_value_map": {},
    "updated_at": "2026-06-10T09:30:00-04:00",
    "value": "Machine wash cold"
  },
  "previous": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "definition": {
      "app_access": "shared",
      "app_id": "d6a26466-7903-4e2f-8fd7-7c59f3c8cd9a",
      "created_at": "2026-06-09T12:00:00-04:00",
      "description": "How to care for products in this category.",
      "id": "6b56de32-3f8c-4a25-a4cb-2d217ad7a8aa",
      "is_translatable": true,
      "key": "care",
      "max_list_items": null,
      "max_value_length": null,
      "merchant_access": "read_write",
      "name": "Care instructions",
      "namespace": "app:catalog-sync.details",
      "owner_type": "category",
      "sort_order": 0,
      "type": "string",
      "updated_at": "2026-06-09T12:00:00-04:00"
    },
    "display_value": null,
    "display_value_map": {},
    "updated_at": "2026-06-09T12:00:00-04:00",
    "value": "Hand wash"
  }
}
```

## Category metafield value deleted

Event: `category_metafields/delete` · App scope: `read_products` · Staff permission: `products:write`

Fired when a category metafield value is deleted.

```json
{
  "category": {
    "id": 5,
    "name": "Apparel",
    "slug": "apparel"
  },
  "metafield": {
    "created_at": "2026-06-09T12:00:00-04:00",
    "definition": {
      "app_access": "shared",
      "app_id": "d6a26466-7903-4e2f-8fd7-7c59f3c8cd9a",
      "created_at": "2026-06-09T12:00:00-04:00",
      "description": "How to care for products in this category.",
      "id": "6b56de32-3f8c-4a25-a4cb-2d217ad7a8aa",
      "is_translatable": true,
      "key": "care",
      "max_list_items": null,
      "max_value_length": null,
      "merchant_access": "read_write",
      "name": "Care instructions",
      "namespace": "app:catalog-sync.details",
      "owner_type": "category",
      "sort_order": 0,
      "type": "string",
      "updated_at": "2026-06-09T12:00:00-04:00"
    },
    "display_value": null,
    "display_value_map": {},
    "updated_at": "2026-06-09T12:00:00-04:00",
    "value": "Hand wash"
  }
}
```

