Confirm an instruction
Carry out an instruction a connected app staged. Only the same app, for the same customer and market, can confirm it.
This is the call that trades with the customer’s money or wine. Show them preview.summary and confirm only on their explicit yes.
How this call works
4 STEPSYour server
Stage the write with the customer’s token
POST /bidsA write sent with a connected app’s bearer token is checked against live data and stored, and nothing else happens.
KEEP
data.confirmation.code, preview.summaryThe customer
The customer reads the summary and says yes
Show preview.summary as it is. If the customer declines or wants changes, do nothing: the code expires on its own after 15 minutes.
Your server
Confirm the code
POST /confirmations/{code}Same app, same customer, same market. The token must still hold the scopes the instruction needs.
Cru
Cru re-checks, then executes once
Anything that moved since the preview — the price, the units, the bid — refuses with PRICE_CHANGED or TRADE_REFUSED rather than doing what the customer did not see. A repeat replays the first result.
KEEP
data
Path parameter
REQUIRED| codestring | The cnf_ code a connected app’s write returned. URL-encode it as a single path segment. |
No body: what runs is exactly what was staged, never anything sent now.
Response fields
201 Created · 200 OKThe action’s own result: 201 for bid.place, offer.list, bid.buy and inbond_address.add, 200 for the rest. A repeat replays it with Idempotent-Replayed: true.
actionstring
The action that ran, such as bid.place.
statusstring
completed.
…resultobject fields
What the action returns: bid, offer, or for bid.buy an order, for offer.sell the units sold, or inbond_address — as each write’s page describes.
Errors
A code that is unknown or was staged by another app, customer or market — and any code sent with a partner credential — returns CONFIRMATION_NOT_FOUND / 404. An expired or discarded code returns CONFIRMATION_EXPIRED / 410; one still running, REQUEST_IN_PROGRESS / 409. A token that no longer holds every scope the instruction needs returns AUTH_INSUFFICIENT_SCOPE / 403. A code already carried out answers as it did the first time: its result again, or the same error. Missing or invalid credentials return AUTH_INVALID_CREDENTIALS / 401. View all error codes →