Beta

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

Developers
Cru World Wine
API v1 · REST & MCP
Your offers

Remove an offer

Take one listed line of your portfolio, or a whole listing, off sale. Wine stored with Cru stays in your portfolio; wine held outside Cru is removed from it.

DELETE/offers/{code}LIVE
Required scopeoffers:writeAuthentication required

How this write runs

offer.remove
Partner credentialCLIENT-KEY · CLIENT-SECRET Executes at once and answers 200. The body must carry a reference: send the identical request again after a timeout and Cru replays the first outcome instead of acting twice.
Connected appAuthorization: Bearer Answers 202 with a confirmation code and does nothing else. It runs only when the app calls POST /confirmations/{code} within 15 minutes, after the customer agrees.

Writes & confirmations, in full →

Path parameter

REQUIRED
codestringA listed line’s portfolio_id, from GET /offers, GET /portfolio or the offer a write answered with, to act on just that line’s units. A listing’s LISTING- code also works, for the whole listing. URL-encode it as a single path segment.

Request body

APPLICATION/JSON
FIELDDESCRIPTION
referencestring · 1–50 chars · partners: requiredYour idempotency key: letters and digits, then . _ : or - allowed. Required on a partner credential’s write and kept for good, so a retry with it can never act twice. Ignored for connected apps.

Any other field is refused with VALIDATION_UNKNOWN_PARAMETER / 400.

Changed: what a removal answers

A removal now answers with offer, the wine as GET /portfolio gives it after the removal, with only the lines the units taken off sale are on, or null for wine held outside Cru, whose units are deleted. removed and deleted follow as before. lwin18 and holding_ids are gone: offer has the wine’s lwin18, and each line its portfolio_id. The preview is now summary and offer, the wine as GET /offers/{code} gives it with the lines that will come off sale, in place of the summary beside the listing’s own fields.

A DELETE with a body

A partner credential sends {"reference": "…"} as the JSON body. Supplier offers cannot be removed here — they are switched off on the Cru website — and BPO stock cannot be taken off sale.

Remove one line, or a whole listing

Given a listed line’s portfolio_id, only that line’s units come off sale, and the preview’s offer has that line alone. Given a listing’s code, every line of the listing comes off sale.

Back in your portfolio, under another portfolio_id

Wine stored with Cru stays in your portfolio, no longer listed, so the answer’s offer has its line under another portfolio_id than the one you sent, with is_listed false. That line can hold more units than came off sale, when you hold others of the same kind that are not listed. Send its portfolio_id to POST /offers with stock_type cru to list them again. Wine held outside Cru is deleted, so offer is null.

Response fields

200 OK · 202 Accepted

Your portfolio after the removal: the wine as GET /portfolio gives it now, with the lines the units taken off sale are on, or null once they are deleted.

Executed 200

actionstring

The action that ran, such as bid.place.

statusstring

completed.

offerobject | null

The wine as GET /portfolio gives it now, with only the lines the units taken off sale are on: no longer listed, so under another portfolio_id than the one you sent. null for wine held outside Cru, whose units are deleted.

removedinteger

Units taken off sale.

deletedboolean

True when the units were held outside Cru (external), and so left your portfolio.

Staged 202

confirmation.codestring

cnf_ and 43 more characters. A secret: the only handle on the instruction, valid for 15 minutes, once.

confirmation.actionstring

The action staged, such as bid.place.

confirmation.statusstring

pending.

confirmation.expires_atdatetime

RFC 3339 UTC.

confirmation.previewobject

summary, then offer: the wine as GET /offers/{code} gives it, with only the lines that will come off sale. The summary’s price is in the wine’s currency.

Errors

A listing code that is not one of yours, or a listing that has sold or gone, returns OFFER_NOT_FOUND / 404. A supplier offer returns TRADE_REFUSED / 422, with the message “Supplier offers are switched off on the Cru website, not removed here.”, and so does a listing of BPO stock, with “BPO stock cannot be taken off sale through the API.” Units that sell or come off sale before the removal is carried out, as between a connected app’s preview and its confirmation, return TRADE_REFUSED too: nothing was removed. A portfolio_id of a line that is not listed returns TRADE_REFUSED / 422, with the message “This portfolio line is not listed for sale.”, and one that is not yours or is out of date OFFER_NOT_FOUND / 404. Missing or invalid credentials return AUTH_INVALID_CREDENTIALS / 401. A credential without offers:write gets AUTH_INSUFFICIENT_SCOPE / 403. View all error codes →

UP NEXT Retrieve your portfolio

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