Schemas for notifications (1.0.0)
Download OpenAPI specification:Download
Use the notifications to notify the system of your choice of certain changes that happened in your Application.
Campaign created Webhook
Request Body schema: application/json
The notification indicating a campaign was created.
campaign required | string Enum: "expired" "scheduled" "running" "draft" "disabled" A campaign state described exactly as in the Campaign Manager. |
required | object The campaign priority. |
ruleset | string The current ruleset. |
Request samples
- Payload
{- "campaign": "running",
- "ruleset": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "userId": 0,
- "rules": [
- {
- "title": "Give discount via coupon",
- "description": "Creates a discount when a coupon is valid",
- "bindings": [
- {
- "name": "my property",
- "type": "templateParameter",
- "expression": [ ],
- "valueType": "string"
}
], - "condition": [
- "and",
- [
- "couponValid"
]
], - "effects": [
- "catch",
- [
- "noop"
], - [
- "setDiscount",
- "10% off",
- [
- "*",
- [
- ".",
- "Session",
- "Total"
], - [
- "/",
- 10,
- 100
]
]
]
]
}
], - "bindings": [ ],
- "rbVersion": "v2",
- "activate": true,
- "campaignId": 320,
- "templateId": 3,
- "activatedAt": "2019-08-24T14:15:22Z"
}, - "priority": {
- "set": "universal",
- "position": 1
}
}
Campaign state changed Webhook
Request Body schema: application/json
The notification indicating the state of a campaign changed.
required | object The campaign whose state changed. |
newState required | string The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] |
oldState required | string The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] |
ruleset | string The current ruleset. |
Request samples
- Payload
{- "campaign": {
- "id": 0,
- "created": "2019-08-24T14:15:22Z",
- "applicationId": 322,
- "userId": 0,
- "name": "Summer promotions",
- "description": "Campaign for all summer 2021 promotions",
- "startTime": "2021-07-20T22:00:00Z",
- "endTime": "2021-09-22T22:00:00Z",
- "attributes": { },
- "state": "enabled",
- "activeRulesetId": 0,
- "tags": [
- "summer"
], - "features": [
- "coupons",
- "referrals"
], - "couponSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "referralSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "campaignGroups": [
- 1,
- 3
], - "couponRedemptionCount": 163,
- "referralRedemptionCount": 3,
- "discountCount": 288,
- "discountEffectCount": 343,
- "couponCreationCount": 16,
- "customEffectCount": 0,
- "referralCreationCount": 8,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 9,
- "createdLoyaltyPointsCount": 9,
- "createdLoyaltyPointsEffectCount": 2,
- "redeemedLoyaltyPointsCount": 8,
- "redeemedLoyaltyPointsEffectCount": 9,
- "callApiEffectCount": 0,
- "lastActivity": "2022-11-10T23:00:00Z",
- "updated": "2022-10-97T35:00:00Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}, - "ruleset": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "userId": 0,
- "rules": [
- {
- "title": "Give discount via coupon",
- "description": "Creates a discount when a coupon is valid",
- "bindings": [
- {
- "name": "my property",
- "type": "templateParameter",
- "expression": [ ],
- "valueType": "string"
}
], - "condition": [
- "and",
- [
- "couponValid"
]
], - "effects": [
- "catch",
- [
- "noop"
], - [
- "setDiscount",
- "10% off",
- [
- "*",
- [
- ".",
- "Session",
- "Total"
], - [
- "/",
- 10,
- 100
]
]
]
]
}
], - "bindings": [ ],
- "rbVersion": "v2",
- "activate": true,
- "campaignId": 320,
- "templateId": 3,
- "activatedAt": "2019-08-24T14:15:22Z"
}, - "oldState": "string",
- "newState": "string"
}
Campaign rules changed Webhook
Request Body schema: application/json
The notification indicating the rules of a campaign changed.
required | object The current version of the campaign. |
ruleset required | string The current ruleset. |
oldRuleset | string The old ruleset, if the ruleset was changed. |
Request samples
- Payload
{- "campaign": {
- "id": 0,
- "created": "2019-08-24T14:15:22Z",
- "applicationId": 322,
- "userId": 0,
- "name": "Summer promotions",
- "description": "Campaign for all summer 2021 promotions",
- "startTime": "2021-07-20T22:00:00Z",
- "endTime": "2021-09-22T22:00:00Z",
- "attributes": { },
- "state": "enabled",
- "activeRulesetId": 0,
- "tags": [
- "summer"
], - "features": [
- "coupons",
- "referrals"
], - "couponSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "referralSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "campaignGroups": [
- 1,
- 3
], - "couponRedemptionCount": 163,
- "referralRedemptionCount": 3,
- "discountCount": 288,
- "discountEffectCount": 343,
- "couponCreationCount": 16,
- "customEffectCount": 0,
- "referralCreationCount": 8,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 9,
- "createdLoyaltyPointsCount": 9,
- "createdLoyaltyPointsEffectCount": 2,
- "redeemedLoyaltyPointsCount": 8,
- "redeemedLoyaltyPointsEffectCount": 9,
- "callApiEffectCount": 0,
- "lastActivity": "2022-11-10T23:00:00Z",
- "updated": "2022-10-97T35:00:00Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}, - "oldRuleset": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "userId": 0,
- "rules": [
- {
- "title": "Give discount via coupon",
- "description": "Creates a discount when a coupon is valid",
- "bindings": [
- {
- "name": "my property",
- "type": "templateParameter",
- "expression": [ ],
- "valueType": "string"
}
], - "condition": [
- "and",
- [
- "couponValid"
]
], - "effects": [
- "catch",
- [
- "noop"
], - [
- "setDiscount",
- "10% off",
- [
- "*",
- [
- ".",
- "Session",
- "Total"
], - [
- "/",
- 10,
- 100
]
]
]
]
}
], - "bindings": [ ],
- "rbVersion": "v2",
- "activate": true,
- "campaignId": 320,
- "templateId": 3,
- "activatedAt": "2019-08-24T14:15:22Z"
}, - "ruleset": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "userId": 0,
- "rules": [
- {
- "title": "Give discount via coupon",
- "description": "Creates a discount when a coupon is valid",
- "bindings": [
- {
- "name": "my property",
- "type": "templateParameter",
- "expression": [ ],
- "valueType": "string"
}
], - "condition": [
- "and",
- [
- "couponValid"
]
], - "effects": [
- "catch",
- [
- "noop"
], - [
- "setDiscount",
- "10% off",
- [
- "*",
- [
- ".",
- "Session",
- "Total"
], - [
- "/",
- 10,
- 100
]
]
]
]
}
], - "bindings": [ ],
- "rbVersion": "v2",
- "activate": true,
- "campaignId": 320,
- "templateId": 3,
- "activatedAt": "2019-08-24T14:15:22Z"
}
}
Campaign edited Webhook
Request Body schema: application/json
The notification indicating a campaign was edited.
required | object The current version of the campaign. |
required | object The campaign before it was edited. |
ruleset | string The current ruleset. |
Request samples
- Payload
{- "campaign": {
- "id": 0,
- "created": "2019-08-24T14:15:22Z",
- "applicationId": 322,
- "userId": 0,
- "name": "Summer promotions",
- "description": "Campaign for all summer 2021 promotions",
- "startTime": "2021-07-20T22:00:00Z",
- "endTime": "2021-09-22T22:00:00Z",
- "attributes": { },
- "state": "enabled",
- "activeRulesetId": 0,
- "tags": [
- "summer"
], - "features": [
- "coupons",
- "referrals"
], - "couponSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "referralSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "campaignGroups": [
- 1,
- 3
], - "couponRedemptionCount": 163,
- "referralRedemptionCount": 3,
- "discountCount": 288,
- "discountEffectCount": 343,
- "couponCreationCount": 16,
- "customEffectCount": 0,
- "referralCreationCount": 8,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 9,
- "createdLoyaltyPointsCount": 9,
- "createdLoyaltyPointsEffectCount": 2,
- "redeemedLoyaltyPointsCount": 8,
- "redeemedLoyaltyPointsEffectCount": 9,
- "callApiEffectCount": 0,
- "lastActivity": "2022-11-10T23:00:00Z",
- "updated": "2022-10-97T35:00:00Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}, - "oldCampaign": {
- "id": 0,
- "created": "2019-08-24T14:15:22Z",
- "applicationId": 322,
- "userId": 0,
- "name": "Summer promotions",
- "description": "Campaign for all summer 2021 promotions",
- "startTime": "2021-07-20T22:00:00Z",
- "endTime": "2021-09-22T22:00:00Z",
- "attributes": { },
- "state": "enabled",
- "activeRulesetId": 0,
- "tags": [
- "summer"
], - "features": [
- "coupons",
- "referrals"
], - "couponSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "referralSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "campaignGroups": [
- 1,
- 3
], - "couponRedemptionCount": 163,
- "referralRedemptionCount": 3,
- "discountCount": 288,
- "discountEffectCount": 343,
- "couponCreationCount": 16,
- "customEffectCount": 0,
- "referralCreationCount": 8,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 9,
- "createdLoyaltyPointsCount": 9,
- "createdLoyaltyPointsEffectCount": 2,
- "redeemedLoyaltyPointsCount": 8,
- "redeemedLoyaltyPointsEffectCount": 9,
- "callApiEffectCount": 0,
- "lastActivity": "2022-11-10T23:00:00Z",
- "updated": "2022-10-97T35:00:00Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}, - "ruleset": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "userId": 0,
- "rules": [
- {
- "title": "Give discount via coupon",
- "description": "Creates a discount when a coupon is valid",
- "bindings": [
- {
- "name": "my property",
- "type": "templateParameter",
- "expression": [ ],
- "valueType": "string"
}
], - "condition": [
- "and",
- [
- "couponValid"
]
], - "effects": [
- "catch",
- [
- "noop"
], - [
- "setDiscount",
- "10% off",
- [
- "*",
- [
- ".",
- "Session",
- "Total"
], - [
- "/",
- 10,
- 100
]
]
]
]
}
], - "bindings": [ ],
- "rbVersion": "v2",
- "activate": true,
- "campaignId": 320,
- "templateId": 3,
- "activatedAt": "2019-08-24T14:15:22Z"
}
}
Campaign deleted Webhook
Request Body schema: application/json
The notification indicating a campaign was deleted.
required | object The current version of the campaign. |
deletedAt required | string <date-time> Time when the campaign was deleted. |
Request samples
- Payload
{- "campaign": {
- "id": 0,
- "created": "2019-08-24T14:15:22Z",
- "applicationId": 322,
- "userId": 0,
- "name": "Summer promotions",
- "description": "Campaign for all summer 2021 promotions",
- "startTime": "2021-07-20T22:00:00Z",
- "endTime": "2021-09-22T22:00:00Z",
- "attributes": { },
- "state": "enabled",
- "activeRulesetId": 0,
- "tags": [
- "summer"
], - "features": [
- "coupons",
- "referrals"
], - "couponSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "referralSettings": {
- "validCharacters": [
- "A",
- "B",
- "C",
- "D",
- "E",
- "2",
- "0"
], - "couponPattern": "SUMMER-####-####"
}, - "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "campaignGroups": [
- 1,
- 3
], - "couponRedemptionCount": 163,
- "referralRedemptionCount": 3,
- "discountCount": 288,
- "discountEffectCount": 343,
- "couponCreationCount": 16,
- "customEffectCount": 0,
- "referralCreationCount": 8,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 9,
- "createdLoyaltyPointsCount": 9,
- "createdLoyaltyPointsEffectCount": 2,
- "redeemedLoyaltyPointsCount": 8,
- "redeemedLoyaltyPointsEffectCount": 9,
- "callApiEffectCount": 0,
- "lastActivity": "2022-11-10T23:00:00Z",
- "updated": "2022-10-97T35:00:00Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}, - "deletedAt": "2022-11-10T23:00:00Z"
}
Campaign priorities changed Webhook
Request Body schema: application/json
The notification indicating the priority of a campaign changed.
required | object Application containing the campaigns whose priorities changed. |
required | object New campaign priorities |
object Previous campaign priorities | |
Array of objects The previous positions of campaigns in the priority order. | |
Array of objects The new positions of campaigns in the priority order. |
Request samples
- Payload
{- "application": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "modified": "2021-09-12T10:12:42Z",
- "accountId": 3886,
- "name": "My Application",
- "description": "A test Application",
- "timezone": "Europe/Berlin",
- "currency": "EUR",
- "caseSensitivity": "sensitive",
- "attributes": { },
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "campaignPriority": "universal",
- "exclusiveCampaignsStrategy": "listOrder",
- "defaultDiscountScope": "sessionTotal",
- "enableCascadingDiscounts": true,
- "enableFlattenedCartItems": true,
- "attributesSettings": {
- "mandatory": {
- "campaigns": [
- "string"
], - "coupons": [
- "string"
]
}
}, - "sandbox": true,
- "enablePartialDiscounts": false,
- "defaultDiscountAdditionalCostPerItemScope": "price",
- "loyaltyPrograms": [
- {
- "id": 139,
- "created": "2020-06-10T09:05:27.993483Z",
- "title": "Point collection",
- "description": "Customers collect 10 points per 1$ spent",
- "subscribedApplications": [
- 132,
- 97
], - "defaultValidity": "unlimited",
- "defaultPending": "immediate",
- "allowSubledger": false,
- "usersPerCardLimit": 111,
- "accountID": 1,
- "name": "my_program",
- "tiers": [
- {
- "name": "Gold",
- "minPoints": 300,
- "id": 3,
- "created": "2021-06-10T09:05:27.993483Z",
- "programID": 139
}, - {
- "name": "Silver",
- "minPoints": 200,
- "id": 2,
- "created": "2021-06-10T09:04:59.355258Z",
- "programId": 139
}, - {
- "name": "Bronze",
- "minPoints": 100,
- "id": 1,
- "created": "2021-06-10T09:04:39.355258Z",
- "programId": 139
}
], - "timezone": "Europe/Berlin",
- "cardBased": true
}
]
}, - "oldPriorities": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "priorities": {
- "property1": [
- 0
], - "property2": [
- 0
]
}, - "oldPrioritiesPositions": [
- {
- "set": "universal",
- "position": 1,
- "campaignId": 5
}
], - "prioritiesPositions": [
- {
- "set": "universal",
- "position": 1,
- "campaignId": 5
}
]
}