Skip to main content
POST

Authorizations

Authorization
string
header
required

The user's connection access_token (user authentication), or an org-minted buy_token for org-owned accounts.

Body

application/json
ask
string
required

What the user wants, in plain language. Required unless the call is a confirm.

Minimum string length: 1
Pattern: \S
conversation_id
string

The thread to continue. A confirm always requires it.

Minimum string length: 1
confirm

A cart hash from a previous response (16 hex characters), or an array of hashes to place several carts. An array confirm cannot carry an ask in the same call.

Pattern: ^[0-9a-f]{16}$

Response

One turn of the purchase conversation, in the fixed envelope.

The fixed response envelope. Every field is present on every response, null when empty.

conversation_id
string
required

Thread it back on every follow-up. Returned on the first call too.

status
enum<string>
required

needs_input is progress, not failure: the reply is a question or a cart waiting on confirmation.

Available options:
needs_input,
order_placed,
partially_placed,
declined
reply
string
required

The assistant's turn as prose, ready to show a human.

messages
string[]
required

The same turn split into ordered bubbles for chat surfaces.

message_id
string
required
cart
object | null
required

The most recently shown cart. Null when no cart is on the table.

carts
object[]
required

Every open cart in the conversation, oldest first. A conversation can hold carts at several merchants.

placements
object[] | null
required

Per-cart outcomes of a multi-cart confirm; null on every other call. Partial success is representable here.

catalog
object | null
required

The last product search as data, with a freshness stamp. Null when nothing fresh was searched.

error_code
string | null
required

Machine-readable failure code when something went wrong.