Skip to main content
POST
Simulate Connection
Subtotal Connector tool: simulate_connection Creates an active simulated connection to a retailer, as the dashboard’s Event Simulator does, and sends connection.activated to webhook destinations that accept simulated events. The connection is marked is_simulated: true and never collects real purchases. Every call creates a new connection. By default it also gets 1 to 4 simulated purchases, dated in the last 60 days as history. They don’t send purchase.created. Set include_purchases to false to skip them, and use Simulate a purchase to send that event. Simulated connections appear in List connections and Get a connection, marked is_simulated. An unknown retailer_id returns 422. Call it with your API key, or with a Subtotal Connector OAuth token that includes simulator:write. A token without it receives 403 insufficient_scope. Partner app tokens don’t include it.

Headers

authorization
string | null
x-api-key
string | null

Body

application/json

The public POST /simulated-connections body.

retailer_id
string
required

The retailer to simulate a link to

Minimum string length: 1
Example:

"walmart"

customer_id
string | null

Your identifier for the test customer; generated when omitted

Maximum string length: 64
Example:

"test-customer-1"

email
string | null

The test customer's email

Maximum string length: 254
mobile
string | null

The test customer's mobile

Maximum string length: 16
Example:

"+15555550100"

include_purchases
boolean
default:true

Also create 1–4 simulated purchases of random retailer products, dated in the last 60 days as history; they emit no events

Response

Successful Response

connection_id
string
required

A unique identifier for the connection

Example:

"01J51S0JYV6N7K1030CV1ZKSCA"

customer_id
string
required

A unique identifier used to map connections to customer records in external systems.

Example:

"8a46e581-48ba-498a-9ad0-2ee72582e1af"

retailer_id
string
required

The unique identifier for the retailer in the connection

Example:

"01J7SC0NN73R6F5VVSP3ZKPDA3"

status
enum<string>
required

The status of the connection

Available options:
active,
initialized,
unauthenticated,
disconnected
Example:

"active"

email
string | null
required

The customer's email address

mobile
string | null
required

The customer's mobile phone number

Example:

"+1234567890"

creation_date
string<date-time>
required

When the connection was created

Example:

"2024-08-13T17:27:57.913Z"

tags
Tags · object

Client-defined attribution tags recorded when the connection is created, for grouping connection metrics — e.g. {"campaign": "summer_sweeps", "program": "loyalty"}. Names and values are opaque to Subtotal and are never interpreted. At most 10 tags; names up to 64 characters, values up to 256. Intended for campaign and source metadata — do not put consumer PII in tags.

Example:
is_simulated
boolean
default:false

True for a test connection made with the event simulator. Its events are marked is_simulated too, and it never collects real purchases.

Example:

false