Connect API guide
A tenant-scoped flight API for search, commercial price confirmation, and safe order creation. Supplier credentials, identifiers, source prices, and internal pricing rules are never exposed.
Quick start
Ask your AviaFrame manager for a sandbox key beginning with af_test_. Keep it on your server; never embed it in a browser or mobile application.
| Environment | Base URL |
|---|---|
| Sandbox | https://sandbox-api.aviaframe.com/partner/v1 |
| Production | https://api.aviaframe.com/partner/v1 |
Authentication and headers
Authorization: Bearer af_test_REPLACE_ME Content-Type: application/json X-Correlation-ID: 12d6064d-0a21-4471-b521-c47f7b85cb22
Order creation also requires an Idempotency-Key containing 8–255 safe characters. Reusing a key with the identical body replays the original response. Reusing it with another body returns IDEMPOTENCY_CONFLICT.
1. Search offers
/offers/search{
"slices": [{ "origin": "RUH", "destination": "DXB", "departure_date": "2026-10-10" }],
"passengers": [{ "type": "ADT" }],
"cabin_class": "economy"
}The response contains opaque offer_id and price_quote_id values. price.total is your agreed AviaFrame commercial price as a decimal string.
2. Confirm price
/offers/{offer_id}/price{ "passengers": [{ "type": "ADT" }] }Use the newest returned price_quote_id and honor valid_until. A quote is an immutable commercial snapshot and can create only one order.
3. Create order
/ordersIdempotency-Key: 30d9fa55-89e8-4f54-bb22-6ec189790195
{
"price_quote_id": "quote_test_REPLACE_ME",
"client_order_ref": "WEB-2026-000184",
"expected_total": { "total": "418.00", "currency": "USD" },
"contact": { "email": "traveler@example.com", "phone": "+966500000000" },
"passengers": [{
"type": "ADT", "title": "Mr", "gender": "M",
"first_name": "Omar", "last_name": "Saleh", "date_of_birth": "1990-04-12",
"document": {
"type": "REGULAR_PASSPORT", "number": "P1234567",
"issuing_country": "SA", "citizenship": "SA", "expiration_date": "2030-04-11"
}
}]
}expected_total must match the confirmed quote exactly. Client-supplied supplier IDs or price components are not accepted.
order_id. Poll the order using the same ID.4. Retrieve order
/orders/{order_id}{
"order_id": "ord_test_Q7gDLs4d2wF5nAt8KpG3xA",
"client_order_ref": "WEB-2026-000184",
"status": "CREATED",
"price_quote_id": "quote_test_2ArW5jCT2bJpG1lUDBkw-w",
"price": { "total": "418.00", "currency": "USD" },
"booking_reference": "L8Q2TR",
"payment_deadline": "2026-09-05T16:00:00Z",
"created_at": "2026-09-05T15:04:00Z"
}
Errors and retries
{
"code": "PRICE_MISMATCH",
"message": "expected_total does not match the confirmed AviaFrame quote",
"details": [],
"correlation_id": "599a7735-223d-4aa0-91a6-a5b40c280614"
}| Status | What to do |
|---|---|
| 400 / 403 / 404 / 410 | Correct the request, permission, or expired resource. Do not retry unchanged. |
| 409 | Resolve the price, passenger, quote, or idempotency conflict. |
| 429 | Honor Retry-After and retry with exponential backoff and jitter. |
| 5xx | Retry safe reads. For order creation, always reuse the same idempotency key. |
Support
Include the response correlation_id and your client_order_ref when contacting tech@aviaframe.com. Do not email full API keys or passenger documents.