EgyptLimo

Bookings and lifecycle

Create, read, modify, and cancel a partner booking.

Every write below requires Idempotency-Key and signed headers.

partner_reference must identify one business booking for your API client. Repeating it with a different quote_id returns 409 partner_reference_conflict in both Sandbox and Production; use the original reference only when retrying the same booking intent. Do not silently reuse a reference for a new route or price.

The EgyptLimo Quote is the pricing authority: options[].price includes the base fare and all selected Extras. Use total_price or include=pricing to reconcile the booking; both Live Partner and Local responses normalize the breakdown without double-counting. Booking details must match the selected quote option. If pricing or availability changes before booking, request a fresh quote; do not substitute a partner-calculated amount.

Direct API bookings are not customer checkout payments. EgyptLimo records them as payment_method: invoice and settles completed, unpaid trips through the partner's consolidated trip invoice. payment_method may be omitted or set to invoice; online and cash are rejected. The separate API-usage invoice counts requests and is not the trip-collection statement. Booking Links are the exception: they hand the customer to EgyptLimo's hosted journey and are excluded from direct-booking trip collections.

Create a booking

Request — POST /integration/bookings

{
  "quote_id": "qte_7b6a…",
  "vehicle_class": "Business Sedan",
  "partner_reference": "AGENCY-BOOKING-1001",
  "passenger": {
    "name": "Ahmed Ali",
    "phone": "+201000000000",
    "email": "ahmed@example.com",
    "preferred_contact_method": "whatsapp",
    "name_on_sign": "Mr Ahmed Ali"
  },
  "payment_method": "invoice",
  "flight_number": "MS777",
  "special_requests": "Meet at arrival hall Gate 3",
  "extras": [{ "id": "tex_from_extras_catalog", "quantity": 1 }]
}

201 Created response

{
  "booking_id": "pbk_92af…",
  "booking_reference": "BK-00000123",
  "partner_reference": "AGENCY-BOOKING-1001",
  "status": "pending",
  "currency": "USD",
  "total_price": "55.00",
  "payment_method": "invoice",
  "settlement": { "type": "partner_consolidated_invoice", "collection": "partner", "pay_at_checkout": false },
  "cash_collection": { "required": false },
  "pickup_datetime": "2026-11-10 14:30:00",
  "created_at": "2026-10-03T10:00:00.000000Z",
  "updated_at": "2026-10-03T10:00:00.000000Z",
  "guide": { "has_guide": false, "required": false, "guide_id": null, "fee": null, "currency": null },
  "tourism_pricing": null
}

Read one booking

Request — GET /integration/bookings/pbk_92af…?include=details,route,passenger,vehicle,pricing

200 OK response

{
  "booking_id": "pbk_92af…",
  "booking_reference": "BK-00000123",
  "partner_reference": "AGENCY-BOOKING-1001",
  "status": "confirmed",
  "currency": "USD",
  "total_price": "55.00",
  "payment_method": "invoice",
  "settlement": { "type": "partner_consolidated_invoice", "collection": "partner", "pay_at_checkout": false },
  "pickup_datetime": "2026-11-10 14:30:00",
  "service_type": "Flat-Rate",
  "payment_status": "unpaid",
  "approval_status": "approved",
  "route": { "pickup": { "name": "Cairo International Airport", "formatted_address": "Cairo International Airport" }, "dropoff": { "name": "Giza Pyramids", "formatted_address": "Giza Pyramids" }, "pickup_datetime": "2026-11-10 14:30:00", "distance_km": "35.50", "estimated_duration_mins": 60, "service_type": "Flat-Rate", "trip_type": "one_way" },
  "passenger": { "name": "Ahmed Ali", "phone": "+201000000000", "email": "ahmed@example.com", "company": "", "preferred_contact_method": "whatsapp", "name_on_sign": "Mr Ahmed Ali" },
  "vehicle": { "vehicle_class": "Business Sedan", "vehicle_name": "Business Sedan", "assigned_vehicle_name": "", "assigned_vehicle_plate": "", "driver_name": "", "driver_phone": "" },
  "pricing": { "currency": "USD", "base_fare": "45.00", "extras_total": "10.00", "discount_amount": "0.00", "commission_amount": "0.00", "tax_amount": "0.00", "total_price": "55.00" }
}

List bookings

Request — GET /integration/bookings?status=confirmed&limit=25&cursor=<opaque-next_cursor>

200 OK response

{ "items": [{ "booking_id": "pbk_92af…", "partner_reference": "AGENCY-BOOKING-1001", "status": "confirmed", "currency": "USD", "total_price": "45.00" }], "count": 1, "limit": 25, "next_cursor": null }

Use the opaque next_cursor returned by the previous page without decoding it. Cursors are scoped to the API client and environment; numeric database IDs are rejected.

Current status

Request — GET /integration/bookings/pbk_92af…/status

200 OK response

{ "booking_id": "pbk_92af…", "status": "confirmed", "payment_status": "paid", "approval_status": "approved", "driver_assignment_status": "assigned", "pickup_datetime": "2026-11-10 14:30:00", "latest_event": "booking.confirmed", "updated_at": "2026-10-03 10:00:00" }

Request a change

Request — PATCH /integration/bookings/pbk_92af…

{ "pickup_datetime": "2026-11-10T16:00:00Z", "flight_number": "MS779", "special_requests": "Meet at Gate 2", "reason": "Flight rescheduled" }

202 Accepted response

{ "booking_id": "pbk_92af…", "change_request_id": "bcr_opaque_client_scoped_id", "change_status": "pending_review", "requested_changes": { "flight_number": "MS779" }, "tracking": { "status_endpoint": "/api/v1/integration/bookings/pbk_92af…/status", "events_endpoint": "/api/v1/integration/bookings/pbk_92af…/events" } }

Live changes require review; the bcr_... identifier is opaque and scoped to your API client. Sandbox applies an eligible change immediately and returns 200 with change_status: "applied". A cancelled or completed booking returns 409 booking_not_editable.

Preview then cancel

Request — POST /integration/bookings/pbk_92af…/cancellation-quote

200 OK response

{ "booking_id": "pbk_92af…", "total_amount": 55, "refund_amount": 55, "cancellation_fee": 0, "refund_percent": 100, "hours_until_pickup": 48, "currency": "USD", "policy_version": "cpv_12", "valid_until": "2026-10-03T10:05:00.000000Z" }

policy_version identifies the rule set active when this preview was calculated. The preview uses the all-inclusive booking amount, including quoted Local Extras. Admins publish new versions from Admin → Integration Monitor → Integration cancellation policy. The quote is advisory: POST /cancel changes booking state but does not itself execute a payment refund or collect the cancellation fee.

Request — POST /integration/bookings/pbk_92af…/cancel

{ "reason_code": "flight_cancelled" }

200 OK response

The response is the booking object with status: "cancelled".

Expected errors

422 invalid_quote for a quote that is expired/not owned; 422 invalid_vehicle_class for an option not returned by the quote; 404 not_found for an unknown booking; 409 invalid_booking_state for an unavailable cancellation or invalid state transition.

On this page