/api/v1/orders/:order_id/address write:order Changes where a committed (PENDING) order ships, before the warehouse packs it. The new address is checked the same way as on POST /shipping-quote, and must be in the same country as the current one: an order for another country is a new order: hold this one, cancel it, and quote the cards again. The order keeps its carrier, its service and the shipping you were billed; if the new address costs more or less to ship to, that difference is ours. What happens to the label depends on the order. With no label yet, the order simply points at the new address, after we check that its service delivers there, and its label is bought for that address. An order that already has a label (the warehouse buys it before packing, once the order’s cards are picked) gets a new label for the new address in the same call: a new shippo_tracking_number, the old number in previous_tracking_numbers, an order.tracking_updated event on your activity log, and a refund requested for the old label. A packed order (READY_TO_SHIP or COMPLETED with a label) cannot be changed here, because someone has to find the box and relabel it: contact us. A parcel the carrier has scanned can only be redirected with the carrier. The path takes the integer order_id or the order’s reference. Sending the address the order already ships to changes nothing and returns 200.
Every refusal changes nothing: the order keeps its address and its label.
POST /api/v1/orders/0/address write These inputs are shared across all docs pages, so an id entered here carries over.
{
"address": {
"name": "Demo Buyer",
"street1": "1 Market St",
"city": "San Francisco",
"state": "CA",
"zip": "94105",
"country": "US"
}
}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/0/address' \
-H 'X-API-Key: rip_…' \
-H 'Content-Type: application/json' \
-d '{"address":{"name":"Demo Buyer","street1":"1 Market St","city":"San Francisco","state":"CA","zip":"94105","country":"US"}}' | Field | Type | Required | Description |
|---|---|---|---|
address.name | string | yes | Recipient full name, as it should print on the label. It must contain at least one letter or digit: a name of only emoji or symbols is refused with `400`, because no carrier can print it |
address.street1 | string | yes | Street line 1, at most 100 characters (`street2` optional, for a unit, floor or c/o line). Outside the US the label carries both lines exactly as you send them, so send them the way the address is written locally. A `#` is fine: `#12-345` |
address.city | string | yes | City |
address.state | string | — | State / region. Required for US, CA, AU, IE, VN and every country not listed here. May be blank or left out for: AD, AE, AG, AI, AL, AM, AO, AS, AT, AW, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BW, BZ, CD, CF, CG, CH, CK, CL, CM, CN, CO, CR, CV, CW, CY, CZ, DE, DJ, DK, DM, DZ, EE, EG, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GT, GU, GW, GY, HK, HN, HR, HT, HU, ID, IL, IN, IQ, IS, IT, JE, JM, JO, JP, KE, KG, KI, KM, KN, KR, KZ, LA, LC, LI, LK, LR, LS, LU, LV, LY, MA, MC, MD, ME, MH, MK, ML, MM, MN, MO, MQ, MS, MT, MW, MX, MY, MZ, NA, NC, NE, NI, NL, NO, NP, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PR, PT, PW, PY, QA, RE, RO, RS, RW, SA, SB, SD, SE, SG, SH, SI, SK, SL, SM, SN, SO, SR, SV, SX, SZ, TC, TD, TG, TH, TJ, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UY, UZ, VA, VC, VG, VI, VU, WS, YT, ZA, ZM. Don't send a placeholder such as "N/A". The rule reads the two-letter country code, so a country sent as a name ("Singapore", "UK") still needs a state. A US military address (APO, FPO, DPO) uses `AA`, `AE` or `AP` with country `US`: it is quoted like any US address, and we add the customs declaration USPS asks for |
address.zip | string | — | Postal code. Required everywhere except the countries that have none: AE, AG, AO, AW, BF, BH, BI, BJ, BO, BQ, BS, BW, BZ, CD, CF, CG, CK, CM, CW, DJ, DM, ER, FJ, GA, GH, GM, GN, GQ, GY, HK, JM, KI, KM, KN, LR, LY, ML, MO, MW, NA, NE, NI, NU, PA, PY, QA, RW, SB, SL, SO, SR, SX, TD, TG, TL, TO, TT, TV, UG, VU, WS. Leave it blank or out for those and we fill in what the carriers need. Don't send a placeholder such as "N/A". Singapore is not one of them: send its 6-digit postcode |
address.country | string | yes | Two-letter ISO country code, e.g. `US`, `GB`, `SG` (`email`, `company` optional). Send the code, not a name: the blank-state and blank-postcode rules above only apply to a code |
address.phone | string | — | Recipient phone. REQUIRED for any non-US destination — carriers will not issue an international label without one. Any national ("0439 927 773") or international ("+61 439 927 773") format is accepted; we normalise it to E.164 for the destination country. Optional for US addresses |
data)| Field | Description |
|---|---|
data | The order after the change, same shape as GET /orders/:order_id. shippo_address_id is the new address |
address_change.changed | false when the address sent is the one the order already ships to |
address_change.label | "none": no label yet; it will be bought for the new address. "replaced": a new label was bought now; data.shippo_tracking_number is its number. "relabel": the warehouse packed the order while the change ran; a new label was bought, the old one is not refunded yet, and we put the new label on the parcel |
address_change.previous_tracking_number | The tracking number of the replaced label, or null |
address_change.previous_label_refund | "requested", "not_refundable", "failed" (we retry it), or null when no label was replaced |
| Status | Code | When |
|---|---|---|
| 403 | Insufficient permissions | key is tenant-scoped but carries neither write:order nor admin |
| 400 | INVALID_ADDRESS | a required address field is missing, street1 is over 100 characters, or Shippo could not verify the address — messages[] carries Shippo’s reasons |
| 400 | PHONE_REQUIRED | the address is outside the US and has no phone |
| 404 | order not found | order not part of your account |
| 409 | ORDER_NOT_COMMITTED | the order is still a quote (PENDING_PAYMENT): quote again with the new address |
| 409 | ORDER_PACKED | the order is packed with its label (READY_TO_SHIP or COMPLETED): contact us to relabel it |
| 409 | ALREADY_WITH_CARRIER | the carrier has scanned the parcel |
| 409 | ORDER_CLOSED | the order is CANCELLED, RETURNED, or COMPLETED without a label |
| 409 | ORDER_SPLIT | the order ships as more than one parcel |
| 409 | ORDER_ON_HOLD | the order is on hold: release it first |
| 409 | NO_SHIPPING_ADDRESS | the order has no shipping address on file (one the warehouse ships without a Rip label): contact us |
| 409 | COUNTRY_UNKNOWN | the country the order ships to could not be read: contact us |
| 409 | LABEL_PURCHASE_IN_FLIGHT / LABEL_PURCHASE_UNSETTLED / ORDER_CHANGED | the warehouse is buying the order’s label right now, or the order changed while the address was saved. retryable is true: try again in a minute |
| 422 | COUNTRY_CHANGE | the new address is in another country |
| 422 | SERVICE_UNAVAILABLE | the carrier service on the order does not deliver to the new address |
| 502 | SHIPPO_ERROR | Shippo could not be reached; retryable. Nothing was changed |
See Errors for the response envelope and the full code list.