Skip to content

/merchants/{merchantCode}/templates (POST)

POST
/merchants/{merchantCode}/templates

Creates multiple templates

merchantCode
required
string
Media typeapplication/json
object
templates
Array<object>
object
code
required
null | string
>= 1 characters <= 255 characters
Example
TEMPLATE1
name
required
string
>= 1 characters <= 255 characters
Example
Our great template
triggerType
required
string
Allowed values: event other
eventType

Only needed if type is event. With the option “custom” you can listen to custom events from external systems. If custom is set the property “customEventType” must be set

string
Allowed values: fulfillmentOrderUpdated fulfillmentOrderStatusUpdated orderNotPickedUp salesOrderAdded salesOrderFulfillmentAdded schedulePickupReminderTimeReached cartReminderTimeReached inactiveDeviceTimeReached returnOrderAdded returnOrderStatusUpdated productInventoryRestocked custom
description
string
Example
description of the entity
messages
required
object
key
additional properties
Array
object
title
required
string
<= 255 characters
Example
TheTitle
body
required
string
Example
BodyBodyBody
image
string | null
<= 255 characters
Example
http://url
imageType
string
Allowed values: custom externalUrl product
Example
custom
shared
number
default: 1
Example
1
status
string
default: active
Allowed values: active inactive

Successfully created

Media typeapplication/json
object
errors
Array<object>
object
code
string
entity
string
entityId
string
reason
string
subentityPath
Array<string | number>
Example
{
"errors": [
{
"code": 400,
"entity": "planet",
"entityId": "pluto",
"reason": "Planet pluto was not found (did you mean dwarf planet pluto?)"
}
]
}

Validation error

Media typeapplication/json
object
message
string
code
string
error
object
paramName

The parameter-field, that failed to validate, like “userId”

string
paramValue

The value, that was sent, like “xxx”

code

Machine readable error code

string
Allowed values: SCHEMA_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 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 UNKNOWN_FORMAT PATTERN
message

Human readable error code

string
description
string
path
Array<string>
warnings
array
Example
{
"error": {
"code": "SCHEMA_VALIDATION_FAILED",
"results": {
"errors": [
{
"code": "ENUM_MISMATCH",
"description": "human readable error code"
}
]
}
}
}

Merchant not found

Media typeapplication/json
object
code

Machine readable error code

string
message
required

Human readable error code

string
Examplegenerated
{
"code": "example",
"message": "example"
}