Create New Pages
POST
/merchants/{merchantCode}/shops/{shopCode}/pages
const url = 'https://cms.shopgate.io/v1/merchants/example/shops/example/pages';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"pages":[{"code":"8b2802a6-ab0e-4310-97d4-096ae8b3610f","name":"example","pageTitle":{"en-us":"string in english","de-de":"Zeichenkette auf Deutsch"},"slug":"example","type":"cms","isFavorite":false,"isProtected":false,"dropzones":{"cmsWidgetList":[{"code":"8b2802a6-ab0e-4310-97d4-096ae8b3610f","widgetConfigDefinitionCode":"8b2802a6-ab0e-4310-97d4-096ae8b3610f","widgetConfig":{},"visibility":{"isHidden":false,"scheduleStartDate":"2018-12-12T14:27:23.114Z","scheduleEndDate":"2018-12-12T14:27:23.114Z"},"layout":{"marginTop":1,"marginBottom":1,"marginLeft":1,"marginRight":1}}]}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://cms.shopgate.io/v1/merchants/example/shops/example/pages \ --header 'Content-Type: application/json' \ --data '{ "pages": [ { "code": "8b2802a6-ab0e-4310-97d4-096ae8b3610f", "name": "example", "pageTitle": { "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch" }, "slug": "example", "type": "cms", "isFavorite": false, "isProtected": false, "dropzones": { "cmsWidgetList": [ { "code": "8b2802a6-ab0e-4310-97d4-096ae8b3610f", "widgetConfigDefinitionCode": "8b2802a6-ab0e-4310-97d4-096ae8b3610f", "widgetConfig": {}, "visibility": { "isHidden": false, "scheduleStartDate": "2018-12-12T14:27:23.114Z", "scheduleEndDate": "2018-12-12T14:27:23.114Z" }, "layout": { "marginTop": 1, "marginBottom": 1, "marginLeft": 1, "marginRight": 1 } } ] } } ] }'Bulk-creates one or more new CMS pages. Requires a unique slug and page code for each entry.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
shopCode
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
pages
required
Array<object>
object
code
required
Code of the entity
string
Example
8b2802a6-ab0e-4310-97d4-096ae8b3610fname
required
string
pageTitle
Localization object, see Entity Localization for further information.
object
key
additional properties
null | string
Example
{ "en-us": "string in english", "de-de": "Zeichenkette auf Deutsch"}slug
required
string
type
required
string
isFavorite
boolean
isProtected
boolean
dropzones
required
object
cmsWidgetList
Array<object>
object
code
required
Code of the entity
string
Example
8b2802a6-ab0e-4310-97d4-096ae8b3610fwidgetConfigDefinitionCode
required
Code of the entity
string
Example
8b2802a6-ab0e-4310-97d4-096ae8b3610fwidgetConfig
required
object
key
additional properties
any
visibility
required
object
isHidden
boolean
scheduleStartDate
required
null | string format: date-time
Example
2018-12-12T14:27:23.114ZscheduleEndDate
required
null | string format: date-time
Example
2018-12-12T14:27:23.114Zlayout
required
object
marginTop
required
number | null
marginBottom
required
number | null
marginLeft
required
number | null
marginRight
required
number | null
Responses
Section titled “Responses”Create pages response
Media typeapplication/json
object
Examplegenerated
{}Validation error or config validation error
Media typeapplication/json
object
code
Machine readable error code
string
message
Human readable error code
string
validationErrors
Array<object>
object
code
string
reason
string
entity
string
entityId
string
entityIndex
number
subentityPath
Array<string | number>
statusCode
number
message
string
code
string
additionalInfo
object
validationErrors
Array<object>
object
code
number
reason
string
entity
string
entityId
string
subentityPath
Array<string | number>
error
object
paramName
The parameter-field, that failed to validate, like “userId”
string
paramValue
The value, that was sent, like “xxx”
null | string | number | array | object
code
Machine readable error code
string
message
required
Human readable error code
string
results
object
errors
Array<object>
object
code
Machine readable error code
string
message
Human readable error code
string
description
string
path
Array<string>
warnings
array
Example
{ "error": { "code": "SCHEMA_VALIDATION_FAILED", "results": { "errors": [ { "code": "MAX_LENGTH", "message": "Name too long", "description": "Property Name is too long", "path": [ "name" ] } ] } }}Resource not found
Media typeapplication/json
object
statusCode
number
code
required
string
message
required
string
Example
{ "code": "NotFound", "message": "Merchant not found"}
