Patch collections
# Patch collections
Bulk-patches collections. Successful entities are returned in data; per-item failures in errors.
PATCH
/api/v2/{team_slug}/{app_slug}/collections
PurposeBulk-patches collections.
Required inputsNone documented
Primary response200 ยท Patched (partial success possible)
Operation keymanagement-api:PATCH:/api/v2/{team_slug}/{app_slug}/collections
## API ownership
- API family: Management API
- Best for: Trusted back-office workflows that create, update, organize, or delete merchant-owned data.
- Do not use from: Browser-only storefront code or public clients.
- Guide route: [/apis/management/latest](/apis/management/latest)
The OpenAPI contract defines the method, path, parameters, request body, and responses for this operation.
## Operation
- Method: `PATCH`
- Path: `/api/v2/{team_slug}/{app_slug}/collections`
- Summary: Patch collections
- Description: Bulk-patches collections. Successful entities are returned in data; per-item failures in errors.
- OpenAPI contract:
management-api
- Operation ID: patchCollections
- Stable operation key: `management-api:PATCH:/api/v2/{team_slug}/{app_slug}/collections`
## Parameters
| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| Not documented in the OpenAPI contract. | Not documented in the OpenAPI contract. | No | any | Not documented in the OpenAPI contract. |
| Not documented in the OpenAPI contract. | Not documented in the OpenAPI contract. | No | any | Not documented in the OpenAPI contract. |
## Request body
- Required: Yes
- Description: Not documented in the OpenAPI contract.
- Content: application/json (object)
### Patch Collections Request
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `collections` | object[] | Yes | minItems: 1, maxItems: 20 |
#### Patch Collection Item
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `id` | string | Yes | - |
| `title` | string | No | - |
| `slug` | string | No | - |
| `status` | enum("active", "inactive", "draft") | No | - |
| `parent_id` | string | No | nil = unchanged, "" = move to root, otherwise a uuid |
**Generated example (synthetic):**
```json
{
"collections": [
{
"id": "string",
"title": "string",
"slug": "string",
"status": "active",
"parent_id": "string"
}
]
}
```
## Responses
| Status | Description | Content |
| --- | --- | --- |
| 200 | Patched (partial success possible) | application/json (object) |
| 400 | Request-level failure | application/json (object) |
| 401 | Request-level failure | application/json (object) |
| 403 | Request-level failure | application/json (object) |
| 500 | Request-level failure | application/json (object) |
### 200 - object
#### Collections Bulk
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `data` | object[] | Yes | - |
| `errors` | object[] | Yes | - |
##### Collection
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `id` | string (uuid) | Yes | format: uuid |
| `title` | string | Yes | - |
| `slug` | string | Yes | - |
| `status` | enum("active", "inactive", "draft") | Yes | - |
| `parent_id` | string | No | - |
| `translations` | object | No | - |
| `redirects` | object[] | No | - |
| `children` | object[] | No | - |
| `products` | object[] | No | - |
| `created_at` | string (date-time) | Yes | format: date-time |
| `updated_at` | string (date-time) | No | format: date-time |
| `uri` | string | No | - |
##### Collection Translation
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `title` | object[] | No | - |
| `slug` | object[] | No | - |
##### Redirects
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `id` | string (uuid) | No | format: uuid |
| `item_id` | string | No | - |
| `type` | enum("category", "collection", "page", "product", "product_bundle") | No | - |
| `old_slug` | string | No | - |
| `new_slug` | string | No | - |
| `locale` | string | No | - |
##### Collection Product Entry
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `product_id` | string (uuid) | Yes | format: uuid |
| `sort_order` | integer | Yes | - |
##### Collection Error
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `id` | string | No | - |
| `slug` | string | No | - |
| `message` | string | Yes | - |
Generated example (synthetic)
```json
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"title": "string",
"slug": "string",
"status": "active",
"parent_id": "string",
"translations": {
"title": [],
"slug": []
},
"redirects": [
{
"id": null,
"item_id": null,
"type": null,
"old_slug": null,
"new_slug": null,
"locale": null
}
],
"children": [
{
"id": null,
"title": null,
"slug": null,
"status": null,
"parent_id": null,
"translations": null,
"redirects": null,
"children": null,
"products": null,
"created_at": null,
"updated_at": null,
"uri": null
}
],
"products": [
{
"product_id": null,
"sort_order": null
}
],
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"uri": "string"
}
],
"errors": [
{
"id": "string",
"slug": "string",
"message": "string"
}
]
}
```
### 400 - object
#### Error
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `error` | object | Yes | - |
##### Error Body
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | Yes | - |
| `details` | string[] | Yes | - |
**Generated example (synthetic):**
```json
{
"error": {
"message": "string",
"details": [
"string"
]
}
}
```
### 401 - object
#### Error
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `error` | object | Yes | - |
##### Error Body
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | Yes | - |
| `details` | string[] | Yes | - |
**Generated example (synthetic):**
```json
{
"error": {
"message": "string",
"details": [
"string"
]
}
}
```
### 403 - object
#### Error
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `error` | object | Yes | - |
##### Error Body
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | Yes | - |
| `details` | string[] | Yes | - |
**Generated example (synthetic):**
```json
{
"error": {
"message": "string",
"details": [
"string"
]
}
}
```
### 500 - object
#### Error
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `error` | object | Yes | - |
##### Error Body
| Property | Type | Required | Details |
| --- | --- | --- | --- |
| `message` | string | Yes | - |
| `details` | string[] | Yes | - |
**Generated example (synthetic):**
```json
{
"error": {
"message": "string",
"details": [
"string"
]
}
}
```
## Contract identity
Use these fields to confirm you are implementing the intended endpoint contract.
- API family: Management API
- Method: `PATCH`
- Path: `/api/v2/{team_slug}/{app_slug}/collections`
- Operation ID: patchCollections
- Stable operation key: `management-api:PATCH:/api/v2/{team_slug}/{app_slug}/collections`
- OpenAPI tag: Collections V2
- OpenAPI summary: Patch collections