Booking lifecycle
Partner bookings start as requested. Your staff (or your API) approve, reject, cancel, board, or mark no-show. Auto-approve is not implied.
Create by phone
POST /bookings finds an existing passenger by phone or creates one (using fullName when provided). The booking source is partner_api. The trip must belong to the authenticated company.
Create
curl -X POST https://safraway.com/api/partner/v1/bookings \
-H "Authorization: Bearer sk_live_…" \
-H "Idempotency-Key: crm-order-991" \
-H "Content-Type: application/json" \
-d '{"tripId":"…","seats":1,"phone":"+963944000000","fullName":"Maha N."}'
Status flow
- requested — waiting for the company.
- PATCH { status: approved | rejected | cancelled }.
- POST …/boarded when the passenger boards.
- POST …/no-show if they miss the departure.
Tickets
GET /bookings/{id}/ticket returns the company-view ticket payload (QR / boarding details) for printing at the desk.