File Booking API
Atomically book a group of individually quoted transfers under one File Reference.
File Booking groups 1–50 standard transfer bookings. EgyptLimo issues a globally unique file_id (pfl_...) for each group. You may optionally send a human-readable file_reference for your own records; if omitted, the issued file_id is also used as the reference. The label is unique within your partner company and environment, not across all companies. Two companies can use the same label without sharing or overwriting data. It requires the partner's api and file entitlements, a bearer token, signed merchant headers, bookings:create, and an Idempotency-Key. Append the endpoint to your environment's /api/v1 base URL.
First create a separate, all-inclusive EgyptLimo quote for each transfer with POST /integration/quotes. Use one valid quote ID and the exact quoted vehicle class per row. Trip ftq_ quotes are not accepted in this batch; book those through Trip API, where file_reference is optional.
POST /integration/file-bookings
Content-Type: application/json
Authorization: Bearer <access_token>
X-Merchant-Id: <merchant_id>
X-Key-Id: <key_id>
X-Timestamp: <UTC ISO-8601 timestamp>
X-Nonce: <unique nonce>
X-Signature: <HMAC signature>
Idempotency-Key: <unique key for this file>{
"file_reference": "CORP-NOV-2026-01",
"bookings": [
{
"quote_id": "qte_first_quote_id",
"vehicle_class": "Business Sedan",
"partner_reference": "CORP-NOV-001",
"passenger": {"name": "Guest One", "phone": "+201000000001", "email": "one@example.com"}
},
{
"quote_id": "qte_second_quote_id",
"vehicle_class": "Van",
"partner_reference": "CORP-NOV-002",
"passenger": {"name": "Guest Two", "phone": "+201000000002"}
}
]
}Illustrative 201 response:
{
"file_id": "pfl_example123",
"file_reference": "CORP-NOV-2026-01",
"environment": "sandbox",
"status": "created",
"count": 2,
"totals_by_currency": {"USD": 175},
"bookings": [
{"booking_id": "sbk_first", "partner_reference": "CORP-NOV-001", "quote_id": "qte_first_quote_id", "currency": "USD", "total_price": "80.00"},
{"booking_id": "sbk_second", "partner_reference": "CORP-NOV-002", "quote_id": "qte_second_quote_id", "currency": "USD", "total_price": "95.00"}
],
"payment_method": "invoice",
"settlement": {"type": "partner_consolidated_invoice", "collection": "partner", "simulation_only": true}
}Every quote must be unexpired, owned by the same API client, and marked as completely priced by EgyptLimo. Quote IDs and partner references must be unique within the file. The selected vehicle must exist in its quote. If validation or creation of any row fails, the whole database transaction rolls back. Use the same Idempotency-Key when retrying the identical file; use a new one for a changed request. Reusing a file_reference for the same company in the same environment returns 409 file_reference_conflict; another company may use it independently. totals_by_currency keeps currencies separate rather than adding unlike amounts. Webhook delivery is deferred until the transaction commits.
Sandbox returns sbk_ booking IDs and never creates live trips; live returns pbk_ IDs and records the File Reference on each transfer. GET /integration/file-bookings/{file_id} returns only a group owned by the same API client and requires bookings:read. Read or cancel each returned booking through the standard booking endpoints. As with other direct API bookings, collection is consolidated on the partner invoice, not charged to the passenger at checkout.