/api/v1/orders write:order Fulfillment, step 2. Commits a PENDING_PAYMENT order (from POST /shipping-quote) to one of its quoted rate_ids: the order moves to PENDING and is queued for pick-pack, its ship-by date and order number are assigned, and you are billed exactly what that rate quoted. Since 2026-10-26 this call does not buy the shipping label: the warehouse buys it, against the rate you committed, at the moment it packs the parcel (carrier label links expire four days after purchase, and labels bought at pack time can be manifested for pickup the same day). So the response carries no tracking number, and the call no longer contacts the carrier: it answers in well under a second. The tracking number arrives when the parcel ships, as an order.shipped event in GET /inventory/events and on GET /orders/:order_id. Retrying is always safe: every failure mode leaves the order in PENDING_PAYMENT with nothing committed, and card preparation is all-or-nothing. Returns 201.
POST /api/v1/orders money These inputs are shared across all docs pages, so an id entered here carries over.
{
"order_id": 0,
"rate_id": ""
}Not run yet. Press Run to make a live call against https://service.rip.fun (through this demo's server-side proxy; the API key never reaches the browser).
curl -X POST 'https://service.rip.fun/api/v1/orders' \
-H 'X-API-Key: rip_…' \
-H 'Content-Type: application/json' \
-d '{"order_id":0,"rate_id":""}' | Field | Type | Required | Description |
|---|---|---|---|
order_id | number | yes | The PENDING_PAYMENT order id from /shipping-quote |
rate_id | string | yes | A rate_id from that order's quoted rates[] |
external_reference | string | — | Your own id for this order, 1–128 printable characters after trimming. Sets it, or replaces the one you sent with the quote; leave it out to keep the quote’s. Use it when your order id only exists once the customer checks out |
data)| Field | Description |
|---|---|
order_id / status | The committed order + its new status ("PENDING") |
external_reference | Your id for the order: the one sent here, else the quote’s; null if neither |
reference | The order’s human-readable number, assigned by this commit: its ship-by day as MMDDYY, then the shared sequence — e.g. 101326AA0042 for an order due out by October 13, 2026. It does not change after this. A quote referenced before 2026-10-07 keeps the random code it was given (KPTX4821) |
unique_ids / ship_by_at | Cards on the order + target ship date, set by this commit: five business days from now, noon cutoff |
shippo_rate_id / shippo_address_id / shippo_shipment_id | The committed (quoted) rate + shipment objects |
shippo_tracking_number / shippo_tracking_url / shippo_label_url / label_purchased_at | All null here: the label is bought when the warehouse packs the parcel. Read them from GET /orders/:order_id, or take the tracking number from the order.shipped event |
previous_tracking_numbers | string[] — tracking numbers of labels this order was moved off, oldest first; empty unless we re-labelled it. Those labels will never move — see order.tracking_updated in the events feed |
tracking_status / tracking_status_at | Latest carrier status of the current label (PRE_TRANSIT | TRANSIT | DELIVERED | RETURNED | FAILURE) and when the carrier recorded it; null until first checked (every 2 hours). A carrier RETURNED is the parcel on its way back to us; the order’s own status turns RETURNED only once the warehouse receives it and reinstates its cards |
returned_at / return | null on a fresh commit. Set if the carrier sends the package back and the warehouse scans its cards back into your inventory — the order is RETURNED then. Same shape as on GET /orders/:order_id |
| Status | Code | When |
|---|---|---|
| 403 | Insufficient permissions | key is tenant-scoped but carries neither write:order nor admin — a read-only key can list and fetch orders but not open, commit or cancel one |
| 400 | invalid input | order_id or rate_id missing/invalid |
| 400 | Invalid request body | external_reference is not a string, is empty or longer than 128 characters after trimming, or contains control or invisible characters (the error says which). Nothing was committed |
| 404 | order not found | order not part of your account |
| 409 | already submitted | order is not PENDING_PAYMENT (already committed) — carries data: {order_id, status, unique_ids} |
| 409 | Order is no longer awaiting payment | a concurrent POST /shipping-quote for the same cards superseded this order while it was being committed. Nothing was committed or bought; quote again |
| 409 | LABEL_FAILED_REPEATEDLY / SHIPPO_REJECTED / RATE_UNAVAILABLE / … | only an order quoted before 2026-10-26 whose label purchase already failed for good then (GET /orders/:order_id says action_required: "requote"). retryable: false, with the last failure in data.last_label_failure. Committing it would only move the same failure to the warehouse; quote the cards again |
| 400 | card not preparable | a card’s status changed after you quoted — the order is untouched; re-quote (or poll GET /cards) if the card is no longer available |
See Errors for the response envelope and the full code list.