Skip to main content

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

AttributeDefinitionFormatNotes
transactionDateFull date and time of the transactionStringDate 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.
confirmedItemsContain array of cart items to be confirmedObjectJSON Object
subCategorySame subcategory as in Product feedNumber
skuThe product identifierNumberFor instance, this may be scanned at POS
quantityMeasure of product amount sold
unitOfMeasureDescriptor of how one unit is measured for this skuStringFor instance, "roll'
originalSaleAmountThe Manufacturer's Suggested Retail Price for a productNumberSingle-unit MSRP in pennies
saleAmountMSRP less the discount, the actual sale priceNumberMSRP minus item discount in pennies
storeCouponStore-based couponNumberThis is informational only, no active discounting occurs in ESL. This attribute is optional.
itemDiscountAmount discountedNumberThis attribute is optional. In pennies.
mnfCouponManufacturer CouponNumberThis is informational only, no active discounting occurs in ESL. This attribute is optional.
promoCouponFlyer couponNumberThis is informational only, no active discounting occurs in ESL. This attribute is optional.
itemTaxTax on the itemNumberTax on the line item in pennies
finalSaleAmountTotal sale amount for a specific product, the discounted price times the quantity purchasedNumberquantity * saleAmount
tagsTo provide additional informationStringThis attribute is optional.
itemCostTotal cost for a specific product, the cost per unit times the quantity purchased.NumberCost 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

AttributeDefinitionFormatNotes
earnedContains points earned on all applicable programs.ObjectBesides "loyalty," there may be other programs such as a partner program (and related object) with additional points awarded.
loyaltyContains points earned on the loyalty program.ObjectThe attributes would be the same for other programs (if any).
baseThe number of base rewards earned on the transaction.NumberBase points = points for any transaction based on spend.
bonusThe number of bonus rewards earned on the transaction.NumberBonus points = points for completing particular behaviour.
targetedThe number of points attributable to targeted offers.NumberTargeted points = points derived from targeted offer.
totalThe total of all points earned on the transaction.Number= base + bonus + targeted points
loyaltyIDLoyalty Card number for the session.NumberIf loyaltyId was not provided in the request, then this is the primary card number on the account
pointsRedeemedThe number of points redeemed.NumberAlways 0 for this type of request. To redeem points, use Send Finalize Transaction (with Redemption).
pointsEarnedTotalThe total of points earned after redemptions.Numbertotal minus pointsRedeemed
offerRewardsContains details of one or more offer rewards.Array
offerDescriptionGeneral description of offer.StringFor instance, "Spend $20 and get 500 points."
offerDescription2Additional details of offer.StringFor instance, "Offer good through March 22."
promotionHeadlineHeadline under which offer is promoted.StringFor example: "Spend $20 and get 500 points."
offerCodeUnique code identifying offer.String
pointsEarnedPoints earned for this offer.Number
isTargetedFlags whether the transaction results from a targeted offer.Boolean
isDiscretionaryFlags whether the transaction is discretionary.Boolean
partnerIDIdentification of a partner.StringUsed only with partner offerRewards, if relevant.
stackingIdentification of a stacking group showing rewardsGroups associated with the transaction and the highest rewarding offer in that group (winningGroup).ObjectContains information about the stacking group for the transaction.
rewardsGroupsIdentifies the rewards group(s) associated with the transaction.ArrayContains the name(s) of the rewards group(s).
winningGroupIdentifies the reward group that won the highest rewarding offer.StringContains the name of the winning group.
receiptMessageMessage to show on the receipt.StringThe message may differ depending on points earned, redeemed, both, or neither.
messageDetails of transaction not shown to consumer.StringProvides information about the transaction and any redemptions.
pointsBalanceTotal number of points currently attributed to this account.NumberRewards balance in points.
redeemableBalanceMaximum balance quantity in currency that can currently be redeemedNumberAn 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.
redeemablePointBalanceMaximum number of points that can currently be redeemed.NumberAn 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.
unconfirmedItemsList of items that still need to be confirmedObjectJSON Object
skuThe product identifierNumber
quantityUnconfirmed quantityNumber

Error Responses

statusCodeerrorMessageerrorCodeDefinition
400 Bad RequestInvalid itemsINVALID_REQUESTThe 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 RequestAll items of the original transaction were already confirmedINVALID_REQUESTAll of the items in the transaction have already been confirmed, so there are no unconfirmed items remaining.
400 Bad RequestMissing items to confirmINVALID_REQUESTThere are no items specified in the request to confirm.
400 Bad RequestOriginal transaction is invalidINVALID_REQUESTThe original transaction associated with this confirmation is invalid.
400 Bad RequestIt is not possible to confirm items while removing or adding new onesINVALID_REQUESTConfirmation cannot take place while items are being removed from or added to the cart.
400 Bad RequestPartial transaction feature is not enabledINVALID_REQUESTThe feature required to run this request is not enabled.

Request

Responses

400 - Invalid Items