Parcel (FedEx)
Quote every FedEx service for a US lane, then book one by quote_id. Two calls: POST /api/v1/parcel/options and POST /api/v1/parcel/book. Both need an API key from /agents/account; a wak_test_ key returns sandbox rates and sandbox bookings, with nothing charged.
1. Quote
- origin_zip, destination_zip -- 5-digit US ZIPs
- pickup_date -- YYYY-MM-DD, today through 10 days out. FedEx rejects later ship dates.
- packages -- one entry per group of identical packages: quantity, length_in, width_in, height_in, and weight_lbs for ONE package
Every option FedEx returns comes back, cheapest first. Each service level appears once per pickup type: fedex_pickup (FedEx collects at the pickup address) and dropoff (the package is taken to a FedEx location). transit_days is published for Ground; Express services give estimated_delivery_date instead.
Package limits
- Up to 150 lb per package
- Longest side up to 108 in; length + girth up to 165 in
- A package over a limit returns 400 PARCEL_QUOTE_REJECTED with FedEx's reason. Split it into more packages, or quote the load as LTL.
2. Book
- quote_id -- from the options response, before expires_at. Each quote_id books once.
- patch.pickup, patch.delivery -- zipCode, city, state, street, contactName, and phone (FedEx requires a phone on both stops). Optional: company, street2, email, specialInstruction, refNum. ZIPs must match the quote. patch.pickup can be omitted when the account has a saved default shipper.
- pickup_window, delivery_window -- optional, local HH:MM. Default 09:00-17:00.
- reference -- optional, searchable later
You don't resend the packages: the booking uses exactly what you quoted.
Payment and retries
Same as POST /api/v1/book: accounts on invoiced terms are billed on terms; every other account pays from its Warp balance, with the saved card covering only the shortfall. No card on file returns 402 with a checkout_url. Re-sending a booked quote_id returns the original confirmation, never a second charge; a concurrent duplicate gets 409 BOOKING_IN_PROGRESS.
3. Track and label
The booking response confirms the Warp order. FedEx creates the label and its tracking number within seconds after. Follow the shipment with GET /api/v1/track?booking_id= and fetch the label from GET /api/v1/documents?order_id=.