Skip to main content

Quotes

POST /quotes returns a priced delivery quote using Google routing distance and your Lynq rate card. Quotes are synchronous and should be called once per checkout before presenting delivery fees or submitting an order.

For map/ETA polling without price, use Drive time (ETA) instead — it does not count against quote rate limits.

Request​

Required: pickup and dropoff objects with lat and lng. Optional address strings improve audit trails. Optional vehicle_type (e.g. motorcycle, car) selects rate-card tiers when configured.

{
"pickup": {"lat": 24.7136, "lng": 46.6753, "address": "RRRD2929"},
"dropoff": {"lat": 24.768, "lng": 46.709, "address": "RRRR1234"},
"vehicle_type": "motorcycle"
}

Response​

FieldMeaning
quote_idULID to bind on POST /orders
total_sarAll-in price in SAR
distance_km / duration_minutesRouting estimates
expires_atISO timestamp — default TTL ~15 minutes
breakdownBase fee, included km, extra km charges

Binding quotes on orders​

Pass quote_id when creating an order to lock the quoted fee. Omitting quote_id (or passing null) prices live at intake time — the fee must match quote inputs if you previously quoted the same route.

Errors​

StatusWhen
503Distance/pricing provider unavailable (distance_unavailable) — retry with backoff
429Per-partner quote cap exceeded — honour Retry-After (Rate limits)
422Invalid coordinates or payload
401 / 403Auth or IP allowlist failure

Quote once per checkout and bind quote_id on POST /orders. Do not use quotes for high-frequency ETA polling.

Webhook​

A successful quote may emit quote.created if you subscribe to quote events (optional — most partners rely on the synchronous HTTP response).