{ "code": "resource_not_found_error", "message": "user 155 does not exist."}
{ "code": "cart_redemption_token_scope_mismatch_error", "message": "Redemption token does not belong to the requested user or partner."}
{ "code": "quantity_exceeds_purchase_limit", "message": "You've exceeded the allowed quantity for this offer."}
{ "code": "cart_redemption_token_invalid_error", "message": "Redemption token is invalid, expired, or already consumed."}
{ "code": "personal_limit_reached", "message": "You've reached the personal limit for this offer. Additional items must be gifts."}
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 SDKonSuccess 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 SDKonSuccess 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.
Hide properties
string
required
UUID identifier of the cart.
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.
integer
required
Integer representing an enum of one of the following cart status values:
Show possible cart status values
ACTIVE (1) : The cart is open and can be edited
CANCELLED (2) : The cart was cancelled
CHECKED_OUT (3) : The cart was redeemed
string
The coupon code applied to the cart, if any.
string
The date and time when the cart was created, in ISO 8601 format.
string
The date and time of the last change to the cart items, in ISO 8601 format.
array
The items in the cart.
Show cart item properties
string
required
UUID identifier of the cart item.
integer
required
The identifier of the partnership the offer belongs to.
string
required
The identifier of the offer.
integer
The identifier of the merchant that provides the offer.
integer
required
The price of the item at the time it was added, taken from the reward_amount the redemption token was issued for.
string
The currency of the price. Defaults to USD.
string
required
The redemption token the item was added with.
integer
The ID of the campaign the item was found eligible under.
string
The ID of the coupon applied to the item, if any.
string
The date and time when the item was added to the cart, in ISO 8601 format.
integer
required
1 if the item is a gift, 0 if it is for the user.
integer
required
1 if the offer can be gifted, 0 if it cannot.
string
The name of the item’s recipient. For items that are not gifts, this defaults to the user’s name when the user has a name and email on file.
string
The email address of the item’s recipient. For items that are not gifts, this defaults to the user’s email when the user has a name and email on file.
string
The date and time when the cart item was created, in ISO 8601 format.
{ "code": "resource_not_found_error", "message": "user 155 does not exist."}
{ "code": "cart_redemption_token_scope_mismatch_error", "message": "Redemption token does not belong to the requested user or partner."}
{ "code": "quantity_exceeds_purchase_limit", "message": "You've exceeded the allowed quantity for this offer."}
{ "code": "cart_redemption_token_invalid_error", "message": "Redemption token is invalid, expired, or already consumed."}
{ "code": "personal_limit_reached", "message": "You've reached the personal limit for this offer. Additional items must be gifts."}
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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Benji","colors":{"primary":"#9900ff","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/logo/benji-docs-logo.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=60b7d848ffe4ab0c66efcfcbf573e3be","dark":"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/logo/benji-docs-logo.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=60b7d848ffe4ab0c66efcfcbf573e3be"},"favicon":"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/favicon.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=0d4db635c5349274277a1e3f4575d6c3","api":{"mdx":{"auth":{"method":"key","name":"x-api-key"},"server":["https://mintlify.com/api","https://mintlify.com/api2"]}},"appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"mailto:support@withbenji.com","label":"Support"}],"primary":{"type":"button","label":"Go to Pilot","href":"https://pilot-staging.withbenji.com/login"}},"footer":{"socials":{"website":"https://withbenji.com"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"benji","hasAudioNarration":false,"actualSubdomain":"benji","customDomains":["docs.withbenji.com"],"gitSource":{"type":"github","owner":"benji-money","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10a94d9ffae5051c3fba7c"},"feedback":{"thumbs":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b10b591ed8c0be4809f64b4","clientVersion":"0.0.4424","searchFilterCounts":[{"language":"default","tag":"API Reference","count":15},{"language":"default","tag":"Platform","count":12},{"language":"default","tag":"Benji Integrations","count":12},{"language":"default","tag":"Pilot","count":10},{"language":"default","tag":"Benji Connect","count":8},{"language":"default","tag":"Partnerships","count":7},{"language":"default","tag":"Benji Connect SDK","count":4},{"language":"default","tag":"Square","count":4},{"language":"default","tag":"Reward API","count":3},{"language":"default","tag":"Member API","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/endpoint/users/add-cart-item","slug":"/api-reference/endpoint/users/add-cart-item","pageMetadata":{"title":"Add Item to Cart","description":"Add one or more redeemable offers to a user's active cart","sidebarTitle":"Add Item to Cart","api":"POST https://api-staging.withbenji.com/users/{user_id}/partners/{partner_id}/cart/items","href":"/api-reference/endpoint/users/add-cart-item"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Add one or more redeemable offers to a user’s active cart\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField,Tip}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`This endpoint requires both your `,_jsx(_components.strong,{children:`partner API key`}),` in the `,_jsx(_components.code,{children:`x-api-key`}),` header and a Bearer token in the `,_jsx(_components.code,{children:`Authorization`}),` header. The Bearer token is the user access token obtained after a successful `,_jsx(_components.a,{href:`/connect/methods#onsuccess`,children:`Benji Connect SDK`}),` `,_jsx(_components.code,{children:`onSuccess`}),` callback. See `,_jsx(_components.a,{href:`/connect/exchange_token`,children:`Exchange Token`}),` and `,_jsx(_components.a,{href:`/api-reference/authentication`,children:`API Authentication`}),`. Partner API keys can be generated through the dashboard.`]})}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`Your partner API key, generated through the dashboard. Required together with `,_jsx(_components.code,{children:`Authorization`}),`.`]})}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`Bearer`}),` user access token obtained after the `,_jsx(_components.a,{href:`/connect/methods#onsuccess`,children:`Benji Connect SDK`}),` `,_jsx(_components.code,{children:`onSuccess`}),` callback. Required together with `,_jsx(_components.code,{children:`x-api-key`}),`. See `,_jsx(_components.a,{href:`/connect/exchange_token`,children:`Exchange Token`}),`.`]})}),`\n`,_jsx(ParamField,{path:`user_id`,type:`integer`,required:true,id:`param-user-id`,children:_jsx(_components.p,{children:`The Benji Platform identifier of the user who owns the cart.`})}),`\n`,_jsx(ParamField,{path:`partner_id`,type:`integer`,required:true,id:`param-partner-id`,children:_jsx(_components.p,{children:`The Benji Platform identifier of the partner the cart belongs to. A user has one active cart per partner.`})}),`\n`,_jsx(ParamField,{body:`partnership_id`,type:`integer`,required:true,id:`param-partnership-id`,children:_jsxs(_components.p,{children:[`The identifier of the partnership the offer belongs to. It must match the partnership the `,_jsx(_components.code,{children:`redemption_token`}),` was issued for.`]})}),`\n`,_jsx(ParamField,{body:`redemption_token`,type:`string`,required:true,id:`param-redemption-token`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`redemption_token`}),` returned for the offer by `,_jsx(_components.a,{href:`/api-reference/endpoint/campaigns/eligibility`,children:`Campaign Eligibility`}),`. This is the same token used by `,_jsx(_components.a,{href:`/api-reference/endpoint/transactions/redeem`,children:`Redeem by Token`}),`. It lasts 600 seconds (10 minutes), must have been issued for the same `,_jsx(_components.code,{children:`user_id`}),`, `,_jsx(_components.code,{children:`partner_id`}),`, and `,_jsx(_components.code,{children:`partnership_id`}),`, and cannot be empty. Adding an item to a cart does not consume the token.`]})}),`\n`,_jsx(ParamField,{body:`quantity`,type:`integer`,default:`1`,id:`param-quantity`,children:_jsx(_components.p,{children:`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.`})}),`\n`,_jsx(ParamField,{body:`is_gift`,type:`integer`,id:`param-is-gift`,children:_jsxs(_components.p,{children:[`Whether the added items are gifts. Must be `,_jsx(_components.code,{children:`0`}),` (for the user) or `,_jsx(_components.code,{children:`1`}),` (a gift). If you omit `,_jsx(_components.code,{children:`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.`]})}),`\n`,_jsx(ParamField,{body:`gift_recipient_name`,type:`string`,id:`param-gift-recipient-name`,children:_jsxs(_components.p,{children:[`The name of the gift recipient. Required, together with `,_jsx(_components.code,{children:`gift_recipient_email`}),`, whenever either recipient field is sent. A gift can be added with `,_jsx(_components.code,{children:`is_gift`}),` set to `,_jsx(_components.code,{children:`1`}),` and no recipient fields; the recipient must then be provided before the cart is validated.`]})}),`\n`,_jsx(ParamField,{body:`gift_recipient_email`,type:`string`,id:`param-gift-recipient-email`,children:_jsx(_components.p,{children:`The email address of the gift recipient. Must be a valid email address and cannot be blank when sent.`})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(ResponseField,{name:`cart`,type:`object`,required:true,id:`param-cart`,children:[_jsx(_components.p,{children:`The user’s active cart after the items were added.`}),_jsxs(Expandable,{title:`properties`,defaultOpen:`true`,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`UUID identifier of the cart.`})}),_jsx(ResponseField,{name:`user_id`,type:`integer`,required:true,id:`param-user-id-1`,children:_jsx(_components.p,{children:`The Benji Platform identifier of the user who owns the cart.`})}),_jsx(ResponseField,{name:`partner_id`,type:`integer`,required:true,id:`param-partner-id-1`,children:_jsx(_components.p,{children:`The Benji Platform identifier of the partner the cart belongs to.`})}),_jsxs(ResponseField,{name:`status`,type:`integer`,required:true,id:`param-status`,children:[_jsx(_components.p,{children:`Integer representing an enum of one of the following cart status values:`}),_jsx(Expandable,{title:`possible cart status values`,type:`enum`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`ACTIVE (1)`}),` : The cart is open and can be edited `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CANCELLED (2)`}),` : The cart was cancelled `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CHECKED_OUT (3)`}),` : The cart was redeemed `,_jsx(`br`,{})]}),`\n`]})})]}),_jsx(ResponseField,{name:`coupon_code`,type:`string`,id:`param-coupon-code`,children:_jsx(_components.p,{children:`The coupon code applied to the cart, if any.`})}),_jsx(ResponseField,{name:`created_date`,type:`string`,id:`param-created-date`,children:_jsx(_components.p,{children:`The date and time when the cart was created, in ISO 8601 format.`})}),_jsx(ResponseField,{name:`last_item_activity_at`,type:`string`,id:`param-last-item-activity-at`,children:_jsx(_components.p,{children:`The date and time of the last change to the cart items, in ISO 8601 format.`})}),_jsxs(ResponseField,{name:`items`,type:`array`,id:`param-items`,children:[_jsx(_components.p,{children:`The items in the cart.`}),_jsxs(Expandable,{title:`cart item properties`,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id-1`,children:_jsx(_components.p,{children:`UUID identifier of the cart item.`})}),_jsx(ResponseField,{name:`partnership_id`,type:`integer`,required:true,id:`param-partnership-id-1`,children:_jsx(_components.p,{children:`The identifier of the partnership the offer belongs to.`})}),_jsx(ResponseField,{name:`offer_id`,type:`string`,required:true,id:`param-offer-id`,children:_jsx(_components.p,{children:`The identifier of the offer.`})}),_jsx(ResponseField,{name:`merchant_id`,type:`integer`,id:`param-merchant-id`,children:_jsx(_components.p,{children:`The identifier of the merchant that provides the offer.`})}),_jsx(ResponseField,{name:`eligible_price_cents`,type:`integer`,required:true,id:`param-eligible-price-cents`,children:_jsxs(_components.p,{children:[`The price of the item at the time it was added, taken from the `,_jsx(_components.code,{children:`reward_amount`}),` the redemption token was issued for.`]})}),_jsx(ResponseField,{name:`currency`,type:`string`,id:`param-currency`,children:_jsxs(_components.p,{children:[`The currency of the price. Defaults to `,_jsx(_components.code,{children:`USD`}),`.`]})}),_jsx(ResponseField,{name:`redemption_token`,type:`string`,required:true,id:`param-redemption-token-1`,children:_jsx(_components.p,{children:`The redemption token the item was added with.`})}),_jsx(ResponseField,{name:`eligibility_campaign_id`,type:`integer`,id:`param-eligibility-campaign-id`,children:_jsx(_components.p,{children:`The ID of the campaign the item was found eligible under.`})}),_jsx(ResponseField,{name:`coupon_id`,type:`string`,id:`param-coupon-id`,children:_jsx(_components.p,{children:`The ID of the coupon applied to the item, if any.`})}),_jsx(ResponseField,{name:`eligibility_checked_at`,type:`string`,id:`param-eligibility-checked-at`,children:_jsx(_components.p,{children:`The date and time when the item was added to the cart, in ISO 8601 format.`})}),_jsx(ResponseField,{name:`is_gift`,type:`integer`,required:true,id:`param-is-gift-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`1`}),` if the item is a gift, `,_jsx(_components.code,{children:`0`}),` if it is for the user.`]})}),_jsx(ResponseField,{name:`is_giftable`,type:`integer`,required:true,id:`param-is-giftable`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`1`}),` if the offer can be gifted, `,_jsx(_components.code,{children:`0`}),` if it cannot.`]})}),_jsx(ResponseField,{name:`gift_recipient_name`,type:`string`,id:`param-gift-recipient-name-1`,children:_jsx(_components.p,{children:`The name of the item’s recipient. For items that are not gifts, this defaults to the user’s name when the user has a name and email on file.`})}),_jsx(ResponseField,{name:`gift_recipient_email`,type:`string`,id:`param-gift-recipient-email-1`,children:_jsx(_components.p,{children:`The email address of the item’s recipient. For items that are not gifts, this defaults to the user’s email when the user has a name and email on file.`})}),_jsx(ResponseField,{name:`created_date`,type:`string`,id:`param-created-date-1`,children:_jsx(_components.p,{children:`The date and time when the cart item was created, in ISO 8601 format.`})})]})]})]})]}),`\n`,`\n`,`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`The same redemption token can be added more than once to buy several units of one offer. After the cart is built, `,_jsx(_components.a,{href:`/api-reference/endpoint/users/validate-cart`,children:`Validate Cart`}),` issues a `,_jsx(_components.code,{children:`cart_redemption_token`}),`. Pass that token to `,_jsx(_components.a,{href:`/api-reference/endpoint/transactions/redeem-cart-by-token`,children:`Redeem Cart by Token`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Add Item to Cart","description":"Add one or more redeemable offers to a user's active cart","sidebarTitle":"Add Item to Cart","api":"POST https://api-staging.withbenji.com/users/{user_id}/partners/{partner_id}/cart/items","href":"/api-reference/endpoint/users/add-cart-item"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Note,{children:_jsxs(_components.p,{children:[`This endpoint requires both your `,_jsx(_components.strong,{children:`partner API key`}),` in the `,_jsx(_components.code,{children:`x-api-key`}),` header and a Bearer token in the `,_jsx(_components.code,{children:`Authorization`}),` header. The Bearer token is the user access token obtained after a successful `,_jsx(_components.a,{href:`/connect/methods#onsuccess`,children:`Benji Connect SDK`}),` `,_jsx(_components.code,{children:`onSuccess`}),` callback. See `,_jsx(_components.a,{href:`/connect/exchange_token`,children:`Exchange Token`}),` and `,_jsx(_components.a,{href:`/api-reference/authentication`,children:`API Authentication`}),`. Partner API keys can be generated through the dashboard.`]})}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`Your partner API key, generated through the dashboard. Required together with `,_jsx(_components.code,{children:`Authorization`}),`.`]})}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`Bearer`}),` user access token obtained after the `,_jsx(_components.a,{href:`/connect/methods#onsuccess`,children:`Benji Connect SDK`}),` `,_jsx(_components.code,{children:`onSuccess`}),` callback. Required together with `,_jsx(_components.code,{children:`x-api-key`}),`. See `,_jsx(_components.a,{href:`/connect/exchange_token`,children:`Exchange Token`}),`.`]})}),`\n`,_jsx(ParamField,{path:`user_id`,type:`integer`,required:true,id:`param-user-id`,children:_jsx(_components.p,{children:`The Benji Platform identifier of the user who owns the cart.`})}),`\n`,_jsx(ParamField,{path:`partner_id`,type:`integer`,required:true,id:`param-partner-id`,children:_jsx(_components.p,{children:`The Benji Platform identifier of the partner the cart belongs to. A user has one active cart per partner.`})}),`\n`,_jsx(ParamField,{body:`partnership_id`,type:`integer`,required:true,id:`param-partnership-id`,children:_jsxs(_components.p,{children:[`The identifier of the partnership the offer belongs to. It must match the partnership the `,_jsx(_components.code,{children:`redemption_token`}),` was issued for.`]})}),`\n`,_jsx(ParamField,{body:`redemption_token`,type:`string`,required:true,id:`param-redemption-token`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`redemption_token`}),` returned for the offer by `,_jsx(_components.a,{href:`/api-reference/endpoint/campaigns/eligibility`,children:`Campaign Eligibility`}),`. This is the same token used by `,_jsx(_components.a,{href:`/api-reference/endpoint/transactions/redeem`,children:`Redeem by Token`}),`. It lasts 600 seconds (10 minutes), must have been issued for the same `,_jsx(_components.code,{children:`user_id`}),`, `,_jsx(_components.code,{children:`partner_id`}),`, and `,_jsx(_components.code,{children:`partnership_id`}),`, and cannot be empty. Adding an item to a cart does not consume the token.`]})}),`\n`,_jsx(ParamField,{body:`quantity`,type:`integer`,default:`1`,id:`param-quantity`,children:_jsx(_components.p,{children:`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.`})}),`\n`,_jsx(ParamField,{body:`is_gift`,type:`integer`,id:`param-is-gift`,children:_jsxs(_components.p,{children:[`Whether the added items are gifts. Must be `,_jsx(_components.code,{children:`0`}),` (for the user) or `,_jsx(_components.code,{children:`1`}),` (a gift). If you omit `,_jsx(_components.code,{children:`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.`]})}),`\n`,_jsx(ParamField,{body:`gift_recipient_name`,type:`string`,id:`param-gift-recipient-name`,children:_jsxs(_components.p,{children:[`The name of the gift recipient. Required, together with `,_jsx(_components.code,{children:`gift_recipient_email`}),`, whenever either recipient field is sent. A gift can be added with `,_jsx(_components.code,{children:`is_gift`}),` set to `,_jsx(_components.code,{children:`1`}),` and no recipient fields; the recipient must then be provided before the cart is validated.`]})}),`\n`,_jsx(ParamField,{body:`gift_recipient_email`,type:`string`,id:`param-gift-recipient-email`,children:_jsx(_components.p,{children:`The email address of the gift recipient. Must be a valid email address and cannot be blank when sent.`})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsxs(ResponseField,{name:`cart`,type:`object`,required:true,id:`param-cart`,children:[_jsx(_components.p,{children:`The user’s active cart after the items were added.`}),_jsxs(Expandable,{title:`properties`,defaultOpen:`true`,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id`,children:_jsx(_components.p,{children:`UUID identifier of the cart.`})}),_jsx(ResponseField,{name:`user_id`,type:`integer`,required:true,id:`param-user-id-1`,children:_jsx(_components.p,{children:`The Benji Platform identifier of the user who owns the cart.`})}),_jsx(ResponseField,{name:`partner_id`,type:`integer`,required:true,id:`param-partner-id-1`,children:_jsx(_components.p,{children:`The Benji Platform identifier of the partner the cart belongs to.`})}),_jsxs(ResponseField,{name:`status`,type:`integer`,required:true,id:`param-status`,children:[_jsx(_components.p,{children:`Integer representing an enum of one of the following cart status values:`}),_jsx(Expandable,{title:`possible cart status values`,type:`enum`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`ACTIVE (1)`}),` : The cart is open and can be edited `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CANCELLED (2)`}),` : The cart was cancelled `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CHECKED_OUT (3)`}),` : The cart was redeemed `,_jsx(`br`,{})]}),`\n`]})})]}),_jsx(ResponseField,{name:`coupon_code`,type:`string`,id:`param-coupon-code`,children:_jsx(_components.p,{children:`The coupon code applied to the cart, if any.`})}),_jsx(ResponseField,{name:`created_date`,type:`string`,id:`param-created-date`,children:_jsx(_components.p,{children:`The date and time when the cart was created, in ISO 8601 format.`})}),_jsx(ResponseField,{name:`last_item_activity_at`,type:`string`,id:`param-last-item-activity-at`,children:_jsx(_components.p,{children:`The date and time of the last change to the cart items, in ISO 8601 format.`})}),_jsxs(ResponseField,{name:`items`,type:`array`,id:`param-items`,children:[_jsx(_components.p,{children:`The items in the cart.`}),_jsxs(Expandable,{title:`cart item properties`,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id-1`,children:_jsx(_components.p,{children:`UUID identifier of the cart item.`})}),_jsx(ResponseField,{name:`partnership_id`,type:`integer`,required:true,id:`param-partnership-id-1`,children:_jsx(_components.p,{children:`The identifier of the partnership the offer belongs to.`})}),_jsx(ResponseField,{name:`offer_id`,type:`string`,required:true,id:`param-offer-id`,children:_jsx(_components.p,{children:`The identifier of the offer.`})}),_jsx(ResponseField,{name:`merchant_id`,type:`integer`,id:`param-merchant-id`,children:_jsx(_components.p,{children:`The identifier of the merchant that provides the offer.`})}),_jsx(ResponseField,{name:`eligible_price_cents`,type:`integer`,required:true,id:`param-eligible-price-cents`,children:_jsxs(_components.p,{children:[`The price of the item at the time it was added, taken from the `,_jsx(_components.code,{children:`reward_amount`}),` the redemption token was issued for.`]})}),_jsx(ResponseField,{name:`currency`,type:`string`,id:`param-currency`,children:_jsxs(_components.p,{children:[`The currency of the price. Defaults to `,_jsx(_components.code,{children:`USD`}),`.`]})}),_jsx(ResponseField,{name:`redemption_token`,type:`string`,required:true,id:`param-redemption-token-1`,children:_jsx(_components.p,{children:`The redemption token the item was added with.`})}),_jsx(ResponseField,{name:`eligibility_campaign_id`,type:`integer`,id:`param-eligibility-campaign-id`,children:_jsx(_components.p,{children:`The ID of the campaign the item was found eligible under.`})}),_jsx(ResponseField,{name:`coupon_id`,type:`string`,id:`param-coupon-id`,children:_jsx(_components.p,{children:`The ID of the coupon applied to the item, if any.`})}),_jsx(ResponseField,{name:`eligibility_checked_at`,type:`string`,id:`param-eligibility-checked-at`,children:_jsx(_components.p,{children:`The date and time when the item was added to the cart, in ISO 8601 format.`})}),_jsx(ResponseField,{name:`is_gift`,type:`integer`,required:true,id:`param-is-gift-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`1`}),` if the item is a gift, `,_jsx(_components.code,{children:`0`}),` if it is for the user.`]})}),_jsx(ResponseField,{name:`is_giftable`,type:`integer`,required:true,id:`param-is-giftable`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`1`}),` if the offer can be gifted, `,_jsx(_components.code,{children:`0`}),` if it cannot.`]})}),_jsx(ResponseField,{name:`gift_recipient_name`,type:`string`,id:`param-gift-recipient-name-1`,children:_jsx(_components.p,{children:`The name of the item’s recipient. For items that are not gifts, this defaults to the user’s name when the user has a name and email on file.`})}),_jsx(ResponseField,{name:`gift_recipient_email`,type:`string`,id:`param-gift-recipient-email-1`,children:_jsx(_components.p,{children:`The email address of the item’s recipient. For items that are not gifts, this defaults to the user’s email when the user has a name and email on file.`})}),_jsx(ResponseField,{name:`created_date`,type:`string`,id:`param-created-date-1`,children:_jsx(_components.p,{children:`The date and time when the cart item was created, in ISO 8601 format.`})})]})]})]})]}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --request`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --url`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api-staging.withbenji.com/users/155/partners/61/cart/items`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'x-api-key: \u003cyour-partner-api-key>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --header`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Authorization: Bearer \u003cuser-access-token>'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"partnership_id\": 42,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"redemption_token\": \"3f6c0a52-8d1e-4f0b-9a57-0b6f2f7a7c11\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"quantity\": 1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`33`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`33`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ok\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cart\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"b1c0f3a8-6c1e-4d52-9f7e-2a4d7b9e5c10\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`155`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"partner_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`61`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"coupon_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-02T15:04:11.482913+00:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_item_activity_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-02T15:04:11.601227+00:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"items\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0e8d1f7b-3a55-4c0a-8d3b-5f0c6a1e9d42\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"partnership_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`42`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"offer_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sku-1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"merchant_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`93`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"eligible_price_cents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`450`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"redemption_token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3f6c0a52-8d1e-4f0b-9a57-0b6f2f7a7c11\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"eligibility_campaign_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`118`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"coupon_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"eligibility_checked_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-02T15:04:11.590118+00:00\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_gift\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"is_giftable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gift_recipient_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Test User\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gift_recipient_email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"test@test.com\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-02T15:04:11.598402+00:00\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cart_missing_redemption_token_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Missing redemption token.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`404`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"resource_not_found_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user 155 does not exist.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`409`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cart_redemption_token_scope_mismatch_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Redemption token does not belong to the requested user or partner.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`409`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"quantity_exceeds_purchase_limit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"You've exceeded the allowed quantity for this offer.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`410`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cart_redemption_token_invalid_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Redemption token is invalid, expired, or already consumed.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`422`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"personal_limit_reached\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"You've reached the personal limit for this offer. Additional items must be gifts.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`The same redemption token can be added more than once to buy several units of one offer. After the cart is built, `,_jsx(_components.a,{href:`/api-reference/endpoint/users/validate-cart`,children:`Validate Cart`}),` issues a `,_jsx(_components.code,{children:`cart_redemption_token`}),`. Pass that token to `,_jsx(_components.a,{href:`/api-reference/endpoint/transactions/redeem-cart-by-token`,children:`Redeem Cart by Token`}),`.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Add Item to Cart","description":"Add one or more redeemable offers to a user's active cart","sidebarTitle":"Add Item to Cart","api":"POST https://api-staging.withbenji.com/users/{user_id}/partners/{partner_id}/cart/items","href":"/api-reference/endpoint/users/add-cart-item"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Response","slug":"response","depth":3,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --request\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --url\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api-staging.withbenji.com/users/155/partners/61/cart/items\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Content-Type: application/json'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'x-api-key: \u0026#x3C;your-partner-api-key>'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --header\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'Authorization: Bearer \u0026#x3C;user-access-token>'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --data\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"partnership_id\": 42,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"redemption_token\": \"3f6c0a52-8d1e-4f0b-9a57-0b6f2f7a7c11\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"quantity\": 1\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"33\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ok\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"cart\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"b1c0f3a8-6c1e-4d52-9f7e-2a4d7b9e5c10\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"user_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">155\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"partner_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">61\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"coupon_code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_date\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-12-02T15:04:11.482913+00:00\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"last_item_activity_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-12-02T15:04:11.601227+00:00\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"items\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0e8d1f7b-3a55-4c0a-8d3b-5f0c6a1e9d42\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"partnership_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">42\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"offer_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"sku-1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"merchant_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">93\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"eligible_price_cents\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">450\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currency\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"USD\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"redemption_token\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"3f6c0a52-8d1e-4f0b-9a57-0b6f2f7a7c11\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"eligibility_campaign_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">118\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"coupon_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"eligibility_checked_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-12-02T15:04:11.590118+00:00\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"is_gift\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"is_giftable\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"gift_recipient_name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Test User\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"gift_recipient_email\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"test@test.com\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_date\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-12-02T15:04:11.598402+00:00\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cart_missing_redemption_token_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Missing redemption token.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"404","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"resource_not_found_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"user 155 does not exist.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"409","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cart_redemption_token_scope_mismatch_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Redemption token does not belong to the requested user or partner.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"409","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"quantity_exceeds_purchase_limit\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"You've exceeded the allowed quantity for this offer.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"410","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cart_redemption_token_invalid_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Redemption token is invalid, expired, or already consumed.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"422","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"personal_limit_reached\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"You've reached the personal limit for this offer. Additional items must be gifts.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Add Item to Cart","path":"/users/{user_id}/partners/{partner_id}/cart/items","servers":[{"url":"https://api-staging.withbenji.com"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"x-api-key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"x-api-key":{"schema":[{"type":"string","description":"Your partner API key, generated through the dashboard. Required together with `Authorization` .","required":true}]},"Authorization":{"schema":[{"type":"string","description":"A `Bearer` user access token obtained after the Benji Connect SDK `onSuccess` callback. Required together with `x-api-key` . See Exchange Token .","required":true}]}},"cookie":{},"path":{"user_id":{"schema":[{"type":"integer","description":"The Benji Platform identifier of the user who owns the cart.","required":true}]},"partner_id":{"schema":[{"type":"integer","description":"The Benji Platform identifier of the partner the cart belongs to. A user has one active cart per partner.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"partnership_id":[{"type":"integer","description":"The identifier of the partnership the offer belongs to. It must match the partnership the `redemption_token` was issued for.","required":true}],"redemption_token":[{"type":"string","description":"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.","required":true}],"quantity":[{"type":"integer","description":"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."}],"is_gift":[{"type":"integer","description":"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."}],"gift_recipient_name":[{"type":"string","description":"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."}],"gift_recipient_email":[{"type":"string","description":"The email address of the gift recipient. Must be a valid email address and cannot be blank when sent."}]}}],"examples":{"example":{"value":{"partnership_id":123,"redemption_token":"\u003cstring>","quantity":123,"is_gift":123,"gift_recipient_name":"\u003cstring>","gift_recipient_email":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"cart":[{"type":"object","properties":{"id":[{"type":"string","description":"UUID identifier of the cart.","required":true}],"user_id":[{"type":"integer","description":"The Benji Platform identifier of the user who owns the cart.","required":true}],"partner_id":[{"type":"integer","description":"The Benji Platform identifier of the partner the cart belongs to.","required":true}],"status":[{"type":"integer","description":"Integer representing an enum of one of the following cart status values:","required":true}],"coupon_code":[{"type":"string","description":"The coupon code applied to the cart, if any."}],"created_date":[{"type":"string","description":"The date and time when the cart was created, in ISO 8601 format."}],"last_item_activity_at":[{"type":"string","description":"The date and time of the last change to the cart items, in ISO 8601 format."}],"items":[{"type":"array","items":[{"type":"object","properties":{"id":[{"type":"string","description":"UUID identifier of the cart item.","required":true}],"partnership_id":[{"type":"integer","description":"The identifier of the partnership the offer belongs to.","required":true}],"offer_id":[{"type":"string","description":"The identifier of the offer.","required":true}],"merchant_id":[{"type":"integer","description":"The identifier of the merchant that provides the offer."}],"eligible_price_cents":[{"type":"integer","description":"The price of the item at the time it was added, taken from the `reward_amount` the redemption token was issued for.","required":true}],"currency":[{"type":"string","description":"The currency of the price. Defaults to `USD` ."}],"redemption_token":[{"type":"string","description":"The redemption token the item was added with.","required":true}],"eligibility_campaign_id":[{"type":"integer","description":"The ID of the campaign the item was found eligible under."}],"coupon_id":[{"type":"string","description":"The ID of the coupon applied to the item, if any."}],"eligibility_checked_at":[{"type":"string","description":"The date and time when the item was added to the cart, in ISO 8601 format."}],"is_gift":[{"type":"integer","description":"`1` if the item is a gift, `0` if it is for the user.","required":true}],"is_giftable":[{"type":"integer","description":"`1` if the offer can be gifted, `0` if it cannot.","required":true}],"gift_recipient_name":[{"type":"string","description":"The name of the item’s recipient. For items that are not gifts, this defaults to the user’s name when the user has a name and email on file."}],"gift_recipient_email":[{"type":"string","description":"The email address of the item’s recipient. For items that are not gifts, this defaults to the user’s email when the user has a name and email on file."}],"created_date":[{"type":"string","description":"The date and time when the cart item was created, in ISO 8601 format."}]}}],"description":"The items in the cart."}]},"description":"The user’s active cart after the items were added.","required":true}]}}],"examples":{"example":{"value":{"cart":{"id":"\u003cstring>","user_id":123,"partner_id":123,"status":123,"coupon_code":"\u003cstring>","created_date":"\u003cstring>","last_item_activity_at":"\u003cstring>","items":[{"id":"\u003cstring>","partnership_id":123,"offer_id":"\u003cstring>","merchant_id":123,"eligible_price_cents":123,"currency":"\u003cstring>","redemption_token":"\u003cstring>","eligibility_campaign_id":123,"coupon_id":"\u003cstring>","eligibility_checked_at":"\u003cstring>","is_gift":123,"is_giftable":123,"gift_recipient_name":"\u003cstring>","gift_recipient_email":"\u003cstring>","created_date":"\u003cstring>"}]}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"benji","siteName":"Benji","title":"Add Item to Cart - Benji","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-03T00:19:36.401Z","originalFileLocation":"api-reference/endpoint/users/add-cart-item.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Add one or more redeemable offers to a user\u0026#x27;s active cart\">\u003cmeta data-mint-head name=\"application-name\" content=\"Benji\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Add Item to Cart - Benji\">\u003cmeta data-mint-head property=\"og:description\" content=\"Add one or more redeemable offers to a user\u0026#x27;s active cart\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Benji\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://benji.mintlify.site/_mintlify/api/og/v2?division=Member+API\u0026amp;title=Add+Item+to+Cart\u0026amp;description=Add+one+or+more+redeemable+offers+to+a+user%27s+active+cart\u0026amp;theme=c6069e65afe5566508648c56\u0026amp;signature=eb7413b14a88715b0465a9c59fc9edc2c0e6d78b9076a1b8290052ab8bd245cb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Add Item to Cart - Benji\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Add one or more redeemable offers to a user\u0026#x27;s active cart\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://benji.mintlify.site/_mintlify/api/og/v2?division=Member+API\u0026amp;title=Add+Item+to+Cart\u0026amp;description=Add+one+or+more+redeemable+offers+to+a+user%27s+active+cart\u0026amp;theme=c6069e65afe5566508648c56\u0026amp;signature=eb7413b14a88715b0465a9c59fc9edc2c0e6d78b9076a1b8290052ab8bd245cb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Benji\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9900ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/users/add-cart-item.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.withbenji.com/#organization\",\"name\":\"Benji\",\"url\":\"https://docs.withbenji.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/logo/benji-docs-logo.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=60b7d848ffe4ab0c66efcfcbf573e3be\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.withbenji.com#website\",\"name\":\"Benji\",\"url\":\"https://docs.withbenji.com\",\"publisher\":{\"@id\":\"https://docs.withbenji.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item#webpage\",\"url\":\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item\",\"name\":\"Add Item to Cart\",\"description\":\"Add one or more redeemable offers to a user's active cart\",\"dateModified\":\"2026-12-03T00:19:36.401Z\",\"isPartOf\":{\"@id\":\"https://docs.withbenji.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Member API\",\"item\":\"https://docs.withbenji.com/api-reference/endpoint/users/get\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add Item to Cart\",\"item\":\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item#apireference\",\"headline\":\"Add Item to Cart\",\"name\":\"Add Item to Cart\",\"description\":\"Add one or more redeemable offers to a user's active cart\",\"url\":\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item\",\"mainEntityOfPage\":{\"@id\":\"https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item#webpage\"},\"dateModified\":\"2026-12-03T00:19:36.401Z\",\"publisher\":{\"@id\":\"https://docs.withbenji.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.withbenji.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Benji\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Benji\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/users/add-cart-item.md","siteName":"Benji","nav":{"global":null,"tabs":[{"tab":"Platform","pages":[{"title":"Platform","href":"/pilot/overview"}]},{"tab":"Benji Connect","pages":[{"title":"Benji Connect","href":"/connect/overview"}]},{"tab":"Benji Integrations","pages":[{"title":"Benji Integrations","href":"/integrations/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"API Authentication","sidebarTitle":"Authentication","href":"/api-reference/authentication"}]},{"group":"Member API","pages":[{"title":"Get User","description":"Get a single user by ID","sidebarTitle":"Get User","api":"GET https://api-staging.withbenji.com/users/{id}","href":"/api-reference/endpoint/users/get"},{"title":"Add Item to Cart","sidebarTitle":"Add Item to Cart","api":"POST https://api-staging.withbenji.com/users/{user_id}/partners/{partner_id}/cart/items","href":"/api-reference/endpoint/users/add-cart-item"},{"title":"Validate Cart","description":"Re-check eligibility for every item in a user's cart and issue a cart redemption token","sidebarTitle":"Validate Cart","api":"POST https://api-staging.withbenji.com/users/{user_id}/partners/{partner_id}/cart/validate","href":"/api-reference/endpoint/users/validate-cart"}]},{"group":"Reward API","pages":[{"title":"Get Reward Transaction","sidebarTitle":"Get Transaction","api":"GET https://api-staging.withbenji.com/transactions/{id}","href":"/api-reference/endpoint/transactions/get"},{"title":"Redeem by Token","sidebarTitle":"Redeem by Token","api":"POST https://api-staging.withbenji.com/transactions/redeem","href":"/api-reference/endpoint/transactions/redeem"},{"title":"Redeem Cart by Token","sidebarTitle":"Redeem Cart by Token","api":"POST https://api-staging.withbenji.com/transactions/redeem_cart_by_token","href":"/api-reference/endpoint/transactions/redeem-cart-by-token"}]},{"group":"Partnerships","pages":[{"title":"List Partnerships","sidebarTitle":"List Partnerships","api":"GET https://api-staging.withbenji.com/partnerships","href":"/api-reference/endpoint/partnerships/list"},{"title":"Get Partnership","sidebarTitle":"Get Partnership","api":"GET https://api-staging.withbenji.com/partnerships/{id}","href":"/api-reference/endpoint/partnerships/get"},{"title":"Send Trigger Event","sidebarTitle":"Send Trigger","api":"POST https://api-staging.withbenji.com/partnerships/{partnership_id}/triggers","href":"/api-reference/endpoint/triggers/send"},{"title":"Get Campaign Eligibility","sidebarTitle":"Campaign Eligibility","api":"POST https://api-staging.withbenji.com/partnerships/{partnership_id}/campaigns/eligibility","href":"/api-reference/endpoint/campaigns/eligibility"}]},{"group":"Webhooks","pages":[{"title":"Benji Platform Webhooks Overview","sidebarTitle":"Overview","href":"/api-reference/webhooks/overview"},{"title":"Subscribe to a webhook event","sidebarTitle":"Subscribe","api":"POST https://notificationservice-staging.withbenji.com/webhooks/subscribe","href":"/api-reference/webhooks/subscribe"},{"title":"Update a webhook subscription","sidebarTitle":"Update","api":"PUT https://notificationservice-staging.withbenji.com/webhooks/subscribe","href":"/api-reference/webhooks/update"}]}]}]},"basePath":"","title":"Add Item to Cart - Benji","deploymentId":"dpl_4yZxV19iA4iQbQLKpiEbDRZbaukJ","buildId":"dpl_4yZxV19iA4iQbQLKpiEbDRZbaukJ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-rrEjMEj9.js","snippetPresets-BAwajHq0.js","utils-Dk5Rw1j7.js","style-to-object-BY3JEAdk.js","utils-DEa5s7HT.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-DklRggtM.js","conditional-requirements-CFM0id0Q.js","cloneDeep-Dmd8Dtl3.js","_Uint8Array-DJOdfMxL.js","isObject-FP1Yky1u.js","ApiExamples-D_AaxPsu.js","usePlaygroundInputsStore-Cma-50-F.js","shallow-BkbikJPT.js","isEqual-ChmK1oW2.js","CodeSnippets-RshC0qEa.js","CodeSnippet-C4HlRD7L.js","use-playground-group-access-BA-Tl_RI.js","Page-QqDMRMNz.js","api-description-markdown-BZgYMOP-.js","DynamicMarkdown-Bud--1w4.js","SectionHeading-oXLyPZnT.js","MethodPill-CqC02MRb.js","getPastedJson-C90_9vhn.js","Check2Icon-DqC8Aq9w.js","axios-CsQoIw0U.js"]}