CMS · banners
8 routes. Paths are relative to https://api.intersink.com/v1.
- GET/cms/channels/{channelId}/bannersList the channel's banners (all statuses)
- POST/cms/channels/{channelId}/bannersCreate a banner (draft by default)
- GET/cms/channels/{channelId}/banners/{bannerId}Get a banner with its images
- PATCH/cms/channels/{channelId}/banners/{bannerId}Update a banner (name, placement, window, status)
- DELETE/cms/channels/{channelId}/banners/{bannerId}Delete a banner and its images
- POST/cms/channels/{channelId}/banners/{bannerId}/imagesAdd an image/slide to a banner
- PATCH/cms/channels/{channelId}/banners/{bannerId}/images/{imageId}Update a banner image
- DELETE/cms/channels/{channelId}/banners/{bannerId}/images/{imageId}Delete a banner image
List the channel's banners (all statuses)
GET/cms/channels/{channelId}/banners
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 banner (draft by default)
POST/cms/channels/{channelId}/banners
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| placement | string | At most 60 characters. Example: "home-hero" |
| starts_at | string | Show from (ISO date-time) |
| ends_at | string | Show until (ISO date-time) |
| sort | number | Minimum 0, maximum 10000. |
| namerequired | string | At most 255 characters. Example: "Autumn sale" |
| status | string | One of: "draft", "published". |
Response
201. The payload in data is of type object.
Get a banner with its images
GET/cms/channels/{channelId}/banners/{bannerId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| bannerIdrequired | string, path |
Response
200. The payload in data is of type object.
Update a banner (name, placement, window, status)
PATCH/cms/channels/{channelId}/banners/{bannerId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| bannerIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| placement | string | At most 60 characters. Example: "home-hero" |
| starts_at | string | Show from (ISO date-time) |
| ends_at | string | Show until (ISO date-time) |
| sort | number | Minimum 0, maximum 10000. |
| name | string | At most 255 characters. |
| status | string | One of: "draft", "published", "archived". |
Response
200. The payload in data is of type object.
Delete a banner and its images
DELETE/cms/channels/{channelId}/banners/{bannerId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| bannerIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Add an image/slide to a banner
POST/cms/channels/{channelId}/banners/{bannerId}/images
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| bannerIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| title | string | At most 255 characters. |
| image | string | directus_files id |
| description | string | Rich text (sanitized server-side) At most 5000 characters. |
| link | string | Example: "/shop" |
| button_text | string | At most 60 characters. |
| sort | number | Minimum 0, maximum 10000. |
| status | string | One of: "draft", "published", "archived". |
Response
201. The payload in data is of type object.
Update a banner image
PATCH/cms/channels/{channelId}/banners/{bannerId}/images/{imageId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| bannerIdrequired | string, path | |
| imageIdrequired | number, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| title | string | At most 255 characters. |
| image | string | directus_files id |
| description | string | Rich text (sanitized server-side) At most 5000 characters. |
| link | string | Example: "/shop" |
| button_text | string | At most 60 characters. |
| sort | number | Minimum 0, maximum 10000. |
| status | string | One of: "draft", "published", "archived". |
Response
200. The payload in data is of type object.
Delete a banner image
DELETE/cms/channels/{channelId}/banners/{bannerId}/images/{imageId}
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path | |
| bannerIdrequired | string, path | |
| imageIdrequired | number, path |
Response
200. The payload in data is not described in the spec yet.