Skip to main content

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

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
422Invalid coordinates or payload
401 / 403Auth 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).