Skip to main content
POST
This endpoint requires both your partner API key in the x-api-key header and a Bearer token in the Authorization header. The Bearer token is the user access token obtained after a successful Benji Connect SDK onSuccess callback. See Exchange Token and API Authentication. Partner API keys can be generated through the dashboard.
string
required
Your partner API key, generated through the dashboard. Required together with Authorization.
string
required
A Bearer user access token obtained after the Benji Connect SDK onSuccess callback. Required together with x-api-key. See Exchange Token.
string
The Fingerprint visitor ID of the device the cart owner is using. Send it together with X-Fingerprint-Event-Id to register the device against the cart owner. Blank values are ignored.
string
The Fingerprint event ID of the request that identified the device. Send it together with X-Fingerprint-Visitor-Id. Blank values are ignored.
integer
required
The Benji Platform identifier of the user who owns the cart.
integer
required
The Benji Platform identifier of the partner the cart belongs to. A user has one active cart per partner.
string
Optional coupon code to apply while refreshing cart eligibility. If you omit this field, Benji uses the coupon already stored on the cart.
array
Optional list of campaign flow IDs the cart lines were priced against. When set, eligibility is restricted to these flows. Use this when more than one active flow could match the same offer.

Response

object
required
The user’s active cart after eligibility, prices, and item-level redemption_token values have been refreshed. The object has the same shape as the cart returned by Add Item to Cart.
string
required
A single-use token that authorizes redemption of every item currently in the cart. It lasts 600 seconds (10 minutes), the same as the perk redemption_token returned by Campaign Eligibility. Pass this token to Redeem Cart by Token. It is not the perk redemption_token used by Add Item to Cart or Redeem by Token.
Validation fails the whole request if any cart item is ineligible, out of stock, over a purchase or gift limit, or is marked as a gift for an offer that is not giftable. No cart_redemption_token is issued in that case.
Build the cart first with Add Item to Cart, using the perk redemption_token from Campaign Eligibility. Then call this endpoint to issue a cart_redemption_token, and pass that token to Redeem Cart by Token. The cart token lasts 600 seconds (10 minutes).