Shipping quote

POST /api/v1/mystery/redemption/quote cards:redeem

Pre-checkout shipping quote for redeeming a revealed item physically. Validates the address with Shippo and returns the cheapest live rate. Creates NO rows — safe to call to show shipping cost before the user commits.

Try it POST /api/v1/mystery/redemption/quote write

These inputs are shared across all docs pages — an id entered here carries over.

request body
object · 2 keys
{
  "purchase_id": 0,
  "shipping_address": {
    "name": "Demo Buyer",
    "street1": "1 Market St",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94105",
    "country": "US"
  }
}
response

Not run yet — press Run to make a live call against https://staging-service.rip.fun (through this demo's server-side proxy; the API key never reaches the browser).

curl (tracks the inputs above)
curl -X POST 'https://staging-service.rip.fun/api/v1/mystery/redemption/quote' \
  -H 'X-API-Key: rip_v1_…' \
  -H 'Content-Type: application/json' \
  -d '{"purchase_id":0,"shipping_address":{"name":"Demo Buyer","street1":"1 Market St","city":"San Francisco","state":"CA","zip":"94105","country":"US"}}'

Request fields

FieldTypeRequiredDescription
purchase_idnumberyesThe fulfilled purchase holding the item
token_idstringRequired when the purchase revealed multiple items
shipping_address.namestringyesRecipient full name
shipping_address.street1stringyesStreet line 1 (`street2` optional)
shipping_address.citystringyesCity
shipping_address.statestringState / region
shipping_address.zipstringyesPostal code
shipping_address.countrystringyesISO country code, e.g. `US` (`phone`, `email` optional)

Response fields (data)

FieldDescription
shipping_quote.amount_usdcQuoted shipping cost (USD decimal string)
shipping_quote.carrier / serviceCheapest live Shippo rate, e.g. USPS Ground Advantage
shipping_quote.estimated_daysCarrier transit estimate
shipping_quote.rate_id / quoted_atShippo rate object id + quote timestamp

Errors

StatusCodeWhen
400missing_shipping_addressshipping_address omitted or incomplete
400invalid_addressShippo cannot validate the address
400token_requiredmulti-item purchase without token_id
409not_fulfilledpurchase has not revealed yet

See Errors for the response envelope and the full code list.