Rokt Documentation
  • Documentation
  • User Guide
  • SDK
  • API
  • Third-Party Integrations
  • Help

›Cart

Getting Started

  • Introduction

Transactions

    Events

    • Overview
    • Authentication
    • POST Events

    Cart

    • Overview
    • POST Reserve Cart Items
    • POST Confirm Cart Items
    • POST Release Cart Items

    Confirmation

    • POST Cancel Confirmed Item

    Placements

    • POST Any Placements

Customer Data

  • Referral Export
  • Transaction Export
  • Custom Audience Import
  • Unsubscribe Import
  • Attributes

Reporting

  • Overview
  • Authentication
  • Account Level

    • GET Account Summary
    • GET Account Campaigns Overview
    • GET Account Campaigns Breakdown
    • GET Account Campaigns Histogram
    • GET Account Transactions Overview
    • GET Account Transactions Breakdown

    Campaign Level

    • GET Campaign Overview
    • GET Campaign Breakdown
    • GET Campaign Histogram

    Creative Level

    • GET Creative Overview
    • GET Creative Breakdown

    Metadata

    • GET Campaign Metadata
    • GET Audience Metadata
    • GET Creative Metadata
    • GET Accounts Metadata

Rokt Calendar

  • Overview
Edit

POST Confirm Cart Items

Allows the partner to confirm the successful purchase of items. Rokt will then inform the relevant provider of the products for fulfillment.

Description

After the payment is processed for all the items in the cart. Rokt advises that this is called for all purchase events, including on all platforms, devices, environments (web / app), countries and channels.

Sample request:

POST /v1/Cart/confirm
{
    "cartId": "1580265846172",
    "orderId": "1580265885747",
    "items": [
        {
            "cartItemId": "30d0a389-5f63-4e20-9553-13ff40f8b11c",
            "catalogItemId": "parkwhiz_quote.84118520",
            "quantity": 1,
            "currency": "CAD",
            "unitPrice": 10,
            "totalPrice": 10,
            "itemReservationId": "rokt_item_reservation_id.63a94103-75da-4d71-8c14-84674d286b98"
        }
    ]
}

Request

Path

POST /v1/Cart/confirm

Parameters

NameTypeInDescriptionRequiredExample
rokt-api-key headerAPI authentication keytrueskeletonkey
Content-Type headerMedia type of request, 'application/json' is the only supported value at the moment application/json
Accept headerExpected media type of response, 'application/json' is the only supported value at the moment application/json
rokt-session-id headerSessionId used by Rokt internally for tracking, referral, logging and debugging. Optional on when no items included (sessionId generated if not provided). ca75f48-ebbd-4d8e-83c3-fdd70893294d
rokt-tag-id headerUnique Rokt Tag IDtrue253_439d21r21r21321
Accept-Language headerExpected 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

Example Value
Schema
{
"cartId": "string",
"orderId": "string",
"items": [
{
"cartItemId": "string",
"itemReservationId": "string",
"unitPrice": 0,
"quantity": 0,
"totalPrice": 0,
"currency": "string"
}
],
"payPalOrderId": "string",
"merchantId": "string",
"attributes": {
"attribute": "string"
}
}
Object {
cartId: String
orderId: String
items: Array [
Object {
cartItemId: String
itemReservationId: String
unitPrice: Number
quantity: Number
totalPrice: Number
currency: String
}
]
payPalOrderId: String
merchantId: String
attributes: Object {
[string]: String
}
}

Response

200 OK

Example Value
Schema
{
"cartId": "string",
"orderId": "string",
"items": [
{
"cartItemId": "string",
"itemReservationId": "string",
"itemConfirmationId": "string",
"itemConfirmationUrl": "string",
"success": true
}
]
}
Object {
cartId: String
orderId: String
items: Array [
Object {
cartItemId: String
itemReservationId: String
itemConfirmationId: String
itemConfirmationUrl: String
success: Boolean
}
]
}

Error

400 BadRequest

Example Value
Schema
{
"description": "string",
"errors": [
{
"code": "string",
"message": "string",
"value": {}
}
]
}
Object {
description: String
errors: Array [
Object {
code: String
message: String
value: Object {}
}
]
}

401 Unauthorized

403 Forbidden

Example Value
Schema
{
"description": "string",
"errors": [
{
"code": "string",
"message": "string",
"value": {}
}
]
}
Object {
description: String
errors: Array [
Object {
code: String
message: String
value: Object {}
}
]
}

422 UnprocessableEntity

Example Value
Schema
{
"description": "string",
"errors": [
{
"code": "string",
"message": "string",
"value": {}
}
]
}
Object {
description: String
errors: Array [
Object {
code: String
message: String
value: Object {}
}
]
}

500 InternalServerError

Example Value
Schema
{
"description": "string",
"errors": [
{
"code": "string",
"message": "string",
"value": {}
}
]
}
Object {
description: String
errors: Array [
Object {
code: String
message: String
value: Object {}
}
]
}

504 GatewayTimeout

Example Value
Schema
{
"description": "string",
"errors": [
{
"code": "string",
"message": "string",
"value": {}
}
]
}
Object {
description: String
errors: Array [
Object {
code: String
message: String
value: Object {}
}
]
}
← POST Reserve Cart ItemsPOST Release Cart Items →
  • Description
  • Request
  • Response
  • Error
RESOURCES
DocumentationUser GuideSDKAPIIntegration PartnersHelp
COMPANY
About UsContact UsCareersEngineering Blog
Rokt Documentation
Copyright © Rokt 2021 - All Rights Reserved