Publish Page Draft
POST
/merchants/{merchantCode}/shops/{shopCode}/pages/{pageCode}/publish
const url = 'https://cms.shopgate.io/v1/merchants/example/shops/example/pages/example/publish';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"description":"example"}'};
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/example/publish \ --header 'Content-Type: application/json' \ --data '{ "description": "example" }'Takes the current draft and makes it the “Live” version. Allows for an optional description to track changes in the version history.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
shopCode
required
string
pageCode
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
description
string
Examplegenerated
{ "description": "example"}Responses
Section titled “Responses”Publish 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
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"}
