Add an inbond address
Save an inbond address on your account: an inbond warehouse from GET /warehouses/inbond, and your bond account number there.
It is saved as the Cru website’s address form saves one with “In bond” ticked, at the warehouse’s own address, and is never made your default. A warehouse Cru does not list has to be added by Cru first: suggest it with POST /warehouses/inbond if Cru has granted you warehouses:suggest, or the customer emails [email protected].
How this write runs
inbond_address.add| Partner credentialCLIENT-KEY · CLIENT-SECRET | Executes at once and answers 201. 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 →
Request body
APPLICATION/JSON| FIELD | DESCRIPTION |
|---|---|
| referencestring · 1–50 chars · partners: required | Your 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. |
| inbond_address_idinteger · ≥ 1 · required | A bonded warehouse from GET /warehouses/inbond: not one of the duty-paid ones, whose is_bonded is false. |
| account_numberstring · ≤ 50 chars · required | Your bond account number at that warehouse. |
| site_codestring · ≤ 50 chars · optional | Your site code or sub-account there, if the warehouse uses one. |
| nicknamestring · ≤ 50 chars · optional | Your own name for the address. |
Any other field is refused with VALIDATION_UNKNOWN_PARAMETER / 400.
Response fields
201 Created · 202 AcceptedA partner credential gets 201 and the address saved. A connected app gets 202 and a confirmation.
Executed 201
actionstring
The action that ran, such as bid.place.
statusstring
completed.
inbond_addressobject
The address, as GET /addresses/inbond lists it.
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, inbond_address_id, name, city, country, account_number, site_code and nickname — null when not given.
Errors
An inbond_address_id GET /warehouses/inbond does not list, a duty-paid one, an account_number already saved at that warehouse, or a field over its length returns VALIDATION_INVALID_VALUE / 422. A warehouse whose full address Cru does not have yet — one suggested without its street, city and postcode — is TRADE_REFUSED / 422 when the address is saved, and so is one Cru stopped listing before then, as between a connected app’s preview and its confirmation. Missing or invalid credentials return AUTH_INVALID_CREDENTIALS / 401. A credential without addresses:write gets AUTH_INSUFFICIENT_SCOPE / 403. View all error codes →