Quotes
POST /quotes returns a priced delivery quote using routing distance and your Lynq rate card. Quotes are synchronous and should be called before presenting delivery fees to customers or before order submission.
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 |
422 | Invalid coordinates or payload |
401 / 403 | Auth or IP allowlist failure |
Webhook
A successful quote may emit quote.created if you subscribe to quote events (optional — most partners rely on the synchronous HTTP response).