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

Cart API Overview

The Add to Cart API provides Rokt Partners with the ability to add additional products to the cart within a transaction. It works in concert with the Web SDK, which provides the ability to render front-end placements and provides hooks to update the partner's cart. There are two integrations needed to power upsells through Rokt:

  1. Integrate your back-end cart/check-out system with the Rokt Add to Cart API (this documentation).
  2. Integrate the Web SDK into your cart front-end (Web SDK documentation).

An example of a Rokt add-to-cart product is a parking spot. A ticketing partner, for example, can upsell parking spots to their customers while they are purchasing event tickets. These parking spots are sourced through Arrive.

In-transaction request flow

To be able to fulfil customer orders partners need to adhere to the following transaction flow.

In-Transaction Request Flow

  1. Call /placements/any to determine whether there are any placements to display, and potentially skip the upsell stage if applicable.
  2. Based on whether /placements/any returns true or false the partner can choose to show or skip the upsell page in the transaction flow. On the upsell page partner must initialize Web SDK, which will request and display available placements.
  3. Once a user opts-in the Web SDK informs the partner's front-end by calling updateItemCallback. Then the normal purchase process proceeds.
  4. Call /cart/reserve to reserve/hold the items for a set period of time during which the purchase must be completed and confirmed with Rokt. If multiple cart items are passed into this method, some of them might be reserved successfully, and some might be rejected.
  5. Once a user pays for the items, call /cart/confirm to confirm the successful purchase of the items. Rokt will then inform the relevant provider of the products for fulfilment.
  6. Alternative: Call /cart/release to cancel a reservation on a set of items. This is optional as reserved items that are not confirmed are automatically released after a timeout. This is suitable for partners with high traffic periods requiring prompt release of reserved items.
  7. Alternative: Call /confirmation/cancel to cancel an item that has been confirmed. This is suitable for partners who want to cancel items after it is confirmed.
← POST EventsPOST Reserve Cart Items →
  • In-transaction request flow
RESOURCES
DocumentationUser GuideSDKAPIIntegration PartnersHelp
COMPANY
About UsContact UsCareersEngineering Blog
Rokt Documentation
Copyright © Rokt 2021 - All Rights Reserved