/api/v1/mystery/redemption/quote cards:redeem A pre-checkout shipping quote for redeeming an item physically. Validates the address and returns the cheapest live rate. Supply purchase_id OR token_id. Creates nothing, so it’s safe to call just to show shipping cost before the user commits.
POST /api/v1/mystery/redemption/quote write These inputs are shared across all docs pages, so an id entered here carries over.
{
"shipping_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/mystery/redemption/quote' \
-H 'X-API-Key: rip_…' \
-H 'Content-Type: application/json' \
-d '{"shipping_address":{"name":"Demo Buyer","street1":"1 Market St","city":"San Francisco","state":"CA","zip":"94105","country":"US"}}' | Field | Type | Required | Description |
|---|---|---|---|
purchase_id | number | — | The fulfilled purchase holding the item (supply this OR token_id) |
token_id | string | — | On-chain token id (supply this OR purchase_id; also disambiguates a multi-item purchase) |
item_type | string | — | "CARD" | "GRADED_CARD" | "PACKET" | "SEALED_PRODUCT", to disambiguate a token number that exists as more than one asset (raw Card #N vs GradedCard slab #N) |
shipping_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` `invalid_address` |
shipping_address.street1 | string | yes | Street line 1 (`street2` optional, for a unit, floor or c/o line). Outside the US the label carries both lines exactly as you send them. A `#` is fine: `#12-345` |
shipping_address.city | string | yes | City |
shipping_address.state | string | — | State / region |
shipping_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" |
shipping_address.country | string | yes | Two-letter ISO country code, e.g. `US`, `GB`, `SG` (`phone`, `email` optional). Send the code, not a name: the blank-postcode rule only applies to a code |
data)| Field | Description |
|---|---|
shipping_quote.amount_usdc | Quoted shipping cost (USD decimal string) |
shipping_quote.carrier / service / service_token | Cheapest live Shippo rate: provider, service name, and Shippo servicelevel token (the token the warehouse exact-matches when buying the fresh label) |
shipping_quote.estimated_days | Carrier transit estimate |
shipping_quote.rate_id / quoted_at | Shippo rate object id + quote timestamp |
| Status | Code | When |
|---|---|---|
| 400 | purchase_or_token_required | neither purchase_id nor token_id supplied |
| 400 | missing_shipping_address | shipping_address omitted or incomplete |
| 400 | invalid_address | the address could not be verified; the message carries the reasons. Outside the US we check the address and ship it as typed, so nothing is corrected for you. For a destination in AU, CA, DE, FR, IE, JP, NL or SG a postcode that does not match the street is refused, and the message names the postcode on record |
| 404 | token_not_found | token-first: no CardOS item for that token |
| 409 | ambiguous_token | the token number is both a raw and a graded card, so pass item_type |
| 409 | item_type_mismatch | item_type contradicts what the token actually is |
| 409 | not_fulfilled | purchase has not revealed yet |
See Errors for the response envelope and the full code list.