Confirm Cart Items
POST/client/users/:correlation_id/sessions/:originalTransactionId/confirmations/v2
This call sends a request to confirm cart items of a transaction. It will generate a transaction of type POST.
It needs a FINALIZE transaction as original transaction. Also, the Partial Transaction feature should be enabled to allow confirmation of cart items.
If points are earned with the confirmation of the passed cart items, in the "confirmedItems" body parameter, the member's balance is updated.
When all items are confirmed, the original transaction is considered confirmed/completed.
Request
Path Variables
- correlation_id
- originalTransactionId
Body
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| transactionDate | Full date and time of the transaction | String | Date of the Transaction (Full Date and Time) must be in an ISO-8601-compliant format, for example: 2022-01-17T13:48:59-04:00. Use this date when a transaction is not real-time. |
| confirmedItems | Contain array of cart items to be confirmed | Object | JSON Object |
| subCategory | Same subcategory as in Product feed | Number | |
| sku | The product identifier | Number | For instance, this may be scanned at POS |
| quantity | Measure of product amount sold | ||
| unitOfMeasure | Descriptor of how one unit is measured for this sku | String | For instance, "roll' |
| originalSaleAmount | The Manufacturer's Suggested Retail Price for a product | Number | Single-unit MSRP in pennies |
| saleAmount | MSRP less the discount, the actual sale price | Number | MSRP minus item discount in pennies |
| storeCoupon | Store-based coupon | Number | This is informational only, no active discounting occurs in ESL. This attribute is optional. |
| itemDiscount | Amount discounted | Number | This attribute is optional. In pennies. |
| mnfCoupon | Manufacturer Coupon | Number | This is informational only, no active discounting occurs in ESL. This attribute is optional. |
| promoCoupon | Flyer coupon | Number | This is informational only, no active discounting occurs in ESL. This attribute is optional. |
| itemTax | Tax on the item | Number | Tax on the line item in pennies |
| finalSaleAmount | Total sale amount for a specific product, the discounted price times the quantity purchased | Number | quantity * saleAmount |
| tags | To provide additional information | String | This attribute is optional. |
| itemCost | Total cost for a specific product, the cost per unit times the quantity purchased. | Number | Cost per unit * quantity. This attribute is optional. |
confirmedItems Details
- Original Sale Amount = Original price per Unit
- Sale Amount = Discounted price per Unit
- Final Sale Amount = Discounted Price per Unit * Quantity
- itemCost = Cost per Unit * Quantity
Response
| Attribute | Definition | Format | Notes |
|---|---|---|---|
| earned | Contains points earned on all applicable programs. | Object | Besides "loyalty," there may be other programs such as a partner program (and related object) with additional points awarded. |
| loyalty | Contains points earned on the loyalty program. | Object | The attributes would be the same for other programs (if any). |
| base | The number of base rewards earned on the transaction. | Number | Base points = points for any transaction based on spend. |
| bonus | The number of bonus rewards earned on the transaction. | Number | Bonus points = points for completing particular behaviour. |
| targeted | The number of points attributable to targeted offers. | Number | Targeted points = points derived from targeted offer. |
| total | The total of all points earned on the transaction. | Number | = base + bonus + targeted points |
| loyaltyID | Loyalty Card number for the session. | Number | If loyaltyId was not provided in the request, then this is the primary card number on the account |
| pointsRedeemed | The number of points redeemed. | Number | Always 0 for this type of request. To redeem points, use Send Finalize Transaction (with Redemption). |
| pointsEarnedTotal | The total of points earned after redemptions. | Number | total minus pointsRedeemed |
| offerRewards | Contains details of one or more offer rewards. | Array | |
| offerDescription | General description of offer. | String | For instance, "Spend $20 and get 500 points." |
| offerDescription2 | Additional details of offer. | String | For instance, "Offer good through March 22." |
| promotionHeadline | Headline under which offer is promoted. | String | For example: "Spend $20 and get 500 points." |
| offerCode | Unique code identifying offer. | String | |
| pointsEarned | Points earned for this offer. | Number | |
| isTargeted | Flags whether the transaction results from a targeted offer. | Boolean | |
| isDiscretionary | Flags whether the transaction is discretionary. | Boolean | |
| partnerID | Identification of a partner. | String | Used only with partner offerRewards, if relevant. |
| stacking | Identification of a stacking group showing rewardsGroups associated with the transaction and the highest rewarding offer in that group (winningGroup). | Object | Contains information about the stacking group for the transaction. |
| rewardsGroups | Identifies the rewards group(s) associated with the transaction. | Array | Contains the name(s) of the rewards group(s). |
| winningGroup | Identifies the reward group that won the highest rewarding offer. | String | Contains the name of the winning group. |
| receiptMessage | Message to show on the receipt. | String | The message may differ depending on points earned, redeemed, both, or neither. |
| message | Details of transaction not shown to consumer. | String | Provides information about the transaction and any redemptions. |
| pointsBalance | Total number of points currently attributed to this account. | Number | Rewards balance in points. |
| redeemableBalance | Maximum balance quantity in currency that can currently be redeemed | Number | An increment of a standard redemption amount. For instance, with a pointsBalance of 120000 and currency rewards of $10 per 25000 points, this value would be 40, or four increments of 10. |
| redeemablePointBalance | Maximum number of points that can currently be redeemed. | Number | An increment of a standard redemption amount. For example, with a pointsBalance of 110000, the user may be able to redeem 100000, or four increments of 25000. |
| unconfirmedItems | List of items that still need to be confirmed | Object | JSON Object |
| sku | The product identifier | Number | |
| quantity | Unconfirmed quantity | Number |
Error Responses
| statusCode | errorMessage | errorCode | Definition |
|---|---|---|---|
| 400 Bad Request | Invalid items | INVALID_REQUEST | The response includes an errorList with the SKU and an error message for each invalid item. The items in the errorList include either an invalid quantity or an invalid SKU. |
| 400 Bad Request | All items of the original transaction were already confirmed | INVALID_REQUEST | All of the items in the transaction have already been confirmed, so there are no unconfirmed items remaining. |
| 400 Bad Request | Missing items to confirm | INVALID_REQUEST | There are no items specified in the request to confirm. |
| 400 Bad Request | Original transaction is invalid | INVALID_REQUEST | The original transaction associated with this confirmation is invalid. |
| 400 Bad Request | It is not possible to confirm items while removing or adding new ones | INVALID_REQUEST | Confirmation cannot take place while items are being removed from or added to the cart. |
| 400 Bad Request | Partial transaction feature is not enabled | INVALID_REQUEST | The feature required to run this request is not enabled. |
Request
Responses
- 400
- default
400 - Invalid Items
200 - Confirm Items