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
| Field | Meaning |
|---|---|
quote_id | ULID to bind on POST /orders |
total_sar | All-in price in SAR |
distance_km / duration_minutes | Routing estimates |
expires_at | ISO timestamp — default TTL ~15 minutes |
breakdown | Base 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
| Status | When |
|---|---|
503 | Distance/pricing provider unavailable (distance_unavailable) — retry with backoff |
429 | Per-partner quote cap exceeded — honour Retry-After (Rate limits) |
422 | Invalid coordinates or payload |
401 / 403 | Auth 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).