Quickstart
This walkthrough uses the UAT base URL https://uat-api.lynq-sa.com/partner. Replace placeholder credentials with keys from Lynq operations.
Prerequisites
- UAT
X-API-KeyandX-Client-ID(request access if needed) - HTTPS endpoint for webhooks (or a tunnel such as ngrok for local dev)
1. Create a quote
curl -X POST 'https://uat-api.lynq-sa.com/partner/quotes' \
-H 'X-API-Key: YOUR_KEY' \
-H 'X-Client-ID: YOUR_CLIENT_ID' \
-H 'Content-Type: application/json' \
-d '{
"pickup": {"lat": 24.7136, "lng": 46.6753, "address": "RRRD2929"},
"dropoff": {"lat": 24.768, "lng": 46.709, "address": "RRRR1234"},
"vehicle_type": "motorcycle"
}'
Save the returned quote_id — quotes expire (default 15 minutes).
2. Submit an order
curl -X POST 'https://uat-api.lynq-sa.com/partner/orders' \
-H 'X-API-Key: YOUR_KEY' \
-H 'X-Client-ID: YOUR_CLIENT_ID' \
-H 'Content-Type: application/json' \
-d '{
"pickup": {
"lat": 24.7136,
"lng": 46.6753,
"short_address": "RRRD2929",
"contact_name": "Ahmed",
"contact_phone": "0594939405"
},
"dropoff": {
"lat": 24.768,
"lng": 46.709,
"short_address": "RRRR1234",
"contact_name": "Saleem",
"contact_phone": "+966595848384"
}
}'
A 202 Accepted response includes the Lynq order ULID. Webhooks such as order.received follow asynchronously.
3. Register a webhook
curl -X POST 'https://uat-api.lynq-sa.com/partner/webhooks' \
-H 'X-API-Key: YOUR_KEY' \
-H 'X-Client-ID: YOUR_CLIENT_ID' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://your-company.example.com/webhooks/lynq",
"description": "UAT listener",
"event_filters": []
}'
Store the one-time secret from the 201 Created response. Send a test delivery with POST /webhooks/\{id\}/test.
4. Verify signatures
Use the Tools page or the snippets in Webhooks to validate X-Lynq-Signature on raw POST bodies.
Next
- Orders guide — fields, idempotency, cancellation
- Webhook events — full event catalog