Airport Transfer API
Reference
Price, booking, driver tracking, changes and cancellation of an airport transfer with a single key.
Airport transfer API overview and access
Airport Transfer API — one key
For new integrations: price, booking, retrieval, changes and cancellation of an airport transfer with the same key.
| Environment | Base address | Key |
|---|---|---|
| Sandbox | https://sandbox-api.cgmobility.co.uk | sk_test_… |
| Production | https://api.cgmobility.co.uk | sk_prod_… |
Send the key in the x-api-key header, from your server only: never from a web page or mobile app.
TEST- and the answer contains "sandbox": true: no driver is sent, nothing is charged and no e-mail is sent.Get a price
/api/v1/price-quote{
"pickup_location": "Marrakech Menara Airport",
"dropoff_location": "Marrakech Medina",
"pickup_date": "2026-12-15",
"pickup_time": "10:00",
"passengers": 2,
"pickup_latitude": 31.6069,
"pickup_longitude": -8.0363,
"dropoff_latitude": 31.6295,
"dropoff_longitude": -7.9811,
"vehicle_type": "standard"
}
{
"success": true,
"quotation_id": "496751291354649762",
"trip": {
"distance_km": 6,
"duration_minutes": 15
},
"vehicles": [
{
"category": "standard",
"price": 9.42,
"currency": "EUR",
"capacity": {
"passengers": 4,
"baggage": 3
}
}
]
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| pickup_location | string | Yes | Pickup place (name of the place). |
| dropoff_location | string | Yes | Destination place (name of the place). |
| pickup_date | string | Yes | Pickup date, format YYYY-MM-DD. |
| pickup_time | string | Yes | Pickup time, format HH:MM. |
| passengers | integer | No | Number of passengers (1 by default). |
| pickup_latitude | number | No | Pickup latitude, in decimal degrees. Send it with pickup_longitude. |
| pickup_longitude | number | No | Pickup longitude, in decimal degrees. Send it with pickup_latitude. |
| dropoff_latitude | number | No | Drop-off latitude, in decimal degrees. Send it with dropoff_longitude. |
| dropoff_longitude | number | No | Drop-off longitude, in decimal degrees. Send it with dropoff_latitude. |
| vehicle_type | string | No | One category (standard, executif, monospace, monospace_executif, grand_monospace, minibus, luxury, electric_standard or electric_luxury) to receive only that one. Without it, every available category is returned. An unknown value is refused with 400 VALIDATION_ERROR. |
When both points have a valid coordinate pair, the price is computed from the coordinates and the names are kept as labels. An incomplete pair (only one of the two values) or an out-of-range pair is ignored: the name is used and no error is returned. If the requested category exists but is not available for that trip and time, vehicles is empty. The quote can then be booked with the same vehicle_type.
Keep quotation_id as a string. Only the returned categories can be booked (for example standard, executif, monospace, minibus, luxury). An empty vehicles list means nothing is available. The prices above are examples.
Book a transfer
/api/v1/bookings{
"quotation_id": "496751291354649762",
"vehicle_type": "standard",
"external_reference": "ACME-000123",
"service_type": "transfert",
"client_name": "Jane Doe",
"client_phone": "+212600000000",
"client_email": "jane@example.com",
"pickup_location": "Marrakech Menara Airport",
"pickup_latitude": 31.6069,
"pickup_longitude": -8.0363,
"dropoff_location": "Marrakech Medina",
"dropoff_latitude": 31.6295,
"dropoff_longitude": -7.9811,
"pickup_date": "2026-12-15",
"pickup_time": "10:00",
"passenger_count": 2,
"luggage_count": 2,
"price": 9.42,
"currency": "EUR",
"flight_number": "AT202",
"notes": "Child seat",
"language": "en"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| quotation_id | string | Yes | Identifier returned by the quote. |
| vehicle_type | string | Yes | Category to book, among those returned by the quote. |
| external_reference | string | Yes | Your unique reference for this booking. |
| client_name | string | Yes | Passenger full name. |
| client_phone | string | Yes | Passenger phone, with country code (for example +212600000000). |
| client_email | string | No | Passenger e-mail. |
| service_type | string | No | Always "transfert". |
| pickup_location | string | No | Pickup place. Label only: the booked route is the quote's. |
| pickup_latitude | number | No | Pickup latitude. Label only: the booked route is the quote's. |
| pickup_longitude | number | No | Pickup longitude. Label only: the booked route is the quote's. |
| dropoff_location | string | No | Destination place. Label only: the booked route is the quote's. |
| dropoff_latitude | number | No | Drop-off latitude. Label only: the booked route is the quote's. |
| dropoff_longitude | number | No | Drop-off longitude. Label only: the booked route is the quote's. |
| pickup_date | string | No | Pickup date, format YYYY-MM-DD. If sent, it must match the quote. |
| pickup_time | string | No | Pickup time, format HH:MM. If sent, it must match the quote. |
| passenger_count | integer | No | Number of passengers. If sent, it must match the quote. |
| luggage_count | integer | No | Number of bags (0 by default). |
| price | number | Yes | Quote price, in your key currency. It must match the quote. |
| currency | string | No | Your key currency (EUR or MAD). If sent, it must match the quote. |
| flight_number | string | No | Flight number (20 characters maximum). |
| notes | string | No | Notes for the driver (1000 characters maximum). |
| language | string | No | Passenger language: fr, en, ar, es, de, it, pt or nl. |
Same body as the Transgetx booking API. A sent field that does not match the quote (pickup_date, pickup_time, passenger_count, price, currency) is refused with 400 VALIDATION_ERROR and the mismatch_fields list. The route, date, passenger count and price booked are always the quote's.
{
"success": true,
"sandbox": true,
"reservation": {
"reservation_number": "TEST-4F2A9C71B0",
"status": "confirmed",
"total_price": 9.42,
"currency": "EUR"
},
"price": {
"amount": 9.42,
"currency": "EUR"
},
"email_status": "skipped"
}
external_reference, prefixed with your company code. Sending the same request again returns the same booking (200, "idempotent_replay": true) without a second charge. After BOOKING_STATUS_UNKNOWN or a network error, resend the request with the same reference.Retrieve a transfer
/api/v1/bookings/{reference}?phone=| Parameter | Type | Required | Description |
|---|---|---|---|
| reference | string | Yes | Reservation number or your external_reference. |
| phone | string | Yes | Passenger phone, URL encoded (%2B212600000000). |
The answer contains status, trip, passenger, price and, once assigned, the driver and vehicle.
{
"success": true,
"reservation": {
"reservation_number": "JT98675",
"status": "confirmed"
},
"driver_events": [
{
"event_type": "status_change",
"old_status": "assigned",
"new_status": "on_route",
"latitude": 31.6069,
"longitude": -8.0363,
"created_at": "2026-12-15T09:20:00Z",
"driver": {
"name": "Ahmed",
"phone": "+212600000001"
}
}
],
"driver_events_available": true
}
Retrieval includes the driver events in driver_events. []: no event yet (always the case in the sandbox, as no driver is sent). null with "driver_events_available": false: tracking is temporarily unavailable.
Track the driver
/api/v1/bookings/{reference}/driver-events?phone=| Parameter | Type | Required | Description |
|---|---|---|---|
| reference | string | Yes | Reservation number or your external_reference. |
| phone | string | Yes | Passenger phone, URL encoded (%2B212600000000). |
For frequent tracking, ask for the events alone: the answer holds count and events, in the same format as driver_events. Each call counts towards the rate limit.
Change a transfer
/api/v1/bookings/{reference}?phone={
"flight_number": "AT203"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| reference | string | Yes | Reservation number or your external_reference. |
| phone | string | Yes | Passenger phone, URL encoded (%2B212600000000). |
| Parameter | Type | Required | Description |
|---|---|---|---|
| flight_number | string | No | New flight number. |
| notes | string | No | New notes. |
| luggage_count | integer | No | New number of bags. |
| client_email | string | No | New passenger e-mail. |
| passenger_count | integer | No | New number of passengers, at most the capacity of the booked vehicle (otherwise 400 with max_passengers). The price does not change. |
| extra_waiting_time | integer | No | Waiting minutes to add, from 1 to 60 per change. |
To change the date, route or vehicle, cancel and book again from a new quote.
The price cannot be changed: extra_price is not available.
Cancel a transfer
/api/v1/bookings/{reference}/cancel| Parameter | Type | Required | Description |
|---|---|---|---|
| reference | string | Yes | Reservation number or your external_reference. |
| phone | string | No | Passenger phone, URL encoded. Must match the passenger. |
| reason | string | No | Reason for the cancellation (300 characters maximum). |
Without reason, the recorded reason is Cancelled via API. The answer is the booking system's answer, unchanged.
{
"success": true,
"reservation": {
"reservation_number": "CG014335",
"status": "cancelled",
"cancelled_at": "2026-12-02T13:00:25.481Z",
"cancellation_reason": "Cancelled via API"
},
"cancellation_policy": {
"hours_before_pickup": 720.5,
"is_late_cancellation": false,
"penalty_percent": 0,
"rule_applied": "Free cancellation (≥ 12h before pickup)"
},
"refund": {
"refunded": true,
"original_amount": 147.42,
"refund_amount": 147.42,
"currency": "MAD",
"balance_before": 19262.9,
"balance_after": 19410.32
}
}
| Parameter | Type | Description |
|---|---|---|
| reservation.reservation_number | string | Number of the cancelled booking. |
| reservation.status | string | Always cancelled. |
| reservation.cancelled_at | string | Date and time of the cancellation (UTC). |
| reservation.cancellation_reason | string | Recorded reason: the reason you sent, or Cancelled via API by default. |
| cancellation_policy.hours_before_pickup | number | Hours left before the pickup at the time of the cancellation. |
| cancellation_policy.is_late_cancellation | boolean | True when the cancellation is made less than 12 hours before the pickup. |
| cancellation_policy.penalty_percent | number | Penalty applied: 100 for a late cancellation, 0 otherwise. |
| cancellation_policy.rule_applied | string | Rule applied, as text. |
| refund.refunded | boolean | True when the amount was credited back to the balance. |
| refund.original_amount | number | Amount charged at booking. |
| refund.refund_amount | number | Amount refunded (0 when nothing is refunded). |
| refund.currency | string | Balance currency. |
| refund.balance_before / balance_after | number | Balance before and after the refund (only present when refunded is true). |
| refund.reason | string | When nothing is refunded: late_cancellation_under_12h, no_b2b_debit_found or refund_failed: …. |
In the sandbox the answer is shorter: reservation (id, reservation_number, status) and cancellation_reason, with no policy or refund.
Error codes
| HTTP | code | What to do |
|---|---|---|
| 400 | VALIDATION_ERROR, BOOKING_REFUSED | Fix the request |
| 401 | MISSING_CREDENTIALS, INVALID_CREDENTIALS | Check the key |
| 402 | INSUFFICIENT_BALANCE | Top up the account |
| 403 | ENVIRONMENT_MISMATCH | Use the key matching the address |
| 404 | BOOKING_NOT_FOUND | Check the reference and phone |
| 409 | REFERENCE_CONFLICT | This reference belongs to another booking |
| 409 | QUOTATION_ALREADY_USED | Request a new quote |
| 412 | BOOKING_NOT_ENABLED, ENVIRONMENT_MISMATCH | Contact CG MOBILITY |
| 422 | QUOTATION_NOT_FOUND, QUOTATION_REFUSED | Request a new quote with this key |
| 429 | RATE_LIMIT_EXCEEDED | Slow down your calls |
| 502 | BOOKING_LINK_ERROR, BOOKING_SYSTEM_UNAVAILABLE | Check the booking before retrying |
| 503 | BOOKING_STATUS_UNKNOWN | Resend the creation with the same reference |
Existing integration? CG MOBILITY API documentation
Need help or support?
Our technical team is available to answer all your questions about the API integration. Feel free to contact our support, we will get back to you as quickly as possible.