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.
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.
integer
required
The identifier of the partnership the offer belongs to. It must match the partnership the redemption_token was issued for.
string
required
The redemption_token returned for the offer by Campaign Eligibility. This is the same token used by Redeem by Token. It lasts 600 seconds (10 minutes), must have been issued for the same user_id, partner_id, and partnership_id, and cannot be empty. Adding an item to a cart does not consume the token.
integer
default:"1"
The number of cart items to add for this offer. Must be an integer greater than or equal to 1. Each unit is stored as its own cart item.
integer
Whether the added items are gifts. Must be 0 (for the user) or 1 (a gift). If you omit is_gift and the gift recipient fields, Benji fills personal slots first, up to the offer’s personal limit, and marks the remaining units as gifts, up to the offer’s gift limit.
string
The name of the gift recipient. Required, together with gift_recipient_email, whenever either recipient field is sent. A gift can be added with is_gift set to 1 and no recipient fields; the recipient must then be provided before the cart is validated.
string
The email address of the gift recipient. Must be a valid email address and cannot be blank when sent.

Response

object
required
The user’s active cart after the items were added.
The same redemption token can be added more than once to buy several units of one offer. After the cart is built, Validate Cart issues a cart_redemption_token. Pass that token to Redeem Cart by Token.