/merchants/{merchantCode}/campaigns (GET)
GET
/merchants/{merchantCode}/campaigns
Gets all the merchants campaigns
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
Query Parameters
Section titled “Query Parameters”filters
string
fields
string format: csv
Fields which should be included in the response. This field is optional. If the field is not set the default fields will be shown
sort
string
Sorting of the entity
limit
integer
The limit of entries of one page
offset
integer
The offset where to start the page
Responses
Section titled “Responses”Returns object containing property campaigns
Media typeapplication/json
object
campaigns
Array<object>
object
code
string
parentCampaignCode
string | null
name
string
triggerType
string
settings
object
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
customEventType
Required if eventType is “custom”. This property associate an campaign with the custom event triggered via the notification event receiver
string | null
startDate
string | null
endDate
string | null
timezone
string | null
triggerConditions
object | null
sendDate
string | null
scheduleType
string
timezone
string | null
description
string
templateCode
null | string
messages
object | null
delivery
object
methods
Array<object>
object
channel
required
string
settings
null | object
segmentCodes
Array<string | null> | null
segmentRules
null | object
actions
object
primary
required
object
type
required
string
parameters
object
tracking
object
addUTMToLinks
boolean
utmSource
string | null
utmMedium
string | null
utmCampaign
string | null
utmContent
string | null
status
string
processingStatus
string
metrics
Array<object>
object
channel
string
platform
string
locale
string
distributionIndex
number
sent
number
failed
number
skipped
number
dispatches
Array<object>
object
id
number
status
string
processed
number
skipped
number
failed
number
meta
object
limit
number
offset
number
totalItemCount
number
Example
{ "campaigns": [ { "code": "blackFridayCampaignPush", "parentCampaignCode": "blackFridayCampaignParentPush", "name": "Campaign for Black Friday Push", "description": "Open the category blackFriday with all our special offers", "triggerType": "schedule", "settings": { "sendDate": "2020-11-04T12:40:15.000Z", "timezone": "America/Chicago", "scheduleType": "scheduled" }, "delivery": { "methods": [ { "channel": "push", "settings": null } ] }, "templateCode": "blackFridayCampaignTemplate", "segmentCodes": [ "VIPCustomer" ], "segmentRules": null, "actions": { "primary": { "type": "engage:showCategory", "parameters": { "categoryCode": "blackFriday" } } }, "tracking": { "addUTMToLinks": false, "utmSource": null, "utmMedium": null, "utmCampaign": null, "utmContent": null } }, { "code": "openProductPage", "parentCampaignCode": "openProductPageParent", "name": "Campaign for to open a product", "description": "Campaign for to open a product", "triggerType": "schedule", "settings": { "sendDate": "2020-11-04T12:40:15.000Z", "timezone": "America/Chicago", "scheduleType": "scheduled" }, "delivery": { "methods": [ { "channel": "push", "settings": null } ] }, "templateCode": "blackFridayCampaignTemplate", "segmentCodes": null, "segmentRules": null, "actions": { "primary": { "type": "engage:showProduct", "parameters": { "productCode": "24-MB1" } } }, "tracking": { "addUTMToLinks": false, "utmSource": null, "utmMedium": null, "utmCampaign": null, "utmContent": null } }, { "code": "readyForPickupSMS", "parentCampaignCode": null, "name": "Ready for Pickup - SMS", "description": "Customer received an SMS if the order is ready for pickup", "triggerType": "event", "settings": { "eventType": "fulfillmentOrderStatusUpdated", "triggerConditions": { "$and": [ { "event.newStatus": { "$eq": "ready" } } ] } }, "delivery": { "methods": [ { "channel": "sms", "settings": null } ] }, "messages": { "en-us": [ { "title": "Good News! Your order is ready for pickup", "body": "Your order number is #{{event.fulfillmentOrder.orderNumber}} and will be held until {{date event.fulfillmentOrder.heldUntil format='MM/DD/YYYY HH:mm' }}.\n Thanks for shopping with your favorite store", "image": "https://myAwesomeShop.com/images/93bbe270-94d1-4234-92e7-762a82263e51.png", "imageType": "custom" } ] }, "tracking": { "addUTMToLinks": false, "utmSource": null, "utmMedium": null, "utmCampaign": null, "utmContent": null } }, { "code": "customEventGoldStatusReached", "parentCampaignCode": null, "name": "Custom Event - Gold Status Reached", "description": "Triggered when a customer receives the gold status", "triggerType": "event", "settings": { "eventType": "custom", "customEventType": "goldStatusReached" }, "delivery": { "methods": [ { "channel": "sms", "settings": null } ] }, "messages": { "en-us": [ { "title": "Good News! You're a gold member now", "body": "Hi {{customer.firstName}}, with your loyalty card {{customParameters.cardNumber}} you reached the gold member status", "image": "https://myAwesomeShop.com/images/gold.png", "imageType": "custom" } ] }, "tracking": { "addUTMToLinks": false, "utmSource": null, "utmMedium": null, "utmCampaign": null, "utmContent": null } } ]}
