Calculate shipping costs with the FRED API
Display shipping costs for the object and its destination.
Published by FRED
FRED arranges shipping and calculates its cost for each quote. The manufacturer declares production costs; it does not enter shipping costs in its price list. The origin is the workshop manufacturing the object, not your store's address.
You already know the destination
Send the country and postal code when requesting a quote. Each option directly includes
price.shipping_cents, price.total_cents and transit_hours. You can display
a “Shipping” line in your cart without requesting a second calculation.
The destination is provided later
After a quote without a postal code, or if your customer changes address:
curl https://api.fredpod.com/v1/storefront/quotes/est_abc123/shipping \
-H "X-API-Key: $FRED_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: livraison-panier-1042-v2" \
-d '{"country":"FR","postal_code":"34000"}'The response is a new quote, with its own id and shipping costs for
each manufacturer. Keep this new ID for ordering. The previous
price is not changed. If the response is 202, wait for the result at poll_url.
What the price covers
New rates cover standard home delivery. The calculation uses the object's estimated weight, an allowance for packaging and the permitted parcel size envelope. The workshop then enters the measured weight and dimensions before creating the label.
This version does not offer parcel collection points or express service selection. Previously agreed historical terms retain their recorded prices.
Without a complete origin address, a valid destination or an available service,
shipping is unavailable. Display it accordingly: null is not a
zero-euro price. No order should be placed with an unknown delivered total.
Your application receives parcel tracking through shipment webhooks. FRED and the workshop handle labels and handover to the carrier.