Beta

The Partner Trading API v1 is in beta — endpoints and response shapes may still change.

Developers
Cru World Wine
API v1 · REST & MCP
Confirmations

Confirm an instruction

Carry out an instruction a connected app staged. Only the same app, for the same customer and market, can confirm it.

POST/confirmations/{code}LIVE
No scope of its ownConnected apps only
Only after the customer says yes

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 STEPS
  1. Your server

    Stage the write with the customer’s token

    POST/bids

    A write sent with a connected app’s bearer token is checked against live data and stored, and nothing else happens.

    KEEPdata.confirmation.code, preview.summary

  2. The 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.

  3. Your server

    Confirm the code

    POST/confirmations/{code}

    Same app, same customer, same market. The token must still hold the scopes the instruction needs.

  4. 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.

    KEEPdata

Path parameter

REQUIRED
codestringThe 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 OK

The 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 →

UP NEXT Discard an instruction

API credentials

Enter the client key and secret issued by Cru. They are kept for this browser tab’s session — a reload keeps them, closing the tab or clearing them ends them.

Credentials are never included in copied examples, and are redacted from anything the console prints back.

Request API access

Tell us who you are and what you want to build. Cru issues a client key and secret for your organisation, scoped to what you need.

Markets you trade in (choose one or more)

We use what you send here to reply about API access, and for nothing else. Cloudflare Turnstile checks the form for bots (privacy policy).