Third-party API reference docs
Download OpenAPI specification:Download
Use the Third-party API from Talon.One's technology partners.
For example, use the Braze-specific endpoints from your Braze campaigns to interact with Talon.One.
If the CDP or CEP you are using isn't listed here, use the generic Customer Data Platforms and Customer Engagement Platform endpoints.
All endpoints of this API start with https://integration.talon.one
.
Are you looking for a different API?
If you need the API to:
- Integrate with Talon.One directly and send real-time data, see the Integration API reference docs.
- Interact with the Campaign Manager for backoffice operations, see the Management API reference docs.
ApiKeyAuth
To authenticate in order to use these endpoints, generate an API key in the Campaign Manager:
- Log on to the Campaign Manager and open the Application of your choice, or create one.
- Click Settings > Developer settings.
- Click Create API Key.
- Give it a title.
- For Do you want to use this API Key with a 3rd party service?, select Yes and choose the platform to integrate with.
- Set an expiration date. then click Create API Key.
You can now use the API key in the Authorization
HTTP header of your requests, prefixing it with ApiKey-v1
:
Authorization: ApiKey-v1 dbc644d33aa74d582bd9479c59e16f970fe13bf3
Authorization
ApiKeyBasicAuth
To authenticate in order to use these endpoints, generate an API key in the Campaign Manager:
Log on to the Campaign Manager and open the Application of your choice, or create one.
Click Settings > Developer settings.
Click Create API Key.
Give it a title.
For Do you want to use this API Key with a 3rd party service?, select Yes and choose the platform to integrate with.
Set an expiration date. then click Create API Key.
Encode your generated API Key with the prefix
ApiKey-v1
to base64, for example base64 encode thisApiKey-v1 your-api-key-here:
. Don't forget to add the:
at the end of your api key.
Lastly prefix the previous string with Authorization:
Authorization: Basic YmFzZTY0ZW5vZGV0aGlzcGxlYXNlYXNhcDQzMjE0MTI=
basic
Braze is a customer engagement platform to manage customer-centric interactions between consumers and brands in real-time.
Use these endpoints to automate the creation of coupon and referral codes and deliver them to specific customer segments. To send requests to these endpoints, use the connected content feature in Braze.
For more information, see our integration examples in the developer docs.
Create referral
Create a referral code in Talon.One. To use it in your Braze deployment, see the tutorial.
Authorizations:
header Parameters
X-DRY-RUN | boolean Example: true Indicates whether to persist the changes. Changes are ignored when |
Request Body schema: application/json
deploymentUrl required | string The base url of your deployment. |
campaignId required | integer <int64> >= 1 The ID of the campaign in Talon.One. It is displayed in your Talon.One deployment URL. |
advocateProfileIntegrationId required | string non-empty The customer integration ID of the advocate. |
friendProfileIntegrationId | string non-empty The customer integration ID of the person being referred. |
startDate | string <date-time> The date when the code becomes usable. |
expiryDate | string <date-time> The date when the code becomes unsable. |
usageLimit | integer <int64> >= 0 Default: 0 Set the usage limit of the referral to unlimited. |
attributes | object An object containing the value of each attributes to set. New attributes are created automatically. For more information, see Attributes. |
Responses
Request samples
- Payload
{- "deploymentUrl": "mycompany.europe-west1.talon.one",
- "campaignId": 5672,
- "advocateProfileIntegrationId": "2",
- "friendProfileIntegrationId": "3",
- "startDate": "2021-09-30T15:35:02.371569+02:00",
- "expiryDate": "2021-10-03T15:35:02.371569+02:00",
- "usageLimit": 3,
- "attributes": {
- "welcome_message": "Welcome!"
}
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "id": 1374,
- "created": "2022-04-01T16:46:36.625152002Z",
- "startDate": "2021-09-30T15:35:02.371569+02:00",
- "expiryDate": "2021-10-03T15:35:02.371569+02:00",
- "usageLimit": 0,
- "campaignId": 5672,
- "advocateProfileIntegrationId": "URN-GV8294NV",
- "friendProfileIntegrationId": "PKBR-G06449OELK",
- "attributes": {
- "welcome_message": "Welcome!"
}, - "code": "P8BN-4T5V",
- "usageCounter": 0
}
Create coupon
Create a coupon code in Talon.One. To use it in your Braze deployment, see the tutorial.
You can also use this endpoint to get an existing coupon's details by setting the identifier
property to a value you previously used.
Tip: You can edit the default coupon code format in the campaign's settings.
Authorizations:
Request Body schema: application/json
deploymentUrl required | string The base URL of your Talon.One deployment. |
applicationId required | integer <int64> >= 1 The ID of the Application in Talon.One. It is displayed in your Talon.One deployment URL. |
campaignId required | integer <int64> >= 1 The ID of the campaign in Talon.One. It is displayed in your Talon.One deployment URL. |
identifier required | string non-empty The identifier of the request. Providing a new value creates a new coupon. Providing an existing value retrieves the existing coupon of that ID and does not create a new coupon. In general, you should set it to a variable controlled by Braze. Usual values include:
See Supported personalization tags and dispatch ID behavior. |
usageLimit | integer <int64> Default: 1 The usage limit of the coupon. |
discountLimit | number [ 0 .. 999999 ] The discount amount the coupon is worth. Can be blank if, for example, the coupon provides a 10% discount, or something other than a fixed value of discounts. |
reservationLimit | integer <int64> [ 0 .. 999999 ] The number of reservations that can be made with this coupon code. |
isReservationMandatory | boolean Indicates whether the code can be redeemed only if it has been reserved first. |
Array of objects Limits configuration for a coupon. These limits will override the limits set from the campaign. Note: Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | |
integrationId | string The integration ID of the customer profile. When specified, only that customer will be able to use the coupon. |
startDate | string <date-time> The start date of the coupon. |
expiryDate | string <date-time> The expiry date of the coupon. |
validCharacters | Array of strings The list of allowed characters to be used when generating the code. |
couponPattern | string The coupon pattern to use. Use |
attributes | object Arbitrary properties associated with item. |
Responses
Request samples
- Payload
{- "deploymentUrl": "mycompany.europe-west1.talon.one",
- "applicationId": 398,
- "campaignId": 5671,
- "identifier": "test-coupon",
- "usageLimit": 4,
- "discountLimit": 30,
- "reservationLimit": 45,
- "integrationId": "URN-GV8294NV",
- "startDate": "2021-09-30T15:35:02.371569+02:00",
- "expiryDate": "2024-10-03T15:35:02.371569+02:00",
- "validCharacters": [
- "A",
- "B",
- "C",
- "1",
- "2"
], - "couponPattern": "ew-####",
- "isReservationMandatory": false,
- "limits": [
- {
- "entities": [
- "Coupon",
- "Profile"
], - "limit": 1,
- "action": "redeemCoupon"
}
], - "attributes": {
- "venueId": "BER4271",
- "venueName": "Admiralspalast"
}
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "ID": 20190408,
- "ApplicationID": 398,
- "CampaignID": 5671,
- "Value": "EW-1BC2",
- "StartDate": "2021-09-30T15:35:02.371569+02:00",
- "ExpiryDate": "2024-10-03T15:35:02.371569+02:00",
- "RecipientIntegrationID": "URN-GV8294NV",
- "UsageLimit": 1,
- "IsReservationMandatory": false,
- "Limits": [
- {
- "entities": [
- "Coupon",
- "Profile"
], - "limit": 1,
- "action": "redeemCoupon"
}
], - "Attributes": {
- "email": "user@mailbox.com",
- "country": "DE"
}
}
Create coupon reservation
Create a coupon reservation for a specified customer profile on the specified coupon.
Authorizations:
Request Body schema: application/json
deploymentUrl required | string The base url of your deployment. |
couponValue required | string The coupon code. |
integrationId required | string The integration ID of the customer profile. |
Responses
Request samples
- Payload
{- "deploymentUrl": "mycompany.europe-west1.talon.one",
- "couponValue": "EW-1BC2",
- "integrationId": "URN-GV8294NV"
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "id": 1,
- "campaignId": 1,
- "created": "2022-03-02T16:46:17.758585Z",
- "value": "EW-1BC2",
- "usageCounter": 0,
- "usageLimit": 1
}
Track event
Triggers a custom event inside Talon.One. You can then trigger rules when this event is received.
An event is a type of custom attribute. You must create it first in the Campaign Manager. See creating custom events. To see the events received by your Application in Talon.One, open the Application and click Events.
For more information, see the tutorial.
Note: If the customer profile ID you provided does not exist in Talon.One, a customer profile is created with the ID you provided.
Authorizations:
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
eventType required | string <string> The event type, as defined in Talon.One when you created the custom attribute representing this event. |
type required | string <string> Enum: "string" "time" "number" "boolean" "location" "(list string)" "(list number)" "(list time)" "(list location)" The data type of the event, as defined in Talon.One when you created the custom attribute representing this event. |
customerProfileId required | string <string> <= 1000 characters Unique Customer Profile ID. |
identifier required | string non-empty The identifier of the request. Providing a new value sends a new event to Talon.One. Providing an existing value retrieves the existing event of that id. In general, you should set it to a See dispatch ID behavior. |
object Property to set the attributes of your choice to the values of your choice. New attributes are created automatically. For more information, see Attributes. |
Responses
Request samples
- Payload
{- "eventType": "myBrazeEvent",
- "type": "string",
- "eventAttributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "customerProfileId": "URN-GV8294NV",
- "identifier": "NNjETb6XxDV7hQhLMA"
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "customerSession": {
- "id": 6,
- "created": "2020-02-07T08:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "couponCodes": [
- "XMAS-20-2021"
], - "referralCode": "NT2K54D9",
- "loyaltyCards": [
- "loyalty-card-1"
], - "state": "open",
- "cartItems": [
- {
- "name": "Air Glide",
- "sku": "SKU1241028",
- "quantity": 1,
- "returnedQuantity": 1,
- "remainingQuantity": 1,
- "price": 99.99,
- "category": "shoes",
- "weight": 1130,
- "height": 0,
- "width": 0,
- "length": 0,
- "position": 0,
- "attributes": {
- "image": "11.jpeg",
- "material": "leather"
}, - "additionalCosts": {
- "shipping": {
- "price": 9
}
}
}
], - "additionalCosts": {
- "shipping": {
- "price": 9
}
}, - "identifiers": [
- "91.11.156.141"
], - "attributes": {
- "ShippingCity": "Berlin"
}, - "firstSession": true,
- "total": 119.99,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 20,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "integrationId": "URNGV8294NV",
- "closedSessions": 3,
- "totalSales": 299.99,
- "audienceMemberships": [
- {
- "id": 6,
- "name": "audience1"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "type": "pageViews",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "sessionId": "175KJPS947296",
- "effects": [
- [
- 4208,
- 20095,
- 0,
- [
- "showNotification",
- "Info",
- "My title",
- "My content"
]
]
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URN-GV8294NV",
- "accountId": 23,
- "loyaltyProgramId": 323414846,
- "eventId": 3,
- "amount": 100,
- "reason": "customer appeasment",
- "expiryDate": "2021-06-10T09:05:27.993483Z",
- "referenceId": 5
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 20,
- "referralId": 4,
- "reason": "ReferralNotFound"
}, - "warnings": { }
}
}, - "loyalty": {
- "cards": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "programID": 125,
- "status": "string",
- "identifier": "string",
- "usersPerCardLimit": 111,
- "profiles": [
- {
- "integrationId": "string",
- "timestamp": "2021-09-12T10:12:42Z"
}
], - "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}
}
}, - "referral": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe",
- "referredCustomers": [
- "string"
]
}, - "coupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "triggeredCampaigns": [
- {
- "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
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": {
- "value": "string"
}
}
], - "ruleFailureReasons": [
- {
- "campaignID": 0,
- "campaignName": "string",
- "rulesetID": 0,
- "couponID": 4928,
- "couponValue": "string",
- "referralID": 0,
- "referralValue": "string",
- "ruleIndex": 0,
- "ruleName": "string",
- "conditionIndex": 0,
- "effectIndex": 0,
- "details": "string"
}
], - "createdCoupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "createdReferrals": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe"
}
], - "awardedGiveaways": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "code": "string",
- "poolId": 0,
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "attributes": { },
- "used": true,
- "importId": 0
}
], - "return": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}, - "previousReturns": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}
]
}
You can integrate with any customer data platform, or CDP, using the following endpoints designed for third-party tools, rather than your own integration layer.
Use these endpoints to automate the creation of coupon and referral codes and deliver them to specific customer segments.
Update customer profile
Update the given customer profile to add or remove audiences.
Note: Create all the required attributes and audiences before using this endpoint.
Authorizations:
path Parameters
customerProfileId required | string Example: customer1 The integration ID of the customer profile. |
query Parameters
skipNonExistingAttributes | boolean Example: skipNonExistingAttributes=true Indicates whether to skip non-existing attributes. If If |
header Parameters
customer-data-platform-name required | string <string> Example: My CDP platform The name of the CDP platform. |
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
object Property to set the attributes of your choice to the values of your choice. | |
runRuleEngine | boolean Default: false Indicates whether to run the Rule Engine. If If
Note: If the |
object A list of audiences where the customer should be removed or added. |
Responses
Request samples
- Payload
{- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "runRuleEngine": false,
- "audiencesChanges": {
- "adds": [
- 1,
- 2,
- 3
], - "deletes": [
- 4,
- 5,
- 6
]
}
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "customerSession": {
- "id": 6,
- "created": "2020-02-07T08:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "couponCodes": [
- "XMAS-20-2021"
], - "referralCode": "NT2K54D9",
- "loyaltyCards": [
- "loyalty-card-1"
], - "state": "open",
- "cartItems": [
- {
- "name": "Air Glide",
- "sku": "SKU1241028",
- "quantity": 1,
- "returnedQuantity": 1,
- "remainingQuantity": 1,
- "price": 99.99,
- "category": "shoes",
- "weight": 1130,
- "height": 0,
- "width": 0,
- "length": 0,
- "position": 0,
- "attributes": {
- "image": "11.jpeg",
- "material": "leather"
}, - "additionalCosts": {
- "shipping": {
- "price": 9
}
}
}
], - "additionalCosts": {
- "shipping": {
- "price": 9
}
}, - "identifiers": [
- "91.11.156.141"
], - "attributes": {
- "ShippingCity": "Berlin"
}, - "firstSession": true,
- "total": 119.99,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 20,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "integrationId": "URNGV8294NV",
- "closedSessions": 3,
- "totalSales": 299.99,
- "audienceMemberships": [
- {
- "id": 6,
- "name": "audience1"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "type": "pageViews",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "sessionId": "175KJPS947296",
- "effects": [
- [
- 4208,
- 20095,
- 0,
- [
- "showNotification",
- "Info",
- "My title",
- "My content"
]
]
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URN-GV8294NV",
- "accountId": 23,
- "loyaltyProgramId": 323414846,
- "eventId": 3,
- "amount": 100,
- "reason": "customer appeasment",
- "expiryDate": "2021-06-10T09:05:27.993483Z",
- "referenceId": 5
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 20,
- "referralId": 4,
- "reason": "ReferralNotFound"
}, - "warnings": { }
}
}, - "loyalty": {
- "cards": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "programID": 125,
- "status": "string",
- "identifier": "string",
- "usersPerCardLimit": 111,
- "profiles": [
- {
- "integrationId": "string",
- "timestamp": "2021-09-12T10:12:42Z"
}
], - "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}
}
}, - "referral": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe",
- "referredCustomers": [
- "string"
]
}, - "coupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "triggeredCampaigns": [
- {
- "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
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": {
- "value": "string"
}
}
], - "ruleFailureReasons": [
- {
- "campaignID": 0,
- "campaignName": "string",
- "rulesetID": 0,
- "couponID": 4928,
- "couponValue": "string",
- "referralID": 0,
- "referralValue": "string",
- "ruleIndex": 0,
- "ruleName": "string",
- "conditionIndex": 0,
- "effectIndex": 0,
- "details": "string"
}
], - "createdCoupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "createdReferrals": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe"
}
], - "awardedGiveaways": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "code": "string",
- "poolId": 0,
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "attributes": { },
- "used": true,
- "importId": 0
}
], - "return": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}, - "previousReturns": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}
]
}
Update audiences in multiple customer profiles
Update the specified audiences for the specified profiles.
If a provided customer profile doesn't exist, it is created automatically.
Authorizations:
header Parameters
customer-data-platform-name required | string <string> Example: My CDP platform The name of the CDP platform. |
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
Array of objects Indicates audience changes for a selected profile. Note: The total number of | |||||||
Array
|
Responses
Request samples
- Payload
{- "data": [
- {
- "adds": [
- 1,
- 2,
- 3
], - "deletes": [
- 4,
- 5,
- 6
], - "customerProfileId": "URN-GV8294NV"
}
]
}
Response samples
- 400
- 401
- 404
- 429
{- "StatusCode": 400,
- "Error": "No Deployment URL specified",
- "RequestUUID": "fd2f7c55-d064-46e1-ab87-a39cb877cd82"
}
Create audience
Create an audience. The audience can be created directly from scratch or can come from third party platforms.
Once you create your first audience, audience-specific rule conditions are enabled in the Rule Builder.
Authorizations:
header Parameters
customer-data-platform-name required | string <string> Example: My CDP platform The name of the CDP platform. |
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
audienceId required | string <string> [ 1 .. 1000 ] characters The integration ID of this audience. If the audience comes from a third-party platform, set this property to the ID given by the third-party platform. |
audienceName required | string <string> [ 1 .. 1000 ] characters The human-friendly display name for this audience. |
Responses
Request samples
- Payload
{- "audienceId": "382370BKDB946",
- "audienceName": "Travel audience"
}
Response samples
- 201
- 400
- 401
- 404
- 409
- 429
{- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "name": "Travel audience",
- "integration": "My platform name",
- "integrationId": "382370BKDB946"
}
Update audience
Update an audience created by a third-party integration.
Authorizations:
path Parameters
audienceId required | string Example: audience1 The integration ID of the audience. |
header Parameters
customer-data-platform-name required | string <string> Example: My CDP platform The name of the CDP platform. |
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
audienceId required | string <string> [ 1 .. 1000 ] characters The integration ID of this audience. If the audience comes from a third-party platform, set this property to the ID given by the third-party platform. |
audienceName required | string <string> [ 1 .. 1000 ] characters The human-friendly display name for this audience. |
Responses
Request samples
- Payload
{- "audienceId": "382370BKDB946",
- "audienceName": "Travel audience"
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "name": "Travel audience",
- "integration": "My platform name",
- "integrationId": "382370BKDB946"
}
Delete audience
Delete an audience created by a third-party integration.
Warning: This endpoint also removes any associations recorded between a customer profile and this audience.
Authorizations:
path Parameters
audienceId required | string Example: audience1 The integration ID of the audience. |
header Parameters
customer-data-platform-name required | string <string> Example: My CDP platform The name of the CDP platform. |
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Responses
Response samples
- 400
- 401
- 404
- 429
{- "StatusCode": 400,
- "Error": "No Deployment URL specified",
- "RequestUUID": "fd2f7c55-d064-46e1-ab87-a39cb877cd82"
}
You can integrate with any customer engagement platform, or CEP, using the following endpoints designed for third-party tools, rather than your own integration layer.
Use these endpoints to automate the creation of coupon and referral codes and deliver them to specific customer segments.
For more information, see our integration examples in the developer docs.
Create coupon
Create a coupon code in Talon.One. See the tutorial.
Tip: You can edit the default coupon code format in the campaign's settings.
Authorizations:
query Parameters
applicationId required | integer <int64> Example: applicationId=316 The ID of the Application in Talon.One. It is displayed in your Talon.One deployment URL. |
campaignId required | integer <int64> Example: campaignId=5843 The ID of the campaign in Talon.One. It is displayed in your Talon.One deployment URL. |
externalCampaignId required | string Example: externalCampaignId=testCampaignId The ID of the campaign in the third-party platform. |
startDate | string <date-time> Example: startDate=2022-09-30T15:35:02Z The date when the code becomes usable. |
expiryDate | string <date-time> Example: expiryDate=2022-10-30T15:35:02Z The date when the code becomes unusable. |
discountLimit | integer <int64> Example: discountLimit=155 The discount amount the coupon is worth. Can be blank if, for example, the coupon provides a 10% discount, or something other than a fixed value of discounts. |
recipientIntegrationId | string Example: recipientIntegrationId=URN-GV8294NV The integration ID of the only customer that can use the generated coupon code. Leave blank to allow any user to use the coupon. |
usageLimit | integer <int64> Default: 1 Example: usageLimit=1 The number of times the coupon code can be redeemed. 0 means unlimited redemptions but any campaign usage limits will still apply. The default value is 1. |
object Example: .firstName=john&.country=DE Optional parameter to set the value of custom attributes. They are defined in the Campaign Manager, see Managing attributes. Prefix each attribute name with Certain attributes can also be set to mandatory in your Application settings. If your Application uses mandatory attributes, you must use this parameter to set their value. The type of the value must match the type of the attribute. If you provide an integer value, the attribute must also be of type Integer in Talon.One. If the types do not match, and the attribute in Talon.One is of type String, put the value in quotes. For example, if you provide a Boolean value for a String attribute, use Full URI example: | |
identifier | string Example: identifier=3495-4323 The identifier of the request. Providing a new value creates a new coupon. Providing an existing value retrieves the existing coupon of that ID and does not create a new coupon. |
header Parameters
customer-engagement-platform-name required | string Example: My CEP platform The name of the third-party platform. |
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
X-DRY-RUN | boolean Example: true Indicates whether to persist the changes. Changes are ignored when |
Responses
Response samples
- 200
- 400
- 401
- 404
- 429
{- "ID": 20190408,
- "ApplicationID": 398,
- "CampaignID": 5671,
- "Value": "EW-1BC2",
- "StartDate": "2021-09-30T15:35:02.371569+02:00",
- "ExpiryDate": "2024-10-03T15:35:02.371569+02:00",
- "RecipientIntegrationID": "URN-GV8294NV",
- "UsageLimit": 1,
- "Attributes": {
- "email": "user@mailbox.com",
- "country": "DE"
}
}
Create referral
Create a referral code in Talon.One. See the tutorial.
Authorizations:
query Parameters
campaignId required | integer <int64> Example: campaignId=5843 The ID of the campaign in Talon.One. It is displayed in your Talon.One deployment URL. |
advocateProfileIntegrationId required | string Example: advocateProfileIntegrationId=testAdvocateProfile The integration ID of the advocate. |
friendProfileIntegrationId | string Example: friendProfileIntegrationId=testFriendProfile The profile ID of the referred customer. |
startDate | string <date-time> Example: startDate=2022-09-30T15:35:02Z The date when the code becomes usable. |
expiryDate | string <date-time> Example: expiryDate=2022-10-30T15:35:02Z The date when the code becomes unusable. |
usageLimit | integer <int64> Example: usageLimit=1 Number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply. |
object Example: .firstName=john&.country=DE Optional parameter to set the value of custom attributes. They are defined in the Campaign Manager, see Managing attributes. Prefix each attribute name with Certain attributes can also be set to mandatory in your Application settings. If your Application uses mandatory attributes, you must use this parameter to set their value. The type of the value must match the type of the attribute. If you provide an integer value, the attribute must also be of type Integer in Talon.One. If the types do not match, and the attribute in Talon.One is of type String, put the value in quotes. For example, if you provide a Boolean value for a String attribute, use Full URI example: |
header Parameters
customer-engagement-platform-name required | string Example: My CEP platform The name of the third-party platform. |
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
X-DRY-RUN | boolean Example: true Indicates whether to persist the changes. Changes are ignored when |
Responses
Response samples
- 200
- 400
- 401
- 404
- 429
{- "id": 1374,
- "created": "2022-04-01T16:46:36.625152002Z",
- "startDate": "2021-09-30T15:35:02.371569+02:00",
- "expiryDate": "2021-10-03T15:35:02.371569+02:00",
- "usageLimit": 0,
- "campaignId": 5672,
- "advocateProfileIntegrationId": "URN-GV8294NV",
- "friendProfileIntegrationId": "PKBR-G06449OELK",
- "attributes": {
- "welcome_message": "Welcome!"
}, - "code": "P8BN-4T5V",
- "usageCounter": 0
}
Get loyalty ledger
Get the loyalty ledger information of the given customer profile from Talon.One. See the tutorial.
This endpoint only works with profile-based loyalty programs.
Authorizations:
query Parameters
profileIntegrationId required | string Example: profileIntegrationId=URN-GV8294NV The integration ID of the customer profile in Talon.One. |
loyaltyProgramId required | integer <int64> Example: loyaltyProgramId=25 The ID of the profile-based loyalty program in Talon.One. |
header Parameters
customer-engagement-platform-name required | string Example: My CEP platform The name of the third-party platform. |
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Responses
Response samples
- 200
- 400
- 401
- 404
- 429
{- "id": 302,
- "title": "My loyalty program",
- "name": "myloyaltyprogram",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}
Add loyalty points
Add points in the specified loyalty program for the given customer.
This endpoint only works with profile-based loyalty programs.
Authorizations:
header Parameters
customer-engagement-platform-name required | string Example: My CEP platform The name of the third-party platform. |
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
loyaltyProgramId required | integer The ID of the profile-based loyalty program in Talon.One. |
profileIntegrationId required | string The integration ID of the customer profile in Talon.One. |
points required | number ( 0 .. 999999999999.99 ] Amount of loyalty points. |
name | string Name / reason for the point addition. |
validityDuration | string The time format is either:
Examples: Available units:
You can round certain units up or down:
If passed, |
validUntil | string <date-time> Date and time when points should expire. The value should be provided in RFC 3339 format.
If passed, |
pendingDuration | string The amount of time before the points are considered valid. The time format is either:
Examples: Available units:
You can round certain units up or down:
|
pendingUntil | string <date-time> Date and time after the points are considered valid. The value should be provided in RFC 3339 format.
If passed, |
subledgerId | string ID of the subledger the points are added to. If there is no existing subledger with this ID, the subledger is created automatically. |
applicationId | integer ID of the Application that is connected to the loyalty program. It is displayed in your Talon.One deployment URL. |
Responses
Request samples
- Payload
{- "profileIntegrationId": "URN-GV8294NV",
- "loyaltyProgramId": 25,
- "points": 300,
- "name": "Compensation",
- "validityDuration": "5D",
- "validUntil": "2021-07-20T22:00:00Z",
- "pendingDuration": "12h",
- "pendingUntil": "2021-07-20T22:00:00Z",
- "subledgerId": "sub-123",
- "applicationId": 322
}
Response samples
- 400
- 401
- 404
- 429
{- "StatusCode": 400,
- "Error": "No Deployment URL specified",
- "RequestUUID": "fd2f7c55-d064-46e1-ab87-a39cb877cd82"
}
Emarsys is a customer engagement platform that enables marketers to build, launch, and scale personalized cross-channel promotional campaigns that have measurable impact.
Use these endpoints to integrate with Talon.One.
Get coupon
Retrieve a coupon code from Talon.One.
Authorizations:
query Parameters
deployment required | string Example: deployment=company.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/jsonrequired
fields required | Array of strings Any additional data we want in the response. Note: For the supported |
limit required | number >= 0 The value to set for the limit. |
required | Array of objects |
Responses
Request samples
- Payload
{- "parameters": [
- {
- "campaignId": "34",
- "integrationId": "URNGV8294NV"
}
], - "fields": [
- "id",
- "created"
], - "limit": 1000
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "content": [
- {
- "integrationId": "test-user-4zoj1c",
- "campaignId": "8431",
- "id": 26443683,
- "created": "2024-01-03T11:28:25.648154Z",
- "value": "QQ4R-C3BQ",
- "usageLimit": 1,
- "usageCounter": 0,
- "recipientIntegrationId": "test-user-4zoj1c",
- "reservation": false,
- "batchId": "qndflqqd",
- "profileRedemptionCount": 0,
- "state": "active"
}
]
}
Get loyalty balance
Retrieve the loyalty balance of a customer profile from Talon.One.
This endpoint only works with profile-based loyalty programs.
Authorizations:
query Parameters
deployment required | string Example: deployment=company.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/jsonrequired
fields required | Array of strings Additional fields to include in the response.
Valid fields are |
required | Array of objects |
Responses
Request samples
- Payload
{- "parameters": [
- {
- "loyaltyProgramId": "34",
- "integrationId": "URNGV8294NV",
- "subledgerId": "subledger-123"
}
], - "fields": [
- "activeBalance",
- "pendingBalance"
]
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "content": [
- {
- "integrationId": "test-user-4zoj1c",
- "loyaltyProgramId": "8431",
- "activeBalance": 100,
- "pendingBalance": 0,
- "expiredBalance": 0,
- "totalBalance": 100
}
]
}
Iterable is a cross-channel marketing platform that powers unified customer experiences and empowers you to create, optimize and measure every interaction across the entire customer journey.
Use these endpoints to automate the creation of coupon and referral codes and deliver them to specific customer segments. To send requests to these endpoints, use the data feed feature in Iterable.
For more information, see our integration examples in the developer docs.
Create coupon
Create a coupon code in Talon.One. To use it in your Iterable deployment and generate the request, see the tutorial.
Tip: You can edit the default coupon code format in the campaign's settings.
Authorizations:
query Parameters
deployment required | string Example: deployment=company.talon.one The base URL of your Talon.One deployment. |
applicationId required | integer <int64> Example: applicationId=316 The ID of the Application in Talon.One. It is displayed in your Talon.One deployment URL. |
campaignId required | integer <int64> Example: campaignId=5843 The ID of the campaign in Talon.One. It is displayed in your Talon.One deployment URL. |
iterableCampaignId required | string Example: iterableCampaignId=iterableCampaign The ID of the campaign in Iterable. |
startDate | string <date-time> Example: startDate=2022-09-30T15:35:02Z The date when the code becomes usable. |
expiryDate | string <date-time> Example: expiryDate=2022-10-30T15:35:02Z The date when the code becomes unusable. |
discountLimit | integer <int64> Example: discountLimit=155 The discount amount the coupon is worth. Can be blank if, for example, the coupon provides a 10% discount, or something other than a fixed value of discounts. |
recipientIntegrationId | string Example: recipientIntegrationId=URN-GV8294NV The integration ID of the only customer that can use the generated coupon code. Leave blank to allow any user to use the coupon. |
usageLimit | integer <int64> Default: 1 Example: usageLimit=1 The number of times the coupon code can be redeemed. 0 means unlimited redemptions but any campaign usage limits will still apply. The default value is 1. |
object Example: .firstName=john&.country=DE Optional parameter to set the value of custom attributes. They are defined in the Campaign Manager, see Managing attributes. Prefix each attribute name with Certain attributes can also be set to mandatory in your Application settings. If your Application uses mandatory attributes, you must use this parameter to set their value. The type of the value must match the type of the attribute. If you provide an integer value, the attribute must also be of type Integer in Talon.One. If the types do not match, and the attribute in Talon.One is of type String, put the value in quotes. For example, if you provide a Boolean value for a String attribute, use Full URI example: |
Responses
Response samples
- 200
- 400
- 401
- 404
- 429
{- "ID": 20190408,
- "ApplicationID": 398,
- "CampaignID": 5671,
- "Value": "EW-1BC2",
- "StartDate": "2021-09-30T15:35:02.371569+02:00",
- "ExpiryDate": "2024-10-03T15:35:02.371569+02:00",
- "RecipientIntegrationID": "URN-GV8294NV",
- "UsageLimit": 1,
- "Attributes": {
- "email": "user@mailbox.com",
- "country": "DE"
}
}
Create referral
Create a referral code in Talon.One. To use it in your Iterable deployment and generate the request, see the tutorial.
Authorizations:
query Parameters
deployment required | string Example: deployment=company.talon.one The base URL of your Talon.One deployment. |
campaignId required | integer <int64> Example: campaignId=5843 The ID of the campaign in Talon.One. It is displayed in your Talon.One deployment URL. |
advocateProfileIntegrationId required | string Example: advocateProfileIntegrationId=testAdvocateProfile The integration ID of the advocate. |
friendProfileIntegrationId | string Example: friendProfileIntegrationId=testFriendProfile The profile ID of the referred customer. |
startDate | string <date-time> Example: startDate=2022-09-30T15:35:02Z The date when the code becomes usable. |
expiryDate | string <date-time> Example: expiryDate=2022-10-30T15:35:02Z The date when the code becomes unusable. |
usageLimit | integer <int64> Example: usageLimit=1 Number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply. |
object Example: .firstName=john&.country=DE Optional parameter to set the value of custom attributes. They are defined in the Campaign Manager, see Managing attributes. Prefix each attribute name with Certain attributes can also be set to mandatory in your Application settings. If your Application uses mandatory attributes, you must use this parameter to set their value. The type of the value must match the type of the attribute. If you provide an integer value, the attribute must also be of type Integer in Talon.One. If the types do not match, and the attribute in Talon.One is of type String, put the value in quotes. For example, if you provide a Boolean value for a String attribute, use Full URI example: |
Responses
Response samples
- 200
- 400
- 401
- 404
- 429
{- "id": 1374,
- "created": "2022-04-01T16:46:36.625152002Z",
- "startDate": "2021-09-30T15:35:02.371569+02:00",
- "expiryDate": "2021-10-03T15:35:02.371569+02:00",
- "usageLimit": 0,
- "campaignId": 5672,
- "advocateProfileIntegrationId": "URN-GV8294NV",
- "friendProfileIntegrationId": "PKBR-G06449OELK",
- "attributes": {
- "welcome_message": "Welcome!"
}, - "code": "P8BN-4T5V",
- "usageCounter": 0
}
Get loyalty ledger
Get the loyalty ledger information of the given customer profile from Talon.One. To use it in your Iterable deployment and generate the request, see the tutorial.
This endpoint only works with profile-based loyalty programs.
Authorizations:
query Parameters
deployment required | string Example: deployment=company.talon.one The base URL of your Talon.One deployment. |
profileIntegrationId required | string Example: profileIntegrationId=URN-GV8294NV The integration ID of the customer profile in Talon.One. |
loyaltyProgramId required | integer <int64> Example: loyaltyProgramId=25 The ID of the profile-based loyalty program in Talon.One. |
Responses
Response samples
- 200
- 400
- 401
- 404
{- "id": 302,
- "title": "My loyalty program",
- "name": "myloyaltyprogram",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}
mParticle is the customer data platform that helps unify data and simplify partner integrations with enterprise-class security and reliability.
For more information, see our integration examples in the developer docs.
Send event
Send an mParticle event to Talon.One.
This endpoint supports the following mParticle events:
module_registration_request
: A new client has set up the Talon.One integration in mParticle.audience_membership_change_request
: Customers have been added to or removed from an audience in mParticle.audience_subscription_request
: An audience has been added, updated, or deleted in mParticle.event_processing_request
: One or more events have been triggered in mParticle.
Request Body schema: application/json
type required | string The type of the mParticle request. Must be set to |
required | object The account settings for your Talon.One integration. |
id | string The ID of the request. |
timestamp_ms | integer The timestamp of the request (in milliseconds). |
firehose_version | string The internal mParticle API version. |
Responses
Request samples
- Payload
{- "type": "module_registration_request",
- "id": "62cdcd11-3913-4c66-a2c7-01ae7a445a61",
- "timestamp_ms": 1586980879793,
- "firehose_version": "2.4.0",
- "account": {
- "account_id": 1234567,
- "account_settings": {
- "apiKey": "someapikey",
- "deploymentURL": "mycompany.europe-west1.talon.one",
- "userIdField": "email"
}
}
}
Response samples
- 200
- 400
- 401
- 409
- 429
{- "type": "module_registration_response",
- "id": "62cdcd11-3913-4c66-a2c7-01ae7a445a61",
- "timestamp_ms": 1586980879793,
- "firehose_version": "2.4.0",
- "name": "Talon.One",
- "description": "<a href='https://talon.one'>Talon.One</a> is the world's most flexible Promotion Engine. Create, manage and track coupon codes, discount campaigns, loyalty programs and referrals in one system.",
- "version": "0.0.1",
- "permissions": {
- "allow_consent_state": true,
- "allow_access_mpid": true,
- "allow_user_attributes": true,
- "allow_audience_user_attributes": true,
- "user_identities": [
- {
- "type": "email",
- "encoding": "raw",
- "required": false,
- "value": "john@doe.com"
}, - {
- "type": "customerId",
- "encoding": "raw",
- "required": false,
- "value": "0a7e3eb4-911d-4b8b"
}
]
}, - "audience_processing_registration": {
- "account_settings": [
- {
- "type": "text",
- "id": "deploymentURL",
- "name": "Deployment URL",
- "description": "URL of your Talon.One deployment",
- "visible": true,
- "required": true,
- "confidential": true,
- "default_value": ""
}, - {
- "type": "text",
- "id": "apiKey",
- "name": "API Key",
- "description": "API Key to be used for requests to your Talon.One deployment",
- "visible": true,
- "required": true,
- "confidential": true,
- "default_value": ""
}, - {
- "type": "text",
- "id": "userIdField",
- "name": "User ID",
- "description": "Select which user identity to forward to Talon.One as your customer's user ID.",
- "visible": true,
- "required": true,
- "confidential": true,
- "default_value": "customerId"
}, - {
- "type": "boolean",
- "id": "runRuleEngine",
- "name": "Run Rule Engine",
- "description": "Dictates whether the Rule Engine should be run after each membership change.",
- "visible": true,
- "required": true,
- "confidential": false,
- "default_value": false
}
], - "audience_subscription_settings": [
- {
- "type": "integer",
- "id": "t1AudienceID",
- "name": "Talon.One Audience ID",
- "visible": false,
- "required": false
}
]
}, - "event_processing_registration": {
- "account_settings": [
- {
- "type": "text",
- "id": "deploymentURL",
- "name": "Deployment URL",
- "description": "URL of your Talon.One deployment",
- "visible": true,
- "required": true,
- "confidential": true,
- "default_value": ""
}, - {
- "type": "text",
- "id": "apiKey",
- "name": "API Key",
- "description": "API Key to be used for requests to your Talon.One deployment",
- "visible": true,
- "required": true,
- "confidential": true,
- "default_value": ""
}, - {
- "type": "text",
- "id": "userIdField",
- "name": "User ID",
- "description": "Select which user identity to forward to Talon.One as your customer's user ID.",
- "visible": true,
- "required": true,
- "confidential": true,
- "default_value": "customerId"
}, - {
- "type": "boolean",
- "id": "runRuleEngine",
- "name": "Run Rule Engine",
- "description": "Dictates whether the Rule Engine should be run after each membership change.",
- "visible": true,
- "required": true,
- "confidential": false,
- "default_value": false
}
], - "supported_event_types": [
- "custom_event"
], - "supported_runtime_environments": [
- "unknown",
- "android",
- "ios",
- "tvos",
- "mobileweb",
- "roku",
- "xbox",
- "firetv",
- "alexa",
- "smarttv"
], - "supported_system_notification_types": [ ],
- "max_data_age_hours": -1
}
}
Segment is a customer data platform that collects events from your web & mobile apps.
Use these endpoints to integrate with Talon.One.
Upsert customer profile Deprecated
Important: This endpoint is deprecated. We recommend you use the current Update customer profile endpoint.
Create or update the given customer profile, and creates or set the specified attributes. You can also use this endpoint to specify which audiences this customer has joined or left.Note: The audiences must be created first with Create audience.
Authorizations:
path Parameters
customerProfileId required | string Example: customer1 The integration ID of the customer profile. |
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
object Property to set the attributes of your choice to the values of your choice. New attributes are created automatically. For more information, see Attributes. | |
runRuleEngine | boolean Default: false Indicates whether to run the Rule Engine. If If
|
object A list of audiences where the customer should be removed or added. | |
Array of objects Allows you to set the type of the attribute to create instead of relying on auto-type detection. For example, if you have a Note: List types cannot be converted. A |
Responses
Request samples
- Payload
{- "runRuleEngine": false,
- "audiencesChanges": {
- "adds": [
- 1,
- 2,
- 3
], - "deletes": [
- 4,
- 5,
- 6
]
}, - "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "attributesInfo": [
- {
- "name": "ProductClicked",
- "type": "boolean"
}
]
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "customerProfile": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "integrationId": "URNGV8294NV",
- "closedSessions": 3,
- "totalSales": 299.99,
- "audienceMemberships": [
- {
- "id": 6,
- "name": "audience1"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "createdAttributes": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "entity": "CustomerProfile",
- "eventType": "event",
- "name": "country",
- "title": "Country",
- "type": "string",
- "description": "a description",
- "suggestions": [
- "suggestion1",
- "suggestion2"
], - "hasAllowedList": false,
- "restrictedBySuggestions": false,
- "editable": false,
- "subscribedApplicationsIds": [
- 10,
- 20,
- 100
], - "eventTypeId": 22
}
]
}
Upsert customer profile V2 Deprecated
Important: This endpoint is deprecated. We recommend you use the current Update customer profile endpoint.
Create or update the given customer profile, and also creates or set the specified attributes and audiences.You do not have to create attributes or audiences before using this endpoint.
Authorizations:
path Parameters
customerProfileId required | string Example: customer1 The integration ID of the customer profile. |
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
object Property to set the attributes of your choice to the values of your choice. New attributes are created automatically. For more information, see Attributes. | |
runRuleEngine | boolean Default: false Indicates whether to run the Rule Engine. If If
|
object | |
Array of objects Allows you to set the type of the attribute to create instead of relying on auto-type detection. For example, if you have a Note: List types cannot be converted. A |
Responses
Request samples
- Payload
{- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "runRuleEngine": false,
- "audiencesChanges": {
- "adds": [
- {
- "integrationId": "My_Travel_audience1",
- "name": "Travel audience 18-25"
}
], - "deletes": [
- {
- "integrationId": "My_Travel_audience1",
- "name": "Travel audience 18-25"
}
]
}, - "attributesInfo": [
- {
- "name": "ProductClicked",
- "type": "boolean"
}
]
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "customerProfile": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "integrationId": "URNGV8294NV",
- "closedSessions": 3,
- "totalSales": 299.99,
- "audienceMemberships": [
- {
- "id": 6,
- "name": "audience1"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "createdAttributes": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "entity": "CustomerProfile",
- "eventType": "event",
- "name": "country",
- "title": "Country",
- "type": "string",
- "description": "a description",
- "suggestions": [
- "suggestion1",
- "suggestion2"
], - "hasAllowedList": false,
- "restrictedBySuggestions": false,
- "editable": false,
- "subscribedApplicationsIds": [
- 10,
- 20,
- 100
], - "eventTypeId": 22
}
], - "audiences": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "name": "Travel audience",
- "integration": "My platform name",
- "integrationId": "382370BKDB946",
- "status": "new"
}
]
}
Update customer profile
Update or create a customer profile. This endpoint triggers the Rule Builder.
You can use this endpoint to:
- Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first.
- Modify the audience the customer profile is a member of.
Authorizations:
path Parameters
customerProfileId required | string Example: customer1 The integration ID of the customer profile. |
query Parameters
skipNonExistingAttributes | boolean Example: skipNonExistingAttributes=true Indicates whether to skip non-existing attributes. If If |
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
object Property to set the attributes of your choice to the values of your choice. New attributes are created automatically. For more information, see Attributes. | |
runRuleEngine | boolean Default: false Indicates whether to run the Rule Engine. If If
|
object A list of audiences where the customer should be removed or added. |
Responses
Request samples
- Payload
{- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "runRuleEngine": false,
- "audiencesChanges": {
- "adds": [
- 1,
- 2,
- 3
], - "deletes": [
- 4,
- 5,
- 6
]
}
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "customerProfile": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "integrationId": "URNGV8294NV",
- "closedSessions": 3,
- "totalSales": 299.99,
- "audienceMemberships": [
- {
- "id": 6,
- "name": "audience1"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "type": "pageViews",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "sessionId": "175KJPS947296",
- "effects": [
- [
- 4208,
- 20095,
- 0,
- [
- "showNotification",
- "Info",
- "My title",
- "My content"
]
]
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URN-GV8294NV",
- "accountId": 23,
- "loyaltyProgramId": 323414846,
- "eventId": 3,
- "amount": 100,
- "reason": "customer appeasment",
- "expiryDate": "2021-06-10T09:05:27.993483Z",
- "referenceId": 5
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 20,
- "referralId": 4,
- "reason": "ReferralNotFound"
}, - "warnings": { }
}
}, - "loyalty": {
- "cards": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "programID": 125,
- "status": "string",
- "identifier": "string",
- "usersPerCardLimit": 111,
- "profiles": [
- {
- "integrationId": "string",
- "timestamp": "2021-09-12T10:12:42Z"
}
], - "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}
}
}, - "triggeredCampaigns": [
- {
- "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
}
], - "ruleFailureReasons": [
- {
- "campaignID": 0,
- "campaignName": "string",
- "rulesetID": 0,
- "couponID": 4928,
- "couponValue": "string",
- "referralID": 0,
- "referralValue": "string",
- "ruleIndex": 0,
- "ruleName": "string",
- "conditionIndex": 0,
- "effectIndex": 0,
- "details": "string"
}
], - "awardedGiveaways": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "code": "string",
- "poolId": 0,
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "attributes": { },
- "used": true,
- "importId": 0
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": {
- "value": "string"
}
}
], - "createdCoupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "createdReferrals": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe"
}
]
}
Update audiences in multiple customer profiles
Update the specified audiences for the specified profiles.
If a provided customer profile doesn't exist, it is created automatically.
Authorizations:
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
Array of objects Indicates audience changes for a selected profile. Note: The total number of | |||||||
Array
|
Responses
Request samples
- Payload
{- "data": [
- {
- "adds": [
- 1,
- 2,
- 3
], - "deletes": [
- 4,
- 5,
- 6
], - "customerProfileId": "URN-GV8294NV"
}
]
}
Response samples
- 400
- 401
- 404
- 429
{- "StatusCode": 400,
- "Error": "No Deployment URL specified",
- "RequestUUID": "fd2f7c55-d064-46e1-ab87-a39cb877cd82"
}
Track event Deprecated
Important: This endpoint is deprecated. We recommend you use the current Track Event endpoint.
Triggers a custom event inside Talon.One. You can then trigger rules when this event is received.An event is a type of custom attribute, you must create it first in the Campaign Manager. See creating custom events. To see the events received by your Application in Talon.One, open the Application and click Events.
If the specified session already exists, it must belong to the same
profileId
or an error will be returned.
Authorizations:
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
eventType required | string <string> The event type, as defined in Talon.One when you created the custom attribute representing this event. |
type required | string <string> Enum: "string" "time" "number" "boolean" "location" "(list string)" "(list number)" "(list time)" "(list location)" The data type of the event, as defined in Talon.One when you created the custom attribute representing this event. |
customerProfileId required | string <string> <= 1000 characters Unique Customer Profile ID. |
object Property to set the attributes of your choice to the values of your choice. New attributes are created automatically. For more information, see Attributes. | |
Array of objects Allows you to set the type of the attribute to create instead of relying on auto-type detection. For example, if you have a Note: List types cannot be converted. A |
Responses
Request samples
- Payload
{- "customerProfileId": "URN-GV8294NV",
- "eventType": "mySegmentEvent",
- "type": "string",
- "eventAttributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "attributesInfo": [
- {
- "name": "ProductClicked",
- "type": "boolean"
}
]
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "customerSession": {
- "id": 6,
- "created": "2020-02-07T08:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "couponCodes": [
- "XMAS-20-2021"
], - "referralCode": "NT2K54D9",
- "loyaltyCards": [
- "loyalty-card-1"
], - "state": "open",
- "cartItems": [
- {
- "name": "Air Glide",
- "sku": "SKU1241028",
- "quantity": 1,
- "returnedQuantity": 1,
- "remainingQuantity": 1,
- "price": 99.99,
- "category": "shoes",
- "weight": 1130,
- "height": 0,
- "width": 0,
- "length": 0,
- "position": 0,
- "attributes": {
- "image": "11.jpeg",
- "material": "leather"
}, - "additionalCosts": {
- "shipping": {
- "price": 9
}
}
}
], - "additionalCosts": {
- "shipping": {
- "price": 9
}
}, - "identifiers": [
- "91.11.156.141"
], - "attributes": {
- "ShippingCity": "Berlin"
}, - "firstSession": true,
- "total": 119.99,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 20,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "integrationId": "URNGV8294NV",
- "closedSessions": 3,
- "totalSales": 299.99,
- "audienceMemberships": [
- {
- "id": 6,
- "name": "audience1"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "type": "pageViews",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "sessionId": "175KJPS947296",
- "effects": [
- [
- 4208,
- 20095,
- 0,
- [
- "showNotification",
- "Info",
- "My title",
- "My content"
]
]
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URN-GV8294NV",
- "accountId": 23,
- "loyaltyProgramId": 323414846,
- "eventId": 3,
- "amount": 100,
- "reason": "customer appeasment",
- "expiryDate": "2021-06-10T09:05:27.993483Z",
- "referenceId": 5
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 20,
- "referralId": 4,
- "reason": "ReferralNotFound"
}, - "warnings": { }
}
}, - "loyalty": {
- "cards": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "programID": 125,
- "status": "string",
- "identifier": "string",
- "usersPerCardLimit": 111,
- "profiles": [
- {
- "integrationId": "string",
- "timestamp": "2021-09-12T10:12:42Z"
}
], - "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}
}
}, - "referral": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe",
- "referredCustomers": [
- "string"
]
}, - "coupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "triggeredCampaigns": [
- {
- "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
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": {
- "value": "string"
}
}
], - "ruleFailureReasons": [
- {
- "campaignID": 0,
- "campaignName": "string",
- "rulesetID": 0,
- "couponID": 4928,
- "couponValue": "string",
- "referralID": 0,
- "referralValue": "string",
- "ruleIndex": 0,
- "ruleName": "string",
- "conditionIndex": 0,
- "effectIndex": 0,
- "details": "string"
}
], - "createdCoupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "createdReferrals": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe"
}
], - "awardedGiveaways": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "code": "string",
- "poolId": 0,
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "attributes": { },
- "used": true,
- "importId": 0
}
], - "return": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}, - "previousReturns": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}
]
}
Track event
Trigger a custom event inside Talon.One. You can then trigger rules when this event is received.
An event is a type of custom attribute, you must create it first in the Campaign Manager. See creating custom events. To see the events received by your Application in Talon.One, open the Application and click Events.
If the specified session already exists, it must belong to the same profileId
, or else an error is returned.
Note:
- Create the event and all the required attributes before using this endpoint.
- This
v2
version replaces the previousv1
version of this endpoint.
Authorizations:
query Parameters
skipNonExistingAttributes | boolean Example: skipNonExistingAttributes=true Indicates whether to skip non-existing attributes. If If |
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
eventType required | string <string> The event type, as defined in Talon.One when you created the custom attribute representing this event. |
object Property to set the attributes of your choice to the values of your choice. New attributes are created automatically. For more information, see Attributes. | |
customerProfileId | string <string> <= 1000 characters Unique Customer Profile ID. |
Responses
Request samples
- Payload
{- "eventType": "mySegmentEvent",
- "eventAttributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "customerProfileId": "URN-GV8294NV"
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "customerSession": {
- "id": 6,
- "created": "2020-02-07T08:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "couponCodes": [
- "XMAS-20-2021"
], - "referralCode": "NT2K54D9",
- "loyaltyCards": [
- "loyalty-card-1"
], - "state": "open",
- "cartItems": [
- {
- "name": "Air Glide",
- "sku": "SKU1241028",
- "quantity": 1,
- "returnedQuantity": 1,
- "remainingQuantity": 1,
- "price": 99.99,
- "category": "shoes",
- "weight": 1130,
- "height": 0,
- "width": 0,
- "length": 0,
- "position": 0,
- "attributes": {
- "image": "11.jpeg",
- "material": "leather"
}, - "additionalCosts": {
- "shipping": {
- "price": 9
}
}
}
], - "additionalCosts": {
- "shipping": {
- "price": 9
}
}, - "identifiers": [
- "91.11.156.141"
], - "attributes": {
- "ShippingCity": "Berlin"
}, - "firstSession": true,
- "total": 119.99,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 20,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "integrationId": "URNGV8294NV",
- "closedSessions": 3,
- "totalSales": 299.99,
- "audienceMemberships": [
- {
- "id": 6,
- "name": "audience1"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "type": "pageViews",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "sessionId": "175KJPS947296",
- "effects": [
- [
- 4208,
- 20095,
- 0,
- [
- "showNotification",
- "Info",
- "My title",
- "My content"
]
]
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URN-GV8294NV",
- "accountId": 23,
- "loyaltyProgramId": 323414846,
- "eventId": 3,
- "amount": 100,
- "reason": "customer appeasment",
- "expiryDate": "2021-06-10T09:05:27.993483Z",
- "referenceId": 5
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 20,
- "referralId": 4,
- "reason": "ReferralNotFound"
}, - "warnings": { }
}
}, - "loyalty": {
- "cards": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "programID": 125,
- "status": "string",
- "identifier": "string",
- "usersPerCardLimit": 111,
- "profiles": [
- {
- "integrationId": "string",
- "timestamp": "2021-09-12T10:12:42Z"
}
], - "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}
}
}, - "referral": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe",
- "referredCustomers": [
- "string"
]
}, - "coupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "triggeredCampaigns": [
- {
- "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
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": {
- "value": "string"
}
}
], - "ruleFailureReasons": [
- {
- "campaignID": 0,
- "campaignName": "string",
- "rulesetID": 0,
- "couponID": 4928,
- "couponValue": "string",
- "referralID": 0,
- "referralValue": "string",
- "ruleIndex": 0,
- "ruleName": "string",
- "conditionIndex": 0,
- "effectIndex": 0,
- "details": "string"
}
], - "createdCoupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "createdReferrals": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe"
}
], - "awardedGiveaways": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "code": "string",
- "poolId": 0,
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "attributes": { },
- "used": true,
- "importId": 0
}
], - "return": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}, - "previousReturns": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}
]
}
Create audience
Create an audience. The audience can be created directly from scratch or can come from Segment.
Once you create your first audience, audience-specific rule conditions are enabled in the Rule Builder
Authorizations:
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
audienceId required | string <string> [ 1 .. 1000 ] characters The integration ID of this audience. If the audience comes from a third-party platform, set this property to the ID given by the third-party platform. |
audienceName required | string <string> [ 1 .. 1000 ] characters The human-friendly display name for this audience. |
Responses
Request samples
- Payload
{- "audienceId": "382370BKDB946",
- "audienceName": "Travel audience"
}
Response samples
- 201
- 400
- 401
- 404
- 409
- 429
{- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "name": "Travel audience",
- "integration": "My platform name",
- "integrationId": "382370BKDB946"
}
Update audience
Update an audience.
Authorizations:
path Parameters
audienceId required | string Example: audience1 The integration ID of the audience. |
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Request Body schema: application/json
audienceId required | string <string> [ 1 .. 1000 ] characters The integration ID of this audience. If the audience comes from a third-party platform, set this property to the ID given by the third-party platform. |
audienceName required | string <string> [ 1 .. 1000 ] characters The human-friendly display name for this audience. |
Responses
Request samples
- Payload
{- "audienceId": "382370BKDB946",
- "audienceName": "Travel audience"
}
Response samples
- 200
- 400
- 401
- 404
- 429
{- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "name": "Travel audience",
- "integration": "My platform name",
- "integrationId": "382370BKDB946"
}
Delete audience
Delete the audience.
Warning: This endpoint also removes any associations recorded between a customer profile and this audience.
Authorizations:
path Parameters
audienceId required | string Example: audience1 The integration ID of the audience. |
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
Responses
Response samples
- 400
- 401
- 404
- 429
{- "StatusCode": 400,
- "Error": "No Deployment URL specified",
- "RequestUUID": "fd2f7c55-d064-46e1-ab87-a39cb877cd82"
}
Update customer session Deprecated
Important: This endpoint is deprecated. We recommend you use the current Update customer session endpoint.
Update the given customer session, or creates it if it doesn't exist.Customer sessions are a key concept in Talon.One, see the documentation.
This endpoint also allows you to define a callback where the response will be sent. See the Header parameters section below.
Authorizations:
path Parameters
customerSessionId required | string Example: session1 The You can see existing customer session integration IDs in the Campaign Manager's Sessions menu, or via the List Application session endpoint. |
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
X-Callback-Destination-URI | string <hostname> Example: http://mydomain.com/api/callbacks The full URI where Talon.One sends the response content. The callback is a |
X-Callback-API-Key | string Example: Authorization 3aa74d582bd9479c59e16f970fe13bf3 The header and the API key, separated by a space. The first space marks the header. For example:
The minimal length of the API key is 32 characters. |
X-Content-Fields | string Enum: "customerSession" "customerProfile" "coupons" "triggeredCampaigns" "referral" "loyalty" "event" "awardedGiveaways" "ruleFailureReasons" "previousReturns" … 4 more Example: customerProfile A comma-separated list of field names from the Update customer endpoint's response that you want to receive. If omitted, all the fields will be sent to the callback destination URI. |
X-Correlation-ID | string Example: abc123 An arbitrary ID assigned to the callback request. You can use it to track the callbacks you receive from Talon.One.
If omitted, the callback request does not include |
Request Body schema: application/json
object | |
Array of objects Allows you to set the type of the attribute to create instead of relying on auto-type detection. For example, if you have a Note: List types cannot be converted. A | |
Array of objects Allows you to set the type of the attribute to create instead of relying on auto-type detection. For example, if you have a Note: List types cannot be converted. A |
Responses
Request samples
- Payload
{- "customerSession": {
- "profileId": "URN-GV8294NV",
- "couponCodes": [
- "XMAS-20-2021"
], - "referralCode": "NT2K54D9",
- "loyaltyCards": [
- "loyalty-card-1"
], - "state": "open",
- "cartItems": [
- {
- "name": "Air Glide",
- "sku": "SKU1241028",
- "quantity": 1,
- "returnedQuantity": 1,
- "remainingQuantity": 1,
- "price": 99.99,
- "category": "shoes",
- "weight": 1130,
- "height": 0,
- "width": 0,
- "length": 0,
- "position": 0,
- "attributes": {
- "image": "11.jpeg",
- "material": "leather"
}, - "additionalCosts": {
- "shipping": {
- "price": 9
}
}
}
], - "additionalCosts": {
- "shipping": {
- "price": 9
}
}, - "identifiers": [
- "91.11.156.141"
], - "attributes": {
- "ShippingCity": "Berlin"
}
}, - "sessionAttributesInfo": [
- {
- "name": "ProductClicked",
- "type": "boolean"
}
], - "cartItemAttributesInfo": [
- {
- "name": "ProductClicked",
- "type": "boolean"
}
]
}
Response samples
- 200
- 400
- 401
- 429
{- "customerSession": {
- "id": 6,
- "created": "2020-02-07T08:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "couponCodes": [
- "XMAS-20-2021"
], - "referralCode": "NT2K54D9",
- "loyaltyCards": [
- "loyalty-card-1"
], - "state": "open",
- "cartItems": [
- {
- "name": "Air Glide",
- "sku": "SKU1241028",
- "quantity": 1,
- "returnedQuantity": 1,
- "remainingQuantity": 1,
- "price": 99.99,
- "category": "shoes",
- "weight": 1130,
- "height": 0,
- "width": 0,
- "length": 0,
- "position": 0,
- "attributes": {
- "image": "11.jpeg",
- "material": "leather"
}, - "additionalCosts": {
- "shipping": {
- "price": 9
}
}
}
], - "additionalCosts": {
- "shipping": {
- "price": 9
}
}, - "identifiers": [
- "91.11.156.141"
], - "attributes": {
- "ShippingCity": "Berlin"
}, - "firstSession": true,
- "total": 119.99,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 20,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "integrationId": "URNGV8294NV",
- "closedSessions": 3,
- "totalSales": 299.99,
- "audienceMemberships": [
- {
- "id": 6,
- "name": "audience1"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "type": "pageViews",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "sessionId": "175KJPS947296",
- "effects": [
- [
- 4208,
- 20095,
- 0,
- [
- "showNotification",
- "Info",
- "My title",
- "My content"
]
]
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URN-GV8294NV",
- "accountId": 23,
- "loyaltyProgramId": 323414846,
- "eventId": 3,
- "amount": 100,
- "reason": "customer appeasment",
- "expiryDate": "2021-06-10T09:05:27.993483Z",
- "referenceId": 5
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 20,
- "referralId": 4,
- "reason": "ReferralNotFound"
}, - "warnings": { }
}
}, - "loyalty": {
- "cards": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "programID": 125,
- "status": "string",
- "identifier": "string",
- "usersPerCardLimit": 111,
- "profiles": [
- {
- "integrationId": "string",
- "timestamp": "2021-09-12T10:12:42Z"
}
], - "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}
}
}, - "referral": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe",
- "referredCustomers": [
- "string"
]
}, - "coupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "triggeredCampaigns": [
- {
- "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
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": {
- "value": "string"
}
}
], - "ruleFailureReasons": [
- {
- "campaignID": 0,
- "campaignName": "string",
- "rulesetID": 0,
- "couponID": 4928,
- "couponValue": "string",
- "referralID": 0,
- "referralValue": "string",
- "ruleIndex": 0,
- "ruleName": "string",
- "conditionIndex": 0,
- "effectIndex": 0,
- "details": "string"
}
], - "createdCoupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "createdReferrals": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe"
}
], - "awardedGiveaways": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "code": "string",
- "poolId": 0,
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "attributes": { },
- "used": true,
- "importId": 0
}
], - "return": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}, - "previousReturns": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}
]
}
Update customer session
Update the given customer session, or create a customer session if it doesn't exist.
Customer sessions are a key concept in Talon.One, see the documentation.
This endpoint also allows you to define a callback where the response will be sent. See the Header parameters section below.
Note:
- Create all the required attributes before using this endpoint.
- This
v2
version replaces the previousv1
version of this endpoint.
Authorizations:
path Parameters
customerSessionId required | string Example: session1 The You can see the existing customer session integration IDs in the Campaign Manager's Sessions menu, or via the List Application session endpoint. |
query Parameters
skipNonExistingAttributes | boolean Example: skipNonExistingAttributes=true Indicates whether to skip non-existing attributes. If If |
header Parameters
destination-hostname required | string <hostname> Example: mycompany.europe-west1.talon.one The base URL of your Talon.One deployment. |
X-Callback-Destination-URI | string <hostname> Example: http://mydomain.com/api/callbacks The full URI where Talon.One sends the response content. The callback is a |
X-Callback-API-Key | string Example: Authorization 3aa74d582bd9479c59e16f970fe13bf3 The header and the API key, separated by a space. The first space marks the header. For example:
The minimal length of the API key is 32 characters. |
X-Content-Fields | string Enum: "customerSession" "customerProfile" "coupons" "triggeredCampaigns" "referral" "loyalty" "event" "awardedGiveaways" "ruleFailureReasons" "previousReturns" … 4 more Example: customerProfile A comma-separated list of field names from the Update customer endpoint's response that you want to receive. If omitted, all the fields will be sent to the callback destination URI. |
X-Correlation-ID | string Example: abc123 An arbitrary ID assigned to the callback request. You can use it to track the callbacks you receive from Talon.One.
If omitted, the callback request does not include |
Request Body schema: application/json
profileId | string ID of the customers profile as used within this Talon.One account. |
couponCodes | Array of strings[ items <= 100 characters ] Any coupon codes entered. Important: If you create a coupon budget for your campaign, ensure the session contains a coupon code by the time you close it. |
referralCode | string <= 100 characters Any referral code entered. Important: If you create a referral budget for your campaign, ensure the session contains a referral code by the time you close it. |
loyaltyCards | Array of strings <= 1 items Any loyalty cards used. |
state | string Default: "open" Enum: "open" "closed" "partially_returned" "cancelled" Indicates the current state of the session. Sessions can be created as
For more information, see Customer session states. |
Array of objects The items to add to this sessions.
| |
object Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See Managing additional costs. | |
identifiers | Array of strings <= 5 items Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the tutorial. Important: If you create a unique identifier budget for your campaign, ensure the session contains an identifier by the time you close it. |
object Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. You can use built-in attributes or custom ones. Custom attributes must be created in the Campaign Manager before you set them with this property. |
Responses
Request samples
- Payload
{- "profileId": "URN-GV8294NV",
- "couponCodes": [
- "XMAS-20-2021"
], - "referralCode": "NT2K54D9",
- "loyaltyCards": [
- "loyalty-card-1"
], - "state": "open",
- "cartItems": [
- {
- "name": "Air Glide",
- "sku": "SKU1241028",
- "quantity": 1,
- "returnedQuantity": 1,
- "remainingQuantity": 1,
- "price": 99.99,
- "category": "shoes",
- "weight": 1130,
- "height": 0,
- "width": 0,
- "length": 0,
- "position": 0,
- "attributes": {
- "image": "11.jpeg",
- "material": "leather"
}, - "additionalCosts": {
- "shipping": {
- "price": 9
}
}
}
], - "additionalCosts": {
- "shipping": {
- "price": 9
}
}, - "identifiers": [
- "91.11.156.141"
], - "attributes": {
- "ShippingCity": "Berlin"
}
}
Response samples
- 200
- 400
- 401
- 429
{- "customerSession": {
- "id": 6,
- "created": "2020-02-07T08:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "couponCodes": [
- "XMAS-20-2021"
], - "referralCode": "NT2K54D9",
- "loyaltyCards": [
- "loyalty-card-1"
], - "state": "open",
- "cartItems": [
- {
- "name": "Air Glide",
- "sku": "SKU1241028",
- "quantity": 1,
- "returnedQuantity": 1,
- "remainingQuantity": 1,
- "price": 99.99,
- "category": "shoes",
- "weight": 1130,
- "height": 0,
- "width": 0,
- "length": 0,
- "position": 0,
- "attributes": {
- "image": "11.jpeg",
- "material": "leather"
}, - "additionalCosts": {
- "shipping": {
- "price": 9
}
}
}
], - "additionalCosts": {
- "shipping": {
- "price": 9
}
}, - "identifiers": [
- "91.11.156.141"
], - "attributes": {
- "ShippingCity": "Berlin"
}, - "firstSession": true,
- "total": 119.99,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 20,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "accountId": 6,
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "integrationId": "URNGV8294NV",
- "closedSessions": 3,
- "totalSales": 299.99,
- "audienceMemberships": [
- {
- "id": 6,
- "name": "audience1"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URN-GV8294NV",
- "type": "pageViews",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE",
- "ProductClicked": true
}, - "sessionId": "175KJPS947296",
- "effects": [
- [
- 4208,
- 20095,
- 0,
- [
- "showNotification",
- "Info",
- "My title",
- "My content"
]
]
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URN-GV8294NV",
- "accountId": 23,
- "loyaltyProgramId": 323414846,
- "eventId": 3,
- "amount": 100,
- "reason": "customer appeasment",
- "expiryDate": "2021-06-10T09:05:27.993483Z",
- "referenceId": 5
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 20,
- "referralId": 4,
- "reason": "ReferralNotFound"
}, - "warnings": { }
}
}, - "loyalty": {
- "cards": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "programID": 125,
- "status": "string",
- "identifier": "string",
- "usersPerCardLimit": 111,
- "profiles": [
- {
- "integrationId": "string",
- "timestamp": "2021-09-12T10:12:42Z"
}
], - "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}, - "property2": {
- "currentBalance": 10.5,
- "pendingBalance": 5.1,
- "expiredBalance": 2,
- "spentBalance": 0,
- "tentativeCurrentBalance": 0,
- "pointsToNextTier": 10,
- "currentTier": {
- "id": 112345,
- "name": "silver-tier"
}
}
}
}
}
}, - "referral": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe",
- "referredCustomers": [
- "string"
]
}, - "coupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "triggeredCampaigns": [
- {
- "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
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": {
- "value": "string"
}
}
], - "ruleFailureReasons": [
- {
- "campaignID": 0,
- "campaignName": "string",
- "rulesetID": 0,
- "couponID": 4928,
- "couponValue": "string",
- "referralID": 0,
- "referralValue": "string",
- "ruleIndex": 0,
- "ruleName": "string",
- "conditionIndex": 0,
- "effectIndex": 0,
- "details": "string"
}
], - "createdCoupons": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "campaignId": 211,
- "value": "XMAS-20-2021",
- "usageLimit": 100,
- "discountLimit": 30,
- "startDate": "2019-08-24T14:15:22Z",
- "expiryDate": "2019-08-24T14:15:22Z",
- "limits": [
- {
- "action": "createCoupon",
- "limit": 1000,
- "period": "yearly",
- "entities": [
- "Coupon"
]
}
], - "usageCounter": 10,
- "discountCounter": 0,
- "discountRemainder": 0,
- "attributes": { },
- "referralId": 326632952,
- "recipientIntegrationId": "URNGV8294NV",
- "importId": 0,
- "reservation": false,
- "batchId": "32535-43255"
}
], - "createdReferrals": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { },
- "importId": 0,
- "code": "27G47Y54VH9L",
- "usageCounter": 1,
- "batchId": "tqyrgahe"
}
], - "awardedGiveaways": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "code": "string",
- "poolId": 0,
- "startDate": "2019-08-24T14:15:22Z",
- "endDate": "2019-08-24T14:15:22Z",
- "attributes": { },
- "used": true,
- "importId": 0
}
], - "return": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}, - "previousReturns": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "accountId": 6,
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
], - "eventId": 123,
- "sessionId": 123,
- "sessionIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "profileId": 123,
- "profileIntegrationId": "0c0e0207-eb30-4e06-a56c-2b7c8a64953c",
- "createdBy": 123
}
]
}