Integration API reference docs (1.0.0)
Download OpenAPI specification:Download
Use the Integration API to push data to and retrieve data from Talon.One in real time. For more background information about this API, see Integration API overview
For example, use this API to share shopping cart information as a session with Talon.One and evaluate promotion rules. You can also create custom events to track specific actions that do not fit into the session data model.
Ensure you authenticate to make requests to the API.
Are you looking for a different API? If you need the API to:
- Interact with the Campaign Manager for backoffice operations, see the Management API reference docs
- Integrate with Talon.One from a CEP or CDP platform, see the Third-party API reference docs.
api_key_v1
To authenticate in order to use the Integration API, generate an API key in the Campaign Manager
then prefix it with ApiKey-v1
.
To generate an API key:
- Log on to the Campaign Manager and open the Application of your choice, or create one.
- Click Settings > Developer settings.
- Click Create API Key and give it a title and an expiration date, then click Create API Key.
You can now use the API key in the HTTP header, prefixing it with ApiKey-v1
:
Authorization: ApiKey-v1 dbc644d33aa74d582bd9479c59e16f970fe13bf3
Or use it inside an SDK, for example, with the JAVA SDK:
iApi.getApiClient().setApiKeyPrefix("ApiKey-v1");
iApi.getApiClient().setApiKey("dbc644d33aa74d582bd9479c59e16f970fe13bf3");
Security Scheme Type | API Key |
---|---|
Header parameter name: | Authorization |
Create audience
Create an audience. The audience can be created directly from scratch or can come from third party platforms.
To create an audience from an existing audience from a technology partner:
- Set the
integration
property tomparticle
,segment
etc., depending on a third-party platform. - Set
integrationId
to the ID of this audience in a third-party platform.
To create an audience from an existing audience in another platform:
- Do not use the
integration
property. - Set
integrationId
to the ID of this audience in the 3rd-party platform.
To create an audience from scratch:
- Only set the
name
property.
Once you create your first audience, audience-specific rule conditions are enabled in the Rule Builder.
Authorizations:
Request Body schema: application/json
name required | string non-empty The human-friendly display name for this audience. |
integration | string The Talon.One-supported 3rd-party platform that this audience was created in. For example, Note: If you do not integrate with any of these platforms, do not use this property. |
integrationId | string [ 1 .. 1000 ] characters The ID of this audience in the third-party integration. Note: To create an audience that doesn't come from a 3rd party platform, do not use this property. |
Responses
Request samples
- Payload
{- "name": "Travel audience",
- "integration": "mparticle",
- "integrationId": "382370BKDB946"
}
Response samples
- 201
- 400
- 401
- 409
{- "accountId": 3886,
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "name": "Travel audience",
- "integration": "mparticle",
- "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.
path Parameters
audienceId required | integer The ID of the audience. You get it via the |
Responses
Response samples
- 400
- 401
- 404
{- "message": "string",
- "errors": [
- {
- "title": "string",
- "details": "string",
- "source": {
- "pointer": "string",
- "parameter": "string",
- "line": "string",
- "resource": "string"
}
}
], - "StatusCode": 0
}
Update audience
Update an Audience created by a third-party integration.
Authorizations:
path Parameters
audienceId required | integer The ID of the audience. You get it via the |
Request Body schema: application/json
name required | string non-empty The human-friendly display name for this audience. |
Responses
Request samples
- Payload
{- "name": "mPTravel"
}
Response samples
- 200
- 401
- 404
{- "accountId": 3886,
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "name": "Travel audience",
- "integration": "mparticle",
- "integrationId": "382370BKDB946"
}
Delete audience memberships
Remove all members from this audience.
path Parameters
audienceId required | integer The ID of the audience. You get it via the |
Responses
Response samples
- 401
- 404
{- "message": "string",
- "errors": [
- {
- "title": "string",
- "details": "string",
- "source": {
- "pointer": "string",
- "parameter": "string",
- "line": "string",
- "resource": "string"
}
}
], - "StatusCode": 0
}
Update multiple customer profiles' audiences
Update the specified customer profiles with the specified audiences. Use this endpoint when customers join or leave audiences.
The limit of customer profiles per request is 1000.
Authorizations:
Request Body schema: application/json
Array of objects <= 1000 [ items ] | |||||||
Array
|
Responses
Request samples
- Payload
{- "data": [
- {
- "action": "add",
- "profileIntegrationId": "R195412",
- "audienceId": 748
}
]
}
Response samples
- 400
- 401
- 404
{- "message": "string",
- "errors": [
- {
- "title": "string",
- "details": "string",
- "source": {
- "pointer": "string",
- "parameter": "string",
- "line": "string",
- "resource": "string"
}
}
], - "StatusCode": 0
}
Update profile attributes for all customers in audience
Update the specified profile attributes to the provided values for all customers in the specified audience.
Authorizations:
path Parameters
audienceId required | integer The ID of the audience. You get it via the |
Request Body schema: application/json
property name* | any |
Responses
Request samples
- Payload
{- "my_attribute_1": "some value",
- "my_attribute_2": "some other value",
- "my_attribute_3": "some other value"
}
Response samples
- 401
- 404
{- "message": "string",
- "errors": [
- {
- "title": "string",
- "details": "string",
- "source": {
- "pointer": "string",
- "parameter": "string",
- "line": "string",
- "resource": "string"
}
}
], - "StatusCode": 0
}
Coupons are unique codes belonging to a particular campaign. They don't define any behavior on their own, instead the campaign ruleset can include rules that validate coupons and carry out particular effects.
Create coupon reservation
Create a coupon reservation for specified customer profiles on the specified coupon.
Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the List customer data endpoint.
If a coupon gets created for a specific user, it will automatically show up in their coupons.
When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the List customer data endpoint.
Important:
- This endpoint creates a soft reservation. Any customer can use a reserved coupon code and proceed to checkout.
- To create a hard reservation, use the
Create coupons or
Create coupons for multiple recipients endpoints
setting the
recipientsIntegrationId
property.
For example, you can use this endpoint and List customer data
to create a coupon wallet by
reserving coupon codes for a customer, and then displaying their coupon wallet
when they visit your store.
Authorizations:
path Parameters
couponValue required | string The code of the coupon. |
Request Body schema: application/json
integrationIDs required | Array of strings List of customer integration IDs. |
Responses
Request samples
- Payload
{- "integrationIDs": [
- "ty238-32fke9",
- "3gy32-008ye9"
]
}
Response samples
- 201
- 400
- 401
- 404
{- "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"
}
Delete coupon reservations
Remove all the coupon reservations from the provided customer profile integration IDs and the provided coupon code.
Authorizations:
path Parameters
couponValue required | string The code of the coupon. |
Request Body schema: application/json
integrationIDs required | Array of strings List of customer integration IDs. |
Responses
Request samples
- Payload
{- "integrationIDs": [
- "ty238-32fke9",
- "3gy32-008ye9"
]
}
Response samples
- 400
- 401
- 404
{- "message": "string",
- "errors": [
- {
- "title": "string",
- "details": "string",
- "source": {
- "pointer": "string",
- "parameter": "string",
- "line": "string",
- "resource": "string"
}
}
], - "StatusCode": 0
}
List customers that have this coupon reserved
Return all customers that have this coupon marked as reserved.
Coupons are reserved in the following ways:
- To create a soft reservation (any customer can use the coupon), use the Create coupon reservation endpoint.
- To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given
recipientIntegrationId
or use the Create coupons or Create coupons for multiple recipients endpoints.
Authorizations:
path Parameters
couponValue required | string The code of the coupon. |
Responses
Response samples
- 200
- 400
- 401
- 404
{- "totalResultSize": 0,
- "data": [
- {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "accountId": 31,
- "closedSessions": 3,
- "totalSales": 299.99,
- "loyaltyMemberships": [
- {
- "joined": "2012-03-20T14:15:22.000Z",
- "loyaltyProgramId": 323414846
}
], - "audienceMemberships": [
- {
- "id": 0,
- "name": "string"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}
]
}
Update multiple customer profiles
Update (or create) up to 1000 customer profiles in 1 request.
The integrationId
must be any identifier that remains stable for
the customer. Do not use an ID that the customer can update
themselves. For example, you can use a database ID.
A customer profile can be linked to one or more sessions.
Authorizations:
query Parameters
silent | string Default: "yes" Possible values:
|
Request Body schema: application/json
Array of objects[ items ] | |||||
Array
|
Responses
Request samples
- Payload
{- "customerProfiles": [
- {
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "integrationId": "R195412"
}
]
}
Response samples
- 200
- 400
- 401
{- "integrationStates": [
- {
- "customerSession": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "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": null,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 0,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "accountId": 31,
- "closedSessions": 3,
- "totalSales": 299.99,
- "loyaltyMemberships": [
- {
- "joined": "2012-03-20T14:15:22.000Z",
- "loyaltyProgramId": 323414846
}
], - "audienceMemberships": [
- {
- "id": 0,
- "name": "string"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "type": "pageViews",
- "attributes": {
- "myAttribute": "myValue"
}, - "sessionId": "175KJPS947296",
- "effects": [
- "addItemToCart"
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URNGV8294NV",
- "accountId": 0,
- "loyaltyProgramId": 323414846,
- "eventId": 0,
- "amount": 100,
- "reason": "string",
- "expiryDate": "2019-08-24T14:15:22Z",
- "referenceId": 0
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 0,
- "referralId": 0,
- "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": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": null,
- "expiringPoints": null,
- "activatingPoints": null,
- "projectedBalance": null
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- null
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- null
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": null,
- "expiringPoints": null,
- "activatingPoints": null,
- "projectedBalance": null
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- null
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- null
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": null,
- "expiringPoints": null,
- "activatingPoints": null,
- "projectedBalance": null
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- null
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- null
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}
}
}, - "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": 0,
- "referralRedemptionCount": 0,
- "discountCount": 0,
- "discountEffectCount": 0,
- "couponCreationCount": 0,
- "customEffectCount": 0,
- "referralCreationCount": 0,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 0,
- "createdLoyaltyPointsCount": 0,
- "createdLoyaltyPointsEffectCount": 0,
- "redeemedLoyaltyPointsCount": 0,
- "redeemedLoyaltyPointsEffectCount": 0,
- "callApiEffectCount": 0,
- "lastActivity": "2019-08-24T14:15:22Z",
- "updated": "2019-08-24T14:15:22Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": { }
}
], - "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": 3886,
- "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": 3886,
- "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 profile
Update (or create) a Customer Profile.
Performance tips
Updating a customer profile returns a response with the requested integration state.
You can use the responseContent
property to save yourself extra API calls. For example, you can get
the customer profile details directly without extra requests.
You can also set runRuleEngine
to false
to prevent unwanted rule executions. This allows you to
improve response times.
If runRuleEngine
is set to true
, the response includes:
- The effects generated by the triggered campaigns.
- The created coupons and referral objects.
Authorizations:
path Parameters
integrationId required | string The integration identifier for this customer profile. Must be:
Once set, you cannot update this identifier. |
query Parameters
runRuleEngine | boolean Default: false Indicates whether to run the rule engine. Setting this property to |
dry | boolean Indicates whether to persist the changes. Changes are ignored when |
Request Body schema: application/json
object Arbitrary properties associated with this item | |
object | |
responseContent | Array of strings Items Enum: "customerProfile" "triggeredCampaigns" "loyalty" "event" "awardedGiveaways" "ruleFailureReasons" Optional list of extra data that you want to get in the response. Use this property to get as much data as you need in one request instead of sending extra requests to other endpoints. Note: |
Responses
Request samples
- Payload
{- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "audiencesChanges": {
- "adds": [
- 0
], - "deletes": [
- 0
]
}, - "responseContent": [
- "triggeredCampaigns",
- "customerProfile"
]
}
Response samples
- 200
- 400
- 401
- 409
{- "customerSession": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "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": null,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 0,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "accountId": 31,
- "closedSessions": 3,
- "totalSales": 299.99,
- "loyaltyMemberships": [
- {
- "joined": "2012-03-20T14:15:22.000Z",
- "loyaltyProgramId": 323414846
}
], - "audienceMemberships": [
- {
- "id": 0,
- "name": "string"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "type": "pageViews",
- "attributes": {
- "myAttribute": "myValue"
}, - "sessionId": "175KJPS947296",
- "effects": [
- "addItemToCart"
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URNGV8294NV",
- "accountId": 0,
- "loyaltyProgramId": 323414846,
- "eventId": 0,
- "amount": 100,
- "reason": "string",
- "expiryDate": "2019-08-24T14:15:22Z",
- "referenceId": 0
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 0,
- "referralId": 0,
- "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": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}
}
}, - "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": 0,
- "referralRedemptionCount": 0,
- "discountCount": 0,
- "discountEffectCount": 0,
- "couponCreationCount": 0,
- "customEffectCount": 0,
- "referralCreationCount": 0,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 0,
- "createdLoyaltyPointsCount": 0,
- "createdLoyaltyPointsEffectCount": 0,
- "redeemedLoyaltyPointsCount": 0,
- "redeemedLoyaltyPointsEffectCount": 0,
- "callApiEffectCount": 0,
- "lastActivity": "2019-08-24T14:15:22Z",
- "updated": "2019-08-24T14:15:22Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": { }
}
], - "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": 3886,
- "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": 3886,
- "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
}
]
}
Delete customer's personal data
Delete all attributes on the customer profile and on entities that reference this customer profile.
Important: To preserve performance, we recommend avoiding deleting customer data during peak-traffic hours.
Authorizations:
path Parameters
integrationId required | string The integration ID of the customer profile. You can get the
|
Responses
Response samples
- 401
- 404
{- "message": "string",
- "errors": [
- {
- "title": "string",
- "details": "string",
- "source": {
- "pointer": "string",
- "parameter": "string",
- "line": "string",
- "resource": "string"
}
}
], - "StatusCode": 0
}
List customer data
Return the customer inventory regarding entities referencing this customer profile's integrationId
.
Typical entities returned are: customer profile information, referral codes, loyalty points and reserved coupons. Reserved coupons also include redeemed coupons.
You can also use this endpoint to get the projected loyalty balances in order to notify your customers about points that are about to expire, or to remind them how many points they have.
Authorizations:
path Parameters
integrationId required | string The integration ID of the customer profile. You can get the
|
query Parameters
profile | boolean Set to |
referrals | boolean Set to |
coupons | boolean Set to |
loyalty | boolean Set to |
giveaways | boolean Set to |
loyaltyProjectionEndDate | string <date-time> Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. |
Responses
Response samples
- 200
- 401
- 404
{- "profile": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "accountId": 31,
- "closedSessions": 3,
- "totalSales": 299.99,
- "loyaltyMemberships": [
- {
- "joined": "2012-03-20T14:15:22.000Z",
- "loyaltyProgramId": 323414846
}
], - "audienceMemberships": [
- {
- "id": 0,
- "name": "string"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "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": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}
}
}, - "referrals": [
- {
- "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",
- "profileRedemptionCount": 0,
- "state": "active"
}
], - "giveaways": [
- {
- "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
}
]
}
Represents the data related to a customer session. Typically, a customer session is the value and content of the customer's cart.
Sessions can be anonymous or linked to a customer profile and they have a life cycle from open
to closed
.
In general, a session is closed when the customer completes the checkout step.
Sessions are a key concept of Talon.One, we strongly recommend you read the documentation about customer sessions.
Get customer session
Get customer session data.
Authorizations:
path Parameters
customerSessionId required | string The You can see existing customer session integration IDs in the Campaign Manager's Sessions menu, or via the List Application session endpoint. |
Responses
Response samples
- 200
- 400
- 401
{- "customerSession": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "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": null,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 0,
- "updated": "2020-02-08T14:15:22Z"
}
}
Update customer session
Update or create a customer session. For example, use this endpoint to share the content of a customer's cart with Talon.One and to check which promotion rules apply.
Note: The currency for the session and the cart items in the session is the same as the Application that owns this session.
Session management
The Talon.One platform supports multiple simultaneous sessions for the same profile. If you have multiple ways of accessing the same Application you can either:
- Track multiple independent sessions or,
- Use the same session across all of them.
You should share sessions when application access points share other state, such as the user's cart. If two points of access to the application have independent states, for example a user can have different items in their cart across the two) they should use independent customer session ID's.
See more information and tips about session management in the documentation.
Sessions and customer profiles
- To link a session to a customer profile, set the
profileId
parameter in the request body to a customer profile'sintegrationId
. - While you can create an anonymous session with
profileId=""
, we recommend you use a guest ID instead.
Note: You do not have to create a customer profile first. If the specified profile does not exist, an empty profile is created automatically.
Performance tips
Updating a customer session returns a response with the requested integration state.
You can use the responseContent
property to save yourself extra API calls. For example, you can get
the customer profile details directly without extra requests.
For more information, see the integration tutorial.
Authorizations:
path Parameters
customerSessionId required | string The You can see existing customer session integration IDs in the Campaign Manager's Sessions menu, or via the List Application session endpoint. |
query Parameters
dry | boolean Indicates whether to persist the changes. Changes are ignored when |
Request Body schema: application/json
required | object |
responseContent | Array of strings Items Enum: "customerSession" "customerProfile" "coupons" "triggeredCampaigns" "referral" "loyalty" "event" … 3 more Optional list of extra data that you want to get in the response. Use this property to get as much data as you need in one request instead of sending extra requests to other endpoints. Note: |
Responses
Request samples
- Payload
{- "customerSession": {
- "profileId": "URNGV8294NV",
- "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"
}
}, - "responseContent": [
- "customerSession",
- "customerProfile"
]
}
Response samples
- 200
- 400
- 401
- 409
{- "customerSession": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "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": null,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 0,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "accountId": 31,
- "closedSessions": 3,
- "totalSales": 299.99,
- "loyaltyMemberships": [
- {
- "joined": "2012-03-20T14:15:22.000Z",
- "loyaltyProgramId": 323414846
}
], - "audienceMemberships": [
- {
- "id": 0,
- "name": "string"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "type": "pageViews",
- "attributes": {
- "myAttribute": "myValue"
}, - "sessionId": "175KJPS947296",
- "effects": [
- "addItemToCart"
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URNGV8294NV",
- "accountId": 0,
- "loyaltyProgramId": 323414846,
- "eventId": 0,
- "amount": 100,
- "reason": "string",
- "expiryDate": "2019-08-24T14:15:22Z",
- "referenceId": 0
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 0,
- "referralId": 0,
- "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": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}
}
}, - "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": 0,
- "referralRedemptionCount": 0,
- "discountCount": 0,
- "discountEffectCount": 0,
- "couponCreationCount": 0,
- "customEffectCount": 0,
- "referralCreationCount": 0,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 0,
- "createdLoyaltyPointsCount": 0,
- "createdLoyaltyPointsEffectCount": 0,
- "redeemedLoyaltyPointsCount": 0,
- "redeemedLoyaltyPointsEffectCount": 0,
- "callApiEffectCount": 0,
- "lastActivity": "2019-08-24T14:15:22Z",
- "updated": "2019-08-24T14:15:22Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": { }
}
], - "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": 3886,
- "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": 3886,
- "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
}
]
}
Return cart items
Create a new return request for the specified cart items.
This endpoint automatically changes the session state from closed
to partially returned
.
Its behavior depends on whether cart item flattening is enabled for the campaign.
Note: This will roll back any effects associated with these cart items. For more information, see our documentation on session states and this tutorial.
Authorizations:
path Parameters
customerSessionId required | string The You can see existing customer session integration IDs in the Campaign Manager's Sessions menu, or via the List Application session endpoint. |
query Parameters
dry | boolean Indicates whether to persist the changes. Changes are ignored when |
Request Body schema: application/json
required | object |
responseContent | Array of strings Items Enum: "customerSession" "customerProfile" "coupons" "triggeredCampaigns" "referral" "loyalty" "event" … 1 more Optional list of extra data that you want to get in the response. Use this property to get as much data as you need in one request instead of sending extra requests to other endpoints. Note: |
Responses
Request samples
- Payload
{- "return": {
- "returnedCartItems": [
- {
- "position": 2,
- "quantity": 1
}
]
}, - "responseContent": [
- "customerSession",
- "customerProfile"
]
}
Response samples
- 200
- 400
- 401
{- "customerSession": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "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": null,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 0,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "accountId": 31,
- "closedSessions": 3,
- "totalSales": 299.99,
- "loyaltyMemberships": [
- {
- "joined": "2012-03-20T14:15:22.000Z",
- "loyaltyProgramId": 323414846
}
], - "audienceMemberships": [
- {
- "id": 0,
- "name": "string"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "type": "pageViews",
- "attributes": {
- "myAttribute": "myValue"
}, - "sessionId": "175KJPS947296",
- "effects": [
- "addItemToCart"
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URNGV8294NV",
- "accountId": 0,
- "loyaltyProgramId": 323414846,
- "eventId": 0,
- "amount": 100,
- "reason": "string",
- "expiryDate": "2019-08-24T14:15:22Z",
- "referenceId": 0
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 0,
- "referralId": 0,
- "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": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}
}
}, - "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": 0,
- "referralRedemptionCount": 0,
- "discountCount": 0,
- "discountEffectCount": 0,
- "couponCreationCount": 0,
- "customEffectCount": 0,
- "referralCreationCount": 0,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 0,
- "createdLoyaltyPointsCount": 0,
- "createdLoyaltyPointsEffectCount": 0,
- "redeemedLoyaltyPointsCount": 0,
- "redeemedLoyaltyPointsEffectCount": 0,
- "callApiEffectCount": 0,
- "lastActivity": "2019-08-24T14:15:22Z",
- "updated": "2019-08-24T14:15:22Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": { }
}
], - "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": 3886,
- "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": 3886,
- "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
}
]
}
Represents a single occurrence of various customer actions. There are 2 versions:
- For V1 events, each customer session contains one or more events. For example, updating a customer session records a
talon_session_updated
event. - For V2 events, each customer profile contains one or more events. For example, updating a customer session records a
talon_session_updated
event linked to the profile in question.
Track event
Important: This endpoint is DEPRECATED. Use Track Event V2 instead.
Triggers a custom event in a customer session. You can then check this event in your rules. Important: Talon.One offers a set of built-in events, ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a user updates their payment information.
Before using this endpoint, create your event as a custom attribute of type
event
. See the Developer docs.
An event is always part of a session. If either the profile or the session does not exist, a new empty profile/session is created. If the specified session already exists, it must belong to the same
profileId
or an error will be returned.
Authorizations:
query Parameters
dry | boolean Indicates whether to persist the changes. Changes are ignored when |
Request Body schema: application/json
type required | string non-empty A string representing the event. Must not be a reserved event name. |
required | object Arbitrary additional JSON data associated with the event. |
sessionId required | string non-empty The ID of the session that this event occurred in. |
profileId | string ID of the customers profile as used within this Talon.One account. Note: If the customer does not yet have a known profileId, we recommend you use a guest profileId. |
Responses
Request samples
- Payload
{- "profileId": "URNGV8294NV",
- "type": "pageViews",
- "attributes": {
- "myAttribute": "myValue"
}, - "sessionId": "175KJPS947296"
}
Response samples
- 201
- 400
- 401
- 409
{- "session": {
- "integrationId": "string",
- "created": "2020-02-07T08:15:22Z",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "coupon": "string",
- "referral": "string",
- "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
}
}
}
], - "identifiers": [
- "91.11.156.141"
], - "total": 0,
- "attributes": { },
- "firstSession": true,
- "discounts": {
- "property1": 0,
- "property2": 0
}, - "updated": "2021-09-12T10:12:42Z"
}, - "profile": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "accountId": 31,
- "closedSessions": 3,
- "totalSales": 299.99,
- "loyaltyMemberships": [
- {
- "joined": "2012-03-20T14:15:22.000Z",
- "loyaltyProgramId": 323414846
}
], - "audienceMemberships": [
- {
- "id": 0,
- "name": "string"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "type": "pageViews",
- "attributes": {
- "myAttribute": "myValue"
}, - "sessionId": "175KJPS947296",
- "effects": [
- "addItemToCart"
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URNGV8294NV",
- "accountId": 0,
- "loyaltyProgramId": 323414846,
- "eventId": 0,
- "amount": 100,
- "reason": "string",
- "expiryDate": "2019-08-24T14:15:22Z",
- "referenceId": 0
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 0,
- "referralId": 0,
- "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": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}
}
}, - "coupon": {
- "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"
}
}
Track event V2
Triggers a custom event. You can then check this event in your rules.
Important: Talon.One offers a set of built-in events, ensure you do not create a custom event when you can use a built-in event.
For example, use this endpoint to trigger an event when a user updates their payment information.
Before using this endpoint, create your event as a custom attribute of type event
.
See the Developer docs.
Important: profileId
is required. An event V2 is associated with a customer profile.
Authorizations:
query Parameters
silent | string Default: "yes" Possible values:
|
dry | boolean Indicates whether to persist the changes. Changes are ignored when |
Request Body schema: application/json
type required | string non-empty A string representing the event. Must not be a reserved event name. |
profileId | string ID of the customers profile as used within this Talon.One account. Note: If the customer does not yet have a known profileId, we recommend you use a guest profileId. |
object Arbitrary additional JSON data associated with the event. | |
responseContent | Array of strings Items Enum: "customerProfile" "triggeredCampaigns" "loyalty" "event" "awardedGiveaways" "ruleFailureReasons" Optional list of requested information to be present on the response related to the tracking custom event. |
Responses
Request samples
- Payload
{- "profileId": "URNGV8294NV",
- "type": "email_opened",
- "attributes": {
- "myAttribute": "myValue"
}, - "responseContent": [
- "triggeredCampaigns",
- "customerProfile"
]
}
Response samples
- 200
- 400
- 401
{- "customerSession": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "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": null,
- "cartItemTotal": 99.99,
- "additionalCostTotal": 0,
- "updated": "2020-02-08T14:15:22Z"
}, - "customerProfile": {
- "id": 6,
- "created": "2019-08-24T14:15:22Z",
- "integrationId": "URNGV8294NV",
- "attributes": {
- "Language": "english",
- "ShippingCountry": "DE"
}, - "accountId": 31,
- "closedSessions": 3,
- "totalSales": 299.99,
- "loyaltyMemberships": [
- {
- "joined": "2012-03-20T14:15:22.000Z",
- "loyaltyProgramId": 323414846
}
], - "audienceMemberships": [
- {
- "id": 0,
- "name": "string"
}
], - "lastActivity": "2020-02-08T14:15:20Z"
}, - "event": {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "applicationId": 322,
- "profileId": "URNGV8294NV",
- "type": "pageViews",
- "attributes": {
- "myAttribute": "myValue"
}, - "sessionId": "175KJPS947296",
- "effects": [
- "addItemToCart"
], - "ledgerEntries": [
- {
- "id": 6,
- "created": "2020-06-10T09:05:27.993483Z",
- "profileId": "URNGV8294NV",
- "accountId": 0,
- "loyaltyProgramId": 323414846,
- "eventId": 0,
- "amount": 100,
- "reason": "string",
- "expiryDate": "2019-08-24T14:15:22Z",
- "referenceId": 0
}
], - "meta": {
- "campaigns": { },
- "coupons": { },
- "couponRejectionReason": {
- "campaignId": 244,
- "couponId": 4928,
- "reason": "CouponNotFound"
}, - "referralRejectionReason": {
- "campaignId": 0,
- "referralId": 0,
- "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": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subledgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}, - "modified": "2021-09-12T10:12:42Z"
}
], - "programs": {
- "property1": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}, - "property2": {
- "id": 5,
- "title": "My loyalty program",
- "name": "program1",
- "ledger": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "subLedgers": {
- "property1": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}, - "property2": {
- "currentBalance": 46,
- "pendingBalance": 10,
- "expiredBalance": 30,
- "spentBalance": 84,
- "tentativeCurrentBalance": 56,
- "currentTier": {
- "id": 11,
- "name": "bronze"
}, - "pointsToNextTier": 20,
- "projection": {
- "projections": [
- {
- "date": "2021-01-24T17:32:28.000Z",
- "expiringPoints": 14,
- "activatingPoints": 25,
- "projectedBalance": 57
}
], - "totalExpiringPoints": 10,
- "totalActivatingPoints": 40
}
}
}
}
}
}, - "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": 0,
- "referralRedemptionCount": 0,
- "discountCount": 0,
- "discountEffectCount": 0,
- "couponCreationCount": 0,
- "customEffectCount": 0,
- "referralCreationCount": 0,
- "addFreeItemEffectCount": 0,
- "awardedGiveawaysCount": 0,
- "createdLoyaltyPointsCount": 0,
- "createdLoyaltyPointsEffectCount": 0,
- "redeemedLoyaltyPointsCount": 0,
- "redeemedLoyaltyPointsEffectCount": 0,
- "callApiEffectCount": 0,
- "lastActivity": "2019-08-24T14:15:22Z",
- "updated": "2019-08-24T14:15:22Z",
- "createdBy": "John Doe",
- "updatedBy": "Jane Doe",
- "templateId": 3
}
], - "effects": [
- {
- "campaignId": 244,
- "rulesetId": 73,
- "ruleIndex": 2,
- "ruleName": "Give 20% discount",
- "effectType": "rejectCoupon",
- "triggeredByCoupon": 4928,
- "props": { }
}
], - "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": 3886,
- "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": 3886,
- "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
}
]
}
A referral is a code shared between a customer and a prospect. A referral is defined by an advocate, a friend and a referral code. The advocate is the person who invited their friend via referral program. The friend is the person who receives the invite from an advocate. The referral code is a code which is generated similar to a coupon code the code can be redeemed by either one or multiple advocates.
Create referral code for an advocate
Creates a referral code for an advocate. The code will be valid for the referral campaign for which is created, indicated in the campaignId
parameter, and will be associated with the profile specified in the advocateProfileIntegrationId
parameter as the advocate's profile.
Authorizations:
Request Body schema: application/json
campaignId required | integer ID of the campaign from which the referral received the referral code. |
advocateProfileIntegrationId required | string <= 1000 characters The Integration ID of the Advocate's Profile. |
startDate | string <date-time> >= 0 Timestamp at which point the referral code becomes valid. |
expiryDate | string <date-time> >= 0 Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. |
usageLimit | integer [ 0 .. 999999 ] The number of times a referral code can be used. |
friendProfileIntegrationId | string An optional Integration ID of the Friend's Profile |
object Arbitrary properties associated with this item. |
Responses
Request samples
- Payload
{- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 78,
- "advocateProfileIntegrationId": "URNGV8294NV",
- "friendProfileIntegrationId": "BZGGC2454PA",
- "attributes": { }
}
Response samples
- 201
- 400
- 401
{- "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"
}
Create referral codes for multiple advocates
Creates unique referral codes for multiple advocates. The code will be valid for the referral campaign for which it is created, indicated in the campaignId
parameter, and one referral code will be associated with one advocate using the profile specified in the advocateProfileIntegrationId
parameter as the advocate's profile.
Authorizations:
query Parameters
silent | string Default: "yes" Possible values:
|
Request Body schema: application/json
campaignId required | integer The ID of the campaign from which the referral received the referral code. |
advocateProfileIntegrationIds required | Array of strings [ 1 .. 1000 ] items An array containing all the respective advocate profiles. |
usageLimit required | integer [ 0 .. 999999 ] The number of times a referral code can be used. |
startDate | string <date-time> >= 0 Timestamp at which point the referral code becomes valid. |
expiryDate | string <date-time> >= 0 Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. |
object Arbitrary properties associated with this item. | |
validCharacters | Array of strings List of characters used to generate the random parts of a code. By default, the list of characters
is equivalent to the |
referralPattern | string [ 3 .. 100 ] characters The pattern used to generate referrals. The character |
Responses
Request samples
- Payload
{- "startDate": "2020-11-10T23:00:00Z",
- "expiryDate": "2021-11-10T23:00:00Z",
- "usageLimit": 1,
- "campaignId": 45,
- "advocateProfileIntegrationIds": [
- "URNGV8294NV",
- "DRPVV9476AF"
], - "attributes": { },
- "validCharacters": [
- "E",
- "F",
- "I",
- "Z",
- "1",
- "2",
- "3"
], - "referralPattern": "REF-###-###"
}
Response samples
- 201
- 400
- 401
{- "totalResultSize": 0,
- "data": [
- {
- "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"
}
]
}