Skip to content

Update Page Draft

POST
/merchants/{merchantCode}/shops/{shopCode}/pages/{pageCode}
curl --request POST \
--url https://cms.shopgate.io/v1/merchants/example/shops/example/pages/example \
--header 'Content-Type: application/json' \
--data '{ "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 } } ] } }'

Updates the current page draft. Does not affect the live site until published.

merchantCode
required
string
<= 255 characters
shopCode
required
string
<= 255 characters
pageCode
required
string
<= 255 characters
Media typeapplication/json
object
name
string
>= 1 characters <= 255 characters
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
string
>= 1 characters <= 255 characters
type
string
Allowed values: cms
isFavorite
boolean
isProtected
boolean
dropzones
object
cmsWidgetList
Array<object>
object
code
required

Code of the entity

string
>= 1 characters <= 255 characters
Example
8b2802a6-ab0e-4310-97d4-096ae8b3610f
widgetConfigDefinitionCode
required

Code of the entity

string
>= 1 characters <= 255 characters
Example
8b2802a6-ab0e-4310-97d4-096ae8b3610f
widgetConfig
required
object
key
additional properties
any
visibility
required
object
isHidden
boolean
scheduleStartDate
required
null | string format: date-time
Example
2018-12-12T14:27:23.114Z
scheduleEndDate
required
null | string format: date-time
Example
2018-12-12T14:27:23.114Z
layout
required
object
marginTop
required
number | null
marginBottom
required
number | null
marginLeft
required
number | null
marginRight
required
number | null

Update next page response

Media typeapplication/json

Validation error

Media typeapplication/json
object
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
Allowed values: SCHEMA_VALIDATION_FAILED VALIDATION_FAILED ENUM_MISMATCH MAXIMUM MAXIMUM_EXCLUSIVE MINIMUM MINIMUM_EXCLUSIVE MULTIPLE_OF ARRAY_LENGTH_LONG ARRAY_LENGTH_SHORT ARRAY_ADDITIONAL_ITEMS ARRAY_UNIQUE MAX_LENGTH MIN_LENGTH MAX_PROPERTIES MIN_PROPERTIES OBJECT_MISSING_REQUIRED_PROPERTY OBJECT_PROPERTIES_MAXIMUM OBJECT_PROPERTIES_MINIMUM OBJECT_ADDITIONAL_PROPERTIES OBJECT_DEPENDENCY_KEY ONE_OF_MISSING ONE_OF_MULTIPLE NOT_PASSED INVALID_FORMAT INVALID_TYPE UNKNOWN_FORMAT PATTERN REQUIRED
message
required

Human readable error code

string
results
object
errors
Array<object>
object
code

Machine readable error code

string
Allowed values: ENUM_MISMATCH MAXIMUM MAXIMUM_EXCLUSIVE MINIMUM MINIMUM_EXCLUSIVE MULTIPLE_OF ARRAY_LENGTH_LONG ARRAY_LENGTH_SHORT ARRAY_ADDITIONAL_ITEMS ARRAY_UNIQUE MAX_LENGTH MIN_LENGTH MAX_PROPERTIES MIN_PROPERTIES OBJECT_MISSING_REQUIRED_PROPERTY OBJECT_PROPERTIES_MAXIMUM OBJECT_PROPERTIES_MINIMUM OBJECT_ADDITIONAL_PROPERTIES OBJECT_DEPENDENCY_KEY ONE_OF_MISSING ONE_OF_MULTIPLE NOT_PASSED INVALID_FORMAT INVALID_CREDENTIALS INVALID_TYPE UNKNOWN_FORMAT PATTERN REQUIRED
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"
}