Skip to main content

Quickstart

Audience

This API surface is for integration partners building on top of the Rokt network. Rokt ecommerce partners integrating placements on their own checkout should use the Rokt Ecommerce developer docs instead.

This walkthrough takes you from zero to a registered merchant with verified controls and an active partnership, using dry_run=true so nothing persists. Drop the dry-run flag when you're ready to go live.

You'll need an API token and a terminal.

Before you startDirect link to Before you start

Gather the following before running the calls below. Each one will be referenced by name in the steps that follow.

  • API credentials (client_id + client_secret): issued once by Rokt during onboarding, then reused every time you exchange them for the short-lived access token used in the calls below. See Authentication if you don't have them yet.
  • Partner platform's Rokt parent account ID: your platform's top-level account in Rokt's hierarchy. Your Rokt onboarding contact provides this.
  • vertical_id + sub_vertical_id for the merchant: either Rokt's own vertical and sub-vertical IDs, which work with no setup, or your own taxonomy's IDs. Your own IDs need a custom mapping that Rokt seeds for your parent account, once per platform: email your complete category list to smb-partnerships@rokt.com, then verify it landed in step 2. See Vertical taxonomy.
  • Store URL with scheme: e.g. https://acme.myshopify.com. Bare hosts (acme.myshopify.com) are rejected with 400.
  • A stable external_account_id: your platform's own identifier for this merchant. Register is idempotent on this value, so it must be stable across retries.
  • uuidgen (or any UUID generator): for producing fresh Idempotency-Key values on writes.
note

Two contracts every call follows.

  1. Every response is wrapped in { "status", "error", "message", "request_id", "data": { ... } }. Endpoint-specific payloads live inside data. Examples below show the full envelope.
  2. Every write needs X-Platform-Parent-Account-Id set to your partner platform's Rokt parent account ID. Missing it returns 422 on writes. Reads accept it as optional but recommended.

Export both:

# Replace with YOUR partner platform's Rokt parent account ID (obtained from your Rokt onboarding contact).
export PARENT="<your-platform-parent-account-id>"
  1. Get your API token

    Exchange your Rokt-granted API credentials for an access token; see Authentication. For the rest of this guide, export it:

    export TOKEN="eyJhbGc..."
  2. List the vertical pairs you can use

    GET /v1/partnership/vertical-mappings returns every vertical pair your parent account can use: Rokt's own pairs first, then any custom pairs Rokt has seeded for you. Run it once before your first register call. Registration rejects a pair that isn't in this list with a 400.

    curl "https://accounts.rokt.com/v1/partnership/vertical-mappings?parent_account_id=$PARENT" \
    -H "Authorization: Bearer $TOKEN"

    Response:

    {
    "status": 200,
    "error": null,
    "message": "ok",
    "request_id": "0e3a1b9c-...",
    "data": {
    "vertical_mappings": [
    {
    "partner_vertical_id": 8,
    "partner_vertical_name": "Travel",
    "partner_sub_vertical_id": 801,
    "partner_sub_vertical_name": "Airlines",
    "vertical_name": "Airlines",
    "source": "rokt",
    "created_at": null
    },
    {
    "partner_vertical_id": 1500,
    "partner_vertical_name": "Apparel",
    "partner_sub_vertical_id": 1610,
    "partner_sub_vertical_name": "Womenswear",
    "vertical_name": "Retail",
    "source": "custom",
    "created_at": "2026-07-01T00:00:00Z"
    }
    ]
    }
    }

    The IDs and names above are examples; a real response lists every Rokt pair. The vertical_id and sub_vertical_id you send in the next step must appear here as a partner_vertical_id / partner_sub_vertical_id pair. source: "rokt" rows use Rokt's own IDs and need no setup. source: "custom" rows are your own IDs, seeded for you. vertical_name shows which Rokt category the pair resolves to, useful for spotting a custom mapping that went somewhere unexpected.

    warning

    Using your own taxonomy and no source: "custom" rows? Your taxonomy isn't seeded yet, and registering with your own IDs returns a 400 until it is. Email your complete category list to smb-partnerships@rokt.com and wait for confirmation, or send Rokt's IDs instead. See Check what's mapped.

  3. Register a merchant

    POST /v1/accounts/register/partnership creates (or matches) a Rokt account for a merchant onboarded via your platform. The call is idempotent on external_account_id: your stable identifier for the merchant in your own system.

    store_identifier must be a valid URL (3–400 chars) including the scheme. https://acme.myshopify.com works; acme.myshopify.com returns 400.

    Capture data.account_id from the response. You'll use it in every subsequent call. If you also passed pages, capture each entry's page_identifier; you'll pass that string into the Web SDK's selectPlacements call to target each surface. See Pages and Layouts.

    note

    register is the one write that does not require an Idempotency-Key header; it's idempotent on external_account_id instead. All subsequent writes (controls, status, payout-setup, etc.) require Idempotency-Key.

    # pages[].surface: confirmation | tracking | returns
    # pages[].layout_type: Overlay | Embedded
    # Every integration ships a default; omit `pages` to use it, or pass an array to override. See pages-and-layouts.
    curl -X POST https://accounts.rokt.com/v1/accounts/register/partnership \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Platform-Parent-Account-Id: $PARENT" \
    -H "Content-Type: application/json" \
    -d '{
    "brand": "Acme Apparel",
    "vertical_id": 1500,
    "sub_vertical_id": 1610,
    "country_code": "US",
    "platform_parent_account_id": "<your-platform-parent-account-id>",
    "store_identifier": "https://acme-apparel.example.com",
    "external_account_id": "partner-merchant-abc123",
    "pages": [
    { "surface": "confirmation", "layout_type": "Overlay" },
    { "surface": "tracking", "layout_type": "Embedded" },
    { "surface": "returns", "layout_type": "Embedded" }
    ]
    }'

    Response:

    {
    "status": 200,
    "error": null,
    "message": "ok",
    "request_id": "0e3a1b9c-1234-4abc-9def-aaaabbbbcccc",
    "data": {
    "account_id": "<your-account-id>",
    "pages": [
    { "surface": "confirmation", "page_id": "bfb5b9be-...", "layout_id": "9d11d8aa-...", "page_identifier": "confirmation_page" },
    { "surface": "tracking", "page_id": "2b9d8a5e-...", "layout_id": "f8700369-...", "page_identifier": "tracking_page" },
    { "surface": "returns", "page_id": "7a31963a-...", "layout_id": "4865f1ab-...", "page_identifier": "returns_page" }
    ]
    }
    }
    tip

    Export it: export ACCOUNT_ID="<your-account-id>".

    Auth-propagation race

    Token authentication for newly-created merchant accounts propagates asynchronously. Immediate calls to controls, status, or payout-setup endpoints on the new account_id can return 401 or 403 for up to 1–2 minutes. Don't treat the first auth failure on a fresh account as terminal; retry every 15–30 seconds for up to two minutes before investigating.

  4. Read current marketplace controls

    GET /v1/partnership/accounts/{account_id}/marketplacecontrolslists returns the merchant's current marketplace control configuration. On a fresh account, this reflects the default vertical block list inherited from your partnership preset.

    curl https://accounts.rokt.com/v1/partnership/accounts/$ACCOUNT_ID/marketplacecontrolslists \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Platform-Parent-Account-Id: $PARENT"

    Look at data.translated_verticals and data.marketplace_controls_list.content_hash. translated_verticals shows the effective policy per pair you can use (vertical_id is the partner sub-vertical ID you send on PUT; for a Rokt pair, that is Rokt's sub-vertical ID), useful for round-tripping back to your UI.

  5. Update marketplace controls (dry-run)

    Verticals merge: send only what you are changing, and use policy: "Allow" to unblock. domains replaces in full. See Update semantics.

    • X-Platform-Parent-Account-Id is required on all writes; missing it returns 422.
    • Idempotency-Key is required on all writes. Generate a fresh UUID per logical retry group. The 24-hour dedup window collapses retries with the same key into a single execution.
    • dry_run=true runs the full validation without persisting state, perfect for validating a payload. The response envelope adds dry_run: true alongside data.
    curl -X PUT "https://accounts.rokt.com/v1/partnership/accounts/$ACCOUNT_ID/marketplacecontrolslists?dry_run=true" \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Platform-Parent-Account-Id: $PARENT" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: $(uuidgen)" \
    -d '{
    "name": "Acme Network Controls",
    "blockedVerticals": [
    {
    "partnerVerticalId": 1500,
    "partnerSubVerticalId": 1610,
    "policy": "Block",
    "position1Policy": "Block"
    },
    {
    "partnerVerticalId": 1500,
    "partnerSubVerticalId": 1611,
    "policy": "Block",
    "position1Policy": "Block"
    }
    ],
    "domains": [
    { "domain": "competitor.example.com", "policy": "Block" }
    ],
    "contentHash": null
    }'
    note

    When updating existing controls, send the content_hash from your GET as contentHash. The service rejects a supplied stale hash before writing. See Update Semantics for when the check runs and how to coordinate writes.

    The response payload (inside data) matches GET: same translated_verticals and marketplace_controls_list (with domains and a fresh content_hash). On dry-run, the response describes what would be written.

  6. Activate the partnership (dry-run)

    PUT /v1/partnership/accounts/{account_id}/status cascades active/paused across every non-archived page variant on the account.

    curl -X PUT "https://accounts.rokt.com/v1/partnership/accounts/$ACCOUNT_ID/status?dry_run=true" \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Platform-Parent-Account-Id: $PARENT" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: $(uuidgen)" \
    -d '{ "status": "active" }'

    Response data.variants[] lists the per-variant breakdown:

    {
    "status": 200,
    "error": null,
    "message": "ok",
    "request_id": "0e3a1b9c-...",
    "data": {
    "account_id": "<your-account-id>",
    "status": "active",
    "variants": [
    { "page_id": "9d11...", "name": "Thanks", "status": "active" }
    ]
    }
    }
  7. Verify status

    GET /v1/partnership/accounts/{account_id}/status returns the aggregate status plus the per-variant detail.

    curl https://accounts.rokt.com/v1/partnership/accounts/$ACCOUNT_ID/status \
    -H "Authorization: Bearer $TOKEN" \
    -H "X-Platform-Parent-Account-Id: $PARENT"

    In production (drop dry_run=true), data.status should match what you just PUT. If you see "mixed" after a PUT status=active, some variants failed to update; capture the request_id and file a support ticket.

    The aggregation rule:

    • "active": every non-archived variant is enabled.
    • "paused": every non-archived variant is disabled (or none exist).
    • "mixed": some enabled, some disabled.

Next stepsDirect link to Next steps

Start here:

Then:

Was this article helpful?
Last updated Dec 3, 2026