API Endpoints
API Endpoints
The request body can contain any JSON object.
Call Template
POST /integration/<INTEGRATION ID>/event{?subtype=<subtypeName>}
Example of sent event:
{
"id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"xx",
"first":"firstval",
"second":"secondval"
}
Response: HTTP status code
Examples
POST /integration/<INTEGRATION ID>/event?subtype=user
Example of sent event:
{
"id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"user",
"data":"{
"email":"user@mapp.com",
"group":"2324333335",
"params":"{
"first":"firstval",
"second":"secondval"
}"
}",
}
Response: HTTP status code
POST /integration/<INTEGRATION ID>/event?subtype=user
FLAG: 'delete'
Example of sent event:
{
"id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"user",
"data":"{
"email":"user@mapp.com",
"group":"2324333335",
"delete":"true"
}
Response: HTTP status code
POST /integration/<INTEGRATION ID>/event?subtype=sms
MessageId is the ID of the prepared message. You can use 'email', 'recipientMobileNumber' or 'recipientId' as an identifier.
Example of sent event:
{
"id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"sms",
"data":"{
"recipientMobileNumber":"+48666777888",
"messageId":"2324333335",
"param1":"param 1 value"
}
Response: HTTP status code
Example of payload that the API can accept:
{"recipientMobileNumber":"+48666777888","messageId":"2324333335","param1":"param 1 value"} |
POST /integration/<INTEGRATION ID>/event?subtype=push
'pushMessageId' is an ID of push message template (not the campaign), 'mobileAppId' refers to the app that should be used, 'email' is used as user identifier.
Example of sent event:
{
"id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"push",
"data":"{
"email":"john.smith@xx.xx",
"pushMessageId":"1234",
"mobileAppId":"5678",
"param1":"param 1 value"
}
Response: HTTP status code
Example of payload that the API can accept:
{"email":"john.doe@xx.xx","pushMessageId":"1234","mobileAppId":"5678","param1":"param 1 value"} |
POST /integration/<INTEGRATION ID>/event?subtype=email
MessageId is the ID of the prepared message.
Example event sent:
{
"id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"email",
"data":"{
"email":"user@mapp.com",
"messageId":"2324333335",
"params":"{
"first":"firstval",
"second":"secondval"
}"
}",
}
Response: HTTP status code
POST /integration/<INTEGRATION ID>/event?subtype=email
MessageId it's an ID of the prepared message.
Example event sent:
{
"id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"email",
"data":"{
"group":"12",
"messageId":"2324333335",
"params":"{
"first":"firstval",
"second":"secondval"
}"
}",
}
This call sends a transactional email and stores transaction (order) details in Transactional Related Data.
POST /integration/<INTEGRATION ID>/event?subtype=transaction
MessageId is the ID of the prepared message.
Example event sent:
{
"id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"transaction",
"data":"{
"email":"user@mapp.com",
"messageId":"2324333335",
"items":[{"sku":"JB-129","name":"Dungen-H","price":"15","qty_ordered":"1"}],
"group":"1200073880",
"orderId":"1012",
"transaction_date": "2020-04-28T12:30:08.537Z",
"currency":"GBP"
}",
}
POST /integration/<INTEGRATION ID>/event?subtype=transaction
MessageId is the ID of the prepared message.
Example event sent:
{
"id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"transaction",
"data":"{
"email":"user@mapp.com",
"items":[{"sku":"JB-129","name":"Dungen-H","price":"15","qty_ordered":"1"}],
"group":"1200073880",
"orderId":"1012",
"transaction_date": "2020-04-28T12:30:08.537Z",
"currency":"GBP"
}",
}
This call adds a new product to Product Catalog.
POST /integration/<INTEGRATION ID>/event?subtype=product
Example event sent:
{ "id":"6d329d9b-201a-4188-a429-7e45d9a674a8",
"timestamp":1555401662153,
"integrationId":"47291122-e5bb-4865-a107-a68ec9957325",
"type":"Import",
"subtype":"product",
{
"productSKU":"12345678",
"productName":"testproduct",
"productPrice":"10.5",
"stockTotal":"20000",
"productURL":"https://mapppartneruk.myvtex.com/testproduct/p",
"imageURL":"https://mapppartneruk.vteximg.com.br/arquivos/ids/155397-55-55/mapp.png?v=637771525123470000",
"zoomImageURL":"https://mapppartneruk.vteximg.com.br/arquivos/ids/155397-55-55/mapp.png?v=637771525123470000",
"brand":"Brand",
"category":"Test Category",
"description":"Addition"
}
}