Technical Documentation

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

REST / JSON Sandbox

Airport Transfer API — one key

For new integrations: price, booking, retrieval, changes and cancellation of an airport transfer with the same key.

EnvironmentBase addressKey
Sandboxhttps://sandbox-api.cgmobility.co.uksk_test_…
Productionhttps://api.cgmobility.co.uksk_prod_…

Send the key in the x-api-key header, from your server only: never from a web page or mobile app.

ℹ️
Get your sandbox key: ask your CG MOBILITY contact for developer access, then open Plus → Développeurs in your partner area. A console lets you try the six calls. The production key is issued after CG MOBILITY approval.
ℹ️
In the sandbox, the reference starts with TEST- and the answer contains "sandbox": true: no driver is sent, nothing is charged and no e-mail is sent.
POST

Get a price

/api/v1/price-quote
Request body
{
  "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"
}
Response — 200 OK (extract)
{
  "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
      }
    }
  ]
}
Body parameters
ParameterTypeRequiredDescription
pickup_locationstringYesPickup place (name of the place).
dropoff_locationstringYesDestination place (name of the place).
pickup_datestringYesPickup date, format YYYY-MM-DD.
pickup_timestringYesPickup time, format HH:MM.
passengersintegerNoNumber of passengers (1 by default).
pickup_latitudenumberNoPickup latitude, in decimal degrees. Send it with pickup_longitude.
pickup_longitudenumberNoPickup longitude, in decimal degrees. Send it with pickup_latitude.
dropoff_latitudenumberNoDrop-off latitude, in decimal degrees. Send it with dropoff_longitude.
dropoff_longitudenumberNoDrop-off longitude, in decimal degrees. Send it with dropoff_latitude.
vehicle_typestringNoOne 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.

POST

Book a transfer

/api/v1/bookings
Request body
{
  "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"
}
Body parameters
ParameterTypeRequiredDescription
quotation_idstringYesIdentifier returned by the quote.
vehicle_typestringYesCategory to book, among those returned by the quote.
external_referencestringYesYour unique reference for this booking.
client_namestringYesPassenger full name.
client_phonestringYesPassenger phone, with country code (for example +212600000000).
client_emailstringNoPassenger e-mail.
service_typestringNoAlways "transfert".
pickup_locationstringNoPickup place. Label only: the booked route is the quote's.
pickup_latitudenumberNoPickup latitude. Label only: the booked route is the quote's.
pickup_longitudenumberNoPickup longitude. Label only: the booked route is the quote's.
dropoff_locationstringNoDestination place. Label only: the booked route is the quote's.
dropoff_latitudenumberNoDrop-off latitude. Label only: the booked route is the quote's.
dropoff_longitudenumberNoDrop-off longitude. Label only: the booked route is the quote's.
pickup_datestringNoPickup date, format YYYY-MM-DD. If sent, it must match the quote.
pickup_timestringNoPickup time, format HH:MM. If sent, it must match the quote.
passenger_countintegerNoNumber of passengers. If sent, it must match the quote.
luggage_countintegerNoNumber of bags (0 by default).
pricenumberYesQuote price, in your key currency. It must match the quote.
currencystringNoYour key currency (EUR or MAD). If sent, it must match the quote.
flight_numberstringNoFlight number (20 characters maximum).
notesstringNoNotes for the driver (1000 characters maximum).
languagestringNoPassenger 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.

Sandbox response — 201 (extract)
{
  "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"
}
ℹ️
Retries: use a unique 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.
GET

Retrieve a transfer

/api/v1/bookings/{reference}?phone=
URL parameters
ParameterTypeRequiredDescription
referencestringYesReservation number or your external_reference.
phonestringYesPassenger phone, URL encoded (%2B212600000000).

The answer contains status, trip, passenger, price and, once assigned, the driver and vehicle.

Response — 200 OK (extract)
{
  "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.

GET

Track the driver

/api/v1/bookings/{reference}/driver-events?phone=
URL parameters
ParameterTypeRequiredDescription
referencestringYesReservation number or your external_reference.
phonestringYesPassenger 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.

PATCH

Change a transfer

/api/v1/bookings/{reference}?phone=
Request body
{
  "flight_number": "AT203"
}
URL parameters
ParameterTypeRequiredDescription
referencestringYesReservation number or your external_reference.
phonestringYesPassenger phone, URL encoded (%2B212600000000).
Body parameters
ParameterTypeRequiredDescription
flight_numberstringNoNew flight number.
notesstringNoNew notes.
luggage_countintegerNoNew number of bags.
client_emailstringNoNew passenger e-mail.
passenger_countintegerNoNew number of passengers, at most the capacity of the booked vehicle (otherwise 400 with max_passengers). The price does not change.
extra_waiting_timeintegerNoWaiting 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.

POST

Cancel a transfer

/api/v1/bookings/{reference}/cancel
URL parameters
ParameterTypeRequiredDescription
referencestringYesReservation number or your external_reference.
phonestringNoPassenger phone, URL encoded. Must match the passenger.
reasonstringNoReason for the cancellation (300 characters maximum).

Without reason, the recorded reason is Cancelled via API. The answer is the booking system's answer, unchanged.

Response — 200 OK (extract)
{
  "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
  }
}
Response fields
ParameterTypeDescription
reservation.reservation_numberstringNumber of the cancelled booking.
reservation.statusstringAlways cancelled.
reservation.cancelled_atstringDate and time of the cancellation (UTC).
reservation.cancellation_reasonstringRecorded reason: the reason you sent, or Cancelled via API by default.
cancellation_policy.hours_before_pickupnumberHours left before the pickup at the time of the cancellation.
cancellation_policy.is_late_cancellationbooleanTrue when the cancellation is made less than 12 hours before the pickup.
cancellation_policy.penalty_percentnumberPenalty applied: 100 for a late cancellation, 0 otherwise.
cancellation_policy.rule_appliedstringRule applied, as text.
refund.refundedbooleanTrue when the amount was credited back to the balance.
refund.original_amountnumberAmount charged at booking.
refund.refund_amountnumberAmount refunded (0 when nothing is refunded).
refund.currencystringBalance currency.
refund.balance_before / balance_afternumberBalance before and after the refund (only present when refunded is true).
refund.reasonstringWhen 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

HTTPcodeWhat to do
400VALIDATION_ERROR, BOOKING_REFUSEDFix the request
401MISSING_CREDENTIALS, INVALID_CREDENTIALSCheck the key
402INSUFFICIENT_BALANCETop up the account
403ENVIRONMENT_MISMATCHUse the key matching the address
404BOOKING_NOT_FOUNDCheck the reference and phone
409REFERENCE_CONFLICTThis reference belongs to another booking
409QUOTATION_ALREADY_USEDRequest a new quote
412BOOKING_NOT_ENABLED, ENVIRONMENT_MISMATCHContact CG MOBILITY
422QUOTATION_NOT_FOUND, QUOTATION_REFUSEDRequest a new quote with this key
429RATE_LIMIT_EXCEEDEDSlow down your calls
502BOOKING_LINK_ERROR, BOOKING_SYSTEM_UNAVAILABLECheck the booking before retrying
503BOOKING_STATUS_UNKNOWNResend the creation with the same reference

Existing integration? CG MOBILITY API documentation

Support 24/7

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.

WhatsApp Support Reply within 2 hours · +32 456 682 574 support@cgmobility.co.uk

Book · Airport transfer API · API documentation · Contact