Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Patch collections

Bulk-patches collections. Successful entities are returned in data; per-item failures in errors.

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

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

Path parameters
team_slugstringrequired
app_slugstringrequired
Request body
requiredapplication/json
collectionsPatchCollectionItem[]required
min items 1 · max items 20
Show properties
Array of PatchCollectionItem
idUUIDrequired
titlestring
slugstring
statusstring
Allowed:activeinactivedraft
parent_idstring

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

Responses
200

Patched (partial success possible)

dataCollection[]required
Show properties
Array of Collection
idUUIDrequired
titlestringrequired
slugstringrequired
statusstringrequired
Allowed:activeinactivedraft
parent_idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
translationsCollectionTranslation | null
Show properties
Any of:
CollectionTranslation
titleTranslation[]
Show properties
Array of Translation
idUUID
localestring
valuestring
slugTranslation[]
null
null
redirectsRedirects[]
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
childrenCollection[]
Show properties
Array of Collection
Circular reference to Collection.
productsCollectionProductEntry[]
Show properties
Array of CollectionProductEntry
product_idUUIDrequired
sort_orderintegerrequired
created_atstring<date-time>required
updated_atstring<date-time> | null
uristring
errorsCollectionError[]required
Show properties
Array of CollectionError
idUUID | null
Show properties
Any of:
UUID
string<uuid>
null
null
slugstring
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/collections' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "collections": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "title": "string",
      "slug": "string",
      "status": "active",
      "parent_id": "string"
    }
  ]
}'
Response
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "title": "string",
      "slug": "string",
      "status": "active",
      "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
      "translations": {
        "title": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "locale": "string",
            "value": "string"
          }
        ],
        "slug": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "locale": "string",
            "value": "string"
          }
        ]
      },
      "redirects": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c",
          "type": "category",
          "old_slug": "string",
          "new_slug": "string",
          "locale": "string"
        }
      ],
      "children": [
        {}
      ],
      "products": [
        {
          "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
          "sort_order": 0
        }
      ],
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "uri": "string"
    }
  ],
  "errors": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "slug": "string",
      "message": "string"
    }
  ]
}