Menu
Return Cart Items
Return cart items
POST
/v2/customer_sessions/{customerSessionId}/returnsUse it in a workflow
- Add a step and choose the Talon.One connector.
- Pick the Return Cart Items action (under integration).
- Fill in the fields below, then reference the result from later steps as
{{returnCartItems.response.data}}.
Request
Path parameters
Query parameters
Request body
Enter the body as JSON in the step's Body field.
{
"return": {
"returnedCartItems": [
{
"quantity": 1,
"position": 2,
"sku": "SKU1241028"
},
{
"quantity": 1,
"position": 2,
"sku": "SKU1241028"
}
]
},
"responseContent": [
"customerSession",
"customerProfile"
]
}
Response
Returns 200 with an object. Read it in later steps with {{returnCartItems.response.data.<field>}}.
{
"effects": [
{
"rulesetId": 73,
"ruleIndex": 2,
"campaignRevisionVersionId": 5,
"campaignId": 244,
"conditionIndex": 786,
"evaluationGroupMode": "stackable",
"effectType": "rejectCoupon",
"adjustmentReferenceId": "68851723-e6fa-488f-ace9-112581e6c19b",
"props": "{}",
"selectedPrice": 100,
"evaluationGroupID": 3,
"triggeredForCatalogItem": 786,
"selectedPriceType": "member",
"campaignRevisionId": 1,
"ruleName": "Give 20% discount",
"experimentId": 12,
"triggeredByCoupon": 4928
}
],
"createdCoupons": [
{
"recipientIntegrationId": "URNGV8294NV",
"implicitlyReserved": false,
"created": {},
"campaignId": 211,
"usageLimit": 100,
"referralId": 326632952,
"usageCounter": 10,
"batchId": "32535-43255",
"discountCounter": 10,
"expiryDate": {},
"importId": 4,
"reservationLimit": 45,
"reservationCounter": 1,
"reservation": false,
"attributes": "{}",
"id": 6,
"value": "XMAS-20-2021",
"discountLimit": 30,
"startDate": {},
"limits": [
{
"period": "yearly",
"entities": [
"Coupon"
],
"limit": 1000,
"action": "createCoupon"
},
{
"period": "yearly",
"entities": [
"Coupon"
],
"limit": 1000,
"action": "createCoupon"
}
],
"discountRemainder": 5,
"isReservationMandatory": false
}
],
"createdReferrals": [
{
"code": "27G47Y54VH9L",
"created": {},
"usageLimit": 1,
"campaignId": 78,
"usageCounter": 1,
"batchId": "tqyrgahe",
"advocateProfileIntegrationId": "URNGV8294NV",
"expiryDate": {},
"importId": 4,
"friendProfileIntegrationId": "BZGGC2454PA",
"attributes": {
"channel": "web"
},
"id": 6,
"startDate": {}
}
],
"customerProfile": {
"accountId": 31,
"closedSessions": 3,
"created": {},
"sandbox": false,
"integrationId": "URNGV8294NV",
"attributes": {
"Language": "english",
"ShippingCountry": "DE"
},
"totalSales": 299.99,
"lastActivity": {},
"id": 6,
"loyaltyMemberships": [
{
"joined": {},
"loyaltyProgramId": 323414846
},
{
"joined": {},
"loyaltyProgramId": 323414846
}
],
"audienceMemberships": [
{
"name": "Travel audience",
"id": 2
},
{
"name": "Travel audience",
"id": 2
}
]
},
"loyalty": {
"cards": [
{
"ledger": {
"pendingBalance": 10,
"nextTierName": "Silver",
"negativeBalance": 10,
"currentBalance": 100,
"spentBalance": 0,
"tentativeCurrentBalance": 100,
"tentativePendingBalance": 20,
"pointsToNextTier": 20,
"expiredBalance": 0,
"currentTier": {
"expiryDate": {},
"downgradePolicy": "one_down",
"name": "bronze",
"id": 11,
"startDate": {}
},
"tentativeNegativeBalance": 100
},
"identifier": "summer-loyalty-card-0543",
"oldCardIdentifier": "summer-loyalty-card-0543",
"usersPerCardLimit": 111,
"created": {},
"profiles": [
{
"integrationId": "R195412",
"timestamp": {}
},
{
"integrationId": "R195412",
"timestamp": {}
}
],
"subledgers": {
"key": {
"pendingBalance": 10,
"nextTierName": "Silver",
"negativeBalance": 10,
"currentBalance": 100,
"spentBalance": 0,
"tentativeCurrentBalance": 100,
"tentativePendingBalance": 20,
"pointsToNextTier": 20,
"expiredBalance": 0,
"currentTier": {
"expiryDate": {},
"downgradePolicy": "one_down",
"name": "bronze",
"id": 11,
"startDate": {}
},
"tentativeNegativeBalance": 100
}
},
"batchId": "wdefpov",
"programTitle": "Loyalty program",
"programName": "Loyalty_program",
"modified": {},
"id": 6,
"blockReason": "Current card lost. Customer needs a new card.",
"newCardIdentifier": "summer-loyalty-card-0543",
"programID": 125,
"status": "active"
},
{
"ledger": {
"pendingBalance": 10,
"nextTierName": "Silver",
"negativeBalance": 10,
"currentBalance": 100,
"spentBalance": 0,
"tentativeCurrentBalance": 100,
"tentativePendingBalance": 20,
"pointsToNextTier": 20,
"expiredBalance": 0,
"currentTier": {
"expiryDate": {},
"downgradePolicy": "one_down",
"name": "bronze",
"id": 11,
"startDate": {}
},
"tentativeNegativeBalance": 100
},
"identifier": "summer-loyalty-card-0543",
"oldCardIdentifier": "summer-loyalty-card-0543",
"usersPerCardLimit": 111,
"created": {},
"profiles": [
{
"integrationId": "R195412",
"timestamp": {}
},
{
"integrationId": "R195412",
"timestamp": {}
}
],
"subledgers": {
"key": {
"pendingBalance": 10,
"nextTierName": "Silver",
"negativeBalance": 10,
"currentBalance": 100,
"spentBalance": 0,
"tentativeCurrentBalance": 100,
"tentativePendingBalance": 20,
"pointsToNextTier": 20,
"expiredBalance": 0,
"currentTier": {
"expiryDate": {},
"downgradePolicy": "one_down",
"name": "bronze",
"id": 11,
"startDate": {}
},
"tentativeNegativeBalance": 100
}
},
"batchId": "wdefpov",
"programTitle": "Loyalty program",
"programName": "Loyalty_program",
"modified": {},
"id": 6,
"blockReason": "Current card lost. Customer needs a new card.",
"newCardIdentifier": "summer-loyalty-card-0543",
"programID": 125,
"status": "active"
}
],
"programs": {
"key": {
"ledger": {
"pendingBalance": 10,
"nextTierName": "Silver",
"negativeBalance": 10,
"currentBalance": 100,
"spentBalance": 0,
"tentativeCurrentBalance": 100,
"tentativePendingBalance": 20,
"pointsToNextTier": 20,
"expiredBalance": 0,
"currentTier": {
"expiryDate": {},
"downgradePolicy": "one_down",
"name": "bronze",
"id": 11,
"startDate": {}
},
"tentativeNegativeBalance": 100
},
"joinDate": {},
"subLedgers": {
"key": {
"pendingBalance": 10,
"nextTierName": "Silver",
"negativeBalance": 10,
"currentBalance": 100,
"spentBalance": 0,
"tentativeCurrentBalance": 100,
"tentativePendingBalance": 20,
"pointsToNextTier": 20,
"expiredBalance": 0,
"currentTier": {
"expiryDate": {},
"downgradePolicy": "one_down",
"name": "bronze",
"id": 11,
"startDate": {}
},
"tentativeNegativeBalance": 100
}
},
"name": "program1",
"id": 5,
"title": "My loyalty program"
}
}
},
"triggeredCampaigns": [
{
"type": "advanced",
"templateId": 3,
"customEffectCount": 0,
"activeRevisionId": 6,
"features": [
"coupons",
"referrals"
],
"createdLoyaltyPointsCount": 9,
"storesImported": true,
"couponSettings": {
"couponPattern": "SUMMER-####-####",
"validCharacters": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
]
},
"experimentId": 1,
"id": 4,
"state": "enabled",
"couponAttributes": "{}",
"reservecouponEffectCount": 9,
"updatedBy": "Jane Doe",
"frontendState": "running",
"created": {},
"referralCreationCount": 8,
"stageRevision": false,
"couponRedemptionCount": 163,
"couponCreationCount": 16,
"version": 6,
"campaignGroups": [
1,
3
],
"tags": [
"summer"
],
"discountEffectCount": 343,
"budgets": [
{
"limit": 1000,
"action": "createCoupon",
"counter": 42
},
{
"limit": 1000,
"action": "createCoupon",
"counter": 42
}
],
"redeemedLoyaltyPointsCount": 8,
"name": "Summer promotions",
"valueMapsIds": [
100,
215
],
"applicationId": 322,
"updated": {},
"callApiEffectCount": 0,
"createdLoyaltyPointsEffectCount": 2,
"discountCount": 288,
"revisionFrontendState": "revised",
"description": "Campaign for all summer 2021 promotions",
"activeRevisionVersionId": 6,
"currentRevisionVersionId": 6,
"startTime": {},
"currentRevisionId": 6,
"limits": [
{
"period": "yearly",
"entities": [
"Coupon"
],
"limit": 1000,
"action": "createCoupon"
},
{
"period": "yearly",
"entities": [
"Coupon"
],
"limit": 1000,
"action": "createCoupon"
}
],
"activeRulesetId": 6,
"reevaluateOnReturn": true,
"userId": 388,
"awardedGiveawaysCount": 9,
"redeemedLoyaltyPointsEffectCount": 9,
"linkedStoreIds": [
1,
2,
3
],
"createdBy": "John Doe",
"addFreeItemEffectCount": 0,
"referralSettings": {
"couponPattern": "SUMMER-####-####",
"validCharacters": [
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
]
},
"attributes": "{}",
"lastActivity": {},
"endTime": {},
"referralRedemptionCount": 3
}
],
"ruleFailureReasons": [
{
"rulesetID": 6,
"ruleIndex": 5,
"campaignID": 0,
"referralID": 1,
"conditionIndex": 5,
"effectIndex": 2,
"evaluationGroupMode": "stackable",
"couponID": 4928,
"referralValue": "referralValue",
"couponValue": "couponValue",
"evaluationGroupID": 3,
"ruleName": "ruleName",
"details": "details",
"campaignName": "campaignName"
}
],
"awardedGiveaways": [
{
"profileIntegrationId": "R195412",
"code": "GIVEAWAY1",
"importId": 4,
"endDate": {},
"created": {},
"profileId": 1,
"poolId": 1,
"attributes": "{}",
"id": 6,
"used": true,
"startDate": {}
}
],
"referral": {
"code": "27G47Y54VH9L",
"created": {},
"usageLimit": 1,
"campaignId": 78,
"usageCounter": 1,
"batchId": "tqyrgahe",
"advocateProfileIntegrationId": "URNGV8294NV",
"expiryDate": {},
"importId": 4,
"friendProfileIntegrationId": "BZGGC2454PA",
"attributes": {
"channel": "web"
},
"referredCustomers": [
"referredCustomers",
"referredCustomers"
],
"id": 6,
"startDate": {}
},
"coupons": [
{
"recipientIntegrationId": "URNGV8294NV",
"implicitlyReserved": false,
"created": {},
"campaignId": 211,
"usageLimit": 100,
"referralId": 326632952,
"profileRedemptionCount": 5,
"usageCounter": 10,
"batchId": "32535-43255",
"discountCounter": 10,
"expiryDate": {},
"importId": 4,
"reservationLimit": 45,
"reservationCounter": 1,
"reservation": false,
"attributes": "{}",
"id": 6,
"value": "XMAS-20-2021",
"discountLimit": 30,
"startDate": {},
"limits": [
{
"period": "yearly",
"entities": [
"Coupon"
],
"limit": 1000,
"action": "createCoupon"
},
{
"period": "yearly",
"entities": [
"Coupon"
],
"limit": 1000,
"action": "createCoupon"
}
],
"discountRemainder": 5,
"isReservationMandatory": false
}
],
"event": {
"effects": [
"{}",
"{}"
],
"storeIntegrationId": "STORE-001",
"created": {},
"profileId": "URNGV8294NV",
"meta": {
"campaigns": "{}",
"coupons": "{}",
"referralRejectionReason": {
"reason": "ReferralNotFound",
"campaignId": 3,
"referralId": 2
},
"warnings": "{}",
"couponRejectionReason": {
"reason": "CouponNotFound",
"campaignId": 244,
"couponId": 4928
}
},
"ledgerEntries": [
{
"expiryDate": {},
"accountId": 7,
"eventId": 3,
"reason": "Customer appeasement.",
"amount": 100,
"created": {},
"profileId": "URNGV8294NV",
"loyaltyProgramId": 323414846,
"id": 6,
"referenceId": 9
},
{
"expiryDate": {},
"accountId": 7,
"eventId": 3,
"reason": "Customer appeasement.",
"amount": 100,
"created": {},
"profileId": "URNGV8294NV",
"loyaltyProgramId": 323414846,
"id": 6,
"referenceId": 9
}
],
"attributes": {
"myAttribute": "myValue"
},
"id": 6,
"sessionId": "175KJPS947296",
"applicationId": 322,
"type": "pageViewed"
},
"advancedEvent": {
"connectedSessionID": "175KJPS947296",
"storeIntegrationId": "STORE-001",
"profileId": "URNGV8294NV",
"evaluableCampaignIds": [
10,
12
],
"previousEventID": "175KJPS947296",
"integrationId": "175KJPS947296",
"attributes": {
"myAttribute": "myValue"
},
"type": "pageViewed"
}
}
Need more? See the Talon.One guide for connection setup and behaviour shared by every action.
Was this page helpful?