CMS · collections
4 routes. Paths are relative to https://api.intersink.com/v1.
- GET/cms/channels/{channelId}/collectionsList the channel's collections with product counts
- POST/cms/channels/{channelId}/collectionsCreate a collection
- PATCH/cms/channels/{channelId}/collections/{id}Edit a collection
- DELETE/cms/channels/{channelId}/collections/{id}Delete a collection (products stay; children move to the root)
List the channel's collections with product counts
GET/cms/channels/{channelId}/collections
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| page | number, query | Minimum 1. |
| limit | number, query | Minimum 1, maximum 100. |
| status | string, query | One of: "draft", "published", "archived". |
| q | string, query | Search in the title/name |
Response
200. The payload in data is not described in the spec yet.
Create a collection
POST/cms/channels/{channelId}/collections
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| Idempotency-Key | string, header | Optional client-generated key (8-128 chars, [A-Za-z0-9_-]). A retry with the same key and body replays the first response (Idempotent-Replayed: true); 409 while the first is in flight; 422 if the body differs. |
Request body application/json
| Field | Type | Description |
|---|---|---|
| namerequired | string | At most 120 characters. Example: "Electronics" |
| description | string | At most 2000 characters. |
| parent_id | string | Parent collection of the same channel |
| status | string | One of: "published", "draft". |
Response
201. The payload in data is not described in the spec yet.
Edit a collection
PATCH/cms/channels/{channelId}/collections/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| idrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| name | string | At most 120 characters. |
| description | string | At most 2000 characters. |
| parent_id | string | |
| status | string | One of: "published", "draft". |
Response
200. The payload in data is not described in the spec yet.
Delete a collection (products stay; children move to the root)
DELETE/cms/channels/{channelId}/collections/{id}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| idrequired | string, path |
Response
200. The payload in data is not described in the spec yet.