Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Update categories

Bulk-patches categories by id. Parent cycles are rejected like v2 collections.

PATCH/api/v2/{team_slug}/{app_slug}/categories
Authorization
AuthorizationBearer token · headerrequired

Management API token, sent as Authorization: Bearer <token>.

Path parameters
team_slugstringrequired
app_slugstringrequired
Request body
requiredapplication/json
categoriesPatchCategoryItem[]required
min items 1 · max items 20
Show properties
Array of PatchCategoryItem
idUUIDrequired
namestring
slugstring
statusstring
descriptionstring
meta_titlestring
meta_descriptionstring
google_product_category_idstring
sort_orderinteger
parent_idstring

nil = unchanged, "" = move to root, otherwise a uuid

Responses
200

Patched (partial success possible)

dataCategory[]required
Show properties
Array of Category
idUUIDrequired
namestringrequired
slugstringrequired
uristring | null
statusstringrequired
descriptionstring
seoCategorySEO | null
Show properties
Any of:
CategorySEO
meta_titlestring
meta_descriptionstring
null
null
parent_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
sort_orderinteger
cover_urlstring
google_product_category_idstring | null
translationsCategoryTranslation | null
Show properties
Any of:
CategoryTranslation
slugTranslation[]
Show properties
Array of Translation
idUUID
localestring
valuestring
nameTranslation[]
descriptionTranslation[]
meta_titleTranslation[]
meta_descriptionTranslation[]
null
null
childrenCategory[] | null
Show properties
Array of Category
Circular reference to Category.
redirectsRedirects[] | null
Show properties
Array of Redirects
idUUID
item_idUUID | null
Show properties
Any of:
UUID
UUID
null
null
typestring
Allowed:categorycollectionpageproductproduct_bundle
old_slugstring
new_slugstring
localestring
attributesCategoryAttribute[] | null
Show properties
Array of CategoryAttribute
idUUIDrequired
keystringrequired
namestring | null
created_atstring<date-time>required
updated_atstring<date-time> | null
errorsCategoryError[]required
Show properties
Array of CategoryError
slugstring
parent_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
messagestringrequired
400

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
401

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
403

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
500

Request-level failure

errorErrorBodyrequired
Show properties
messagestringrequired
detailsstring[]required
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH 'https://api.enad.io/api/v2/string/string/categories' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "categories": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "slug": "string",
      "status": "string",
      "description": "string",
      "meta_title": "string",
      "meta_description": "string",
      "google_product_category_id": "string",
      "sort_order": 0,
      "parent_id": "string"
    }
  ]
}'
Response
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "slug": "string",
      "uri": "string",
      "status": "string",
      "description": "string",
      "seo": {
        "meta_title": "string",
        "meta_description": "string"
      },
      "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
      "sort_order": 0,
      "cover_url": "string",
      "google_product_category_id": "string",
      "translations": {
        "slug": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "locale": "string",
            "value": "string"
          }
        ],
        "name": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "locale": "string",
            "value": "string"
          }
        ],
        "description": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "locale": "string",
            "value": "string"
          }
        ],
        "meta_title": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "locale": "string",
            "value": "string"
          }
        ],
        "meta_description": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "locale": "string",
            "value": "string"
          }
        ]
      },
      "children": [
        {}
      ],
      "redirects": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c",
          "type": "category",
          "old_slug": "string",
          "new_slug": "string",
          "locale": "string"
        }
      ],
      "attributes": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "key": "string",
          "name": "string"
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "errors": [
    {
      "slug": "string",
      "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "message": "string"
    }
  ]
}