Skip to main content

POST Any Placements

Allows the partner to determine whether there are any placements to display, and potentially skip the upsell/cross-sell stage if applicable.

Description#

To decide if it’s worth showing the page containing the Rokt add-to-cart placement. Based on whether this returns true or false the partner can choose to show or skip the upsell page in the transaction flow.

Sample request

POST /v1/placements/any{    "cartId": "1580265846172",    "attributes": {        "eventId": "1100526195FA115A",        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36",        "venueName": "Madison Square Garden",        "eventdate": "20311212",        "country": "US",        "locale": "en-US"    },"pageIdentifier": "checkout.upsell"}

Request#

Path

POST /v1/Placements/any

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. Optional for this endpoint (sessionId generated if not provided). ca75f48-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",  "pageIdentifier": "string",  "url": "string",  "attributes": {    "attribute": "string"  }}

Response#

200 OK

{  "result": 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?