Skip to main content

POST Release Cart Items

Allows the partner to cancel a reservation on a set of items. This is optional as reserved items that are not confirmed are automatically released after timeout. This is suitable for partners with highly bursty traffic requiring prompt release of reserved items.

Description#

When the user removes a reserved item from their cart or cancels their cart/transaction altogether. Reserved cart items will eventually time out and be automatically released, but a partner may want to expedite this process if they have a bursty or high traffic environment to prevent premature or temporary exhaustion of supply.

Sample request

 POST /v1/cart/release    {        "cartId": "1580265846172",        "items": [            {                "cartItemId": "30d0a389-5f63-4e20-9553-13ff40f8b11c",                "itemReservationId": "rokt_item_reservation_id.63a94103-75da-4d71-8c14-84674d286b98"            }        ]    }

Request#

Path

POST /v1/cart/release

Parameters

NameInDescriptionRequiredExample
rokt-api-keyheaderAPI authentication keytrueskeletonkey
Content-TypeheaderMedia type of request, 'application/json' is the only supported value at the moment application/json
AcceptheaderExpected media type of response, 'application/json' is the only supported value at the moment application/json
rokt-session-idheaderSessionId used by Rokt internally for tracking, referral, logging and debugging.trueca75f48-ebbd-4d8e-83c3-fdd70893294d
rokt-tag-idheaderUnique Rokt Tag IDtrue253_439d21r21r21321
Accept-LanguageheaderExpected locale of the consumer. This can be the full locale including language and country, or a neutral locale which only has the language. When locale is specified only placements and offers that match the locale are included for consideration. en-US

Request body

{  "cartId": "string",  "items": [    {      "cartItemId": "string",      "itemReservationId": "string"    }  ],  "attributes": {    "attribute": "string"  }}

Response#

200 OK

{  "cartId": "string",  "items": [    {      "cartItemId": "string",      "itemReservationId": "string",      "success": true    }  ]}

Error#

400 BadRequest

{  "description": "string",  "errors": [    {      "code": "string",      "message": "string",      "value": {}    }  ]}

401 Unauthorized

403 Forbidden

{  "description": "string",  "errors": [    {      "code": "string",      "message": "string",      "value": {}    }  ]}

422 UnprocessableEntity

{  "description": "string",  "errors": [    {      "code": "string",      "message": "string",      "value": {}    }  ]}

500 InternalServerError

{  "description": "string",  "errors": [    {      "code": "string",      "message": "string",      "value": {}    }  ]}

504 GatewayTimeout

{  "description": "string",  "errors": [    {      "code": "string",      "message": "string",      "value": {}    }  ]}
Was this article helpful?