REST API

Fleet API

Integrate your fleet operations — manage bookings, assign drivers, and sync status updates programmatically.

Base URL https://7transfers.com/api/driver
Auth Bearer token

Getting started

Include these headers on every request after login:

Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer {token}
POST /api/driver/login

Login — get token

Authenticate with fleet credentials to receive a Bearer token for subsequent requests.

Request

JSON body
{
  "email": "fleet@example.com",
  "password": "your-password"
}

Response 200

JSON
{
  "success": true,
  "token": "1|xxxxxxxxxxxxxxxxxxxx",
  "user": {
    "id": 123,
    "name": "Malaga Fleet",
    "email": "fleet@example.com",
    "is_driver": false,
    "is_fleet": true
  }
}
GET /api/driver/bookings

List bookings assigned to the fleet

Query parameters optional

statusall or assigned, accepted, onroute, arrived, onboard, completed, canceled, noshow, rejected, market
from_dateYYYY-MM-DD
to_dateYYYY-MM-DD
per_page1–100 (default 20)

Example

GET
https://7transfers.com/api/driver/bookings?status=assigned&from_date=2026-04-11&per_page=50

Response 200

JSON
{
  "success": true,
  "data": [
    {
      "id": 9876,
      "ref_number": "T2S-12345",
      "status": "assigned",
      "status_label": "Assigned",
      "date": "2026-04-15 10:30:00",
      "from_address": "Malaga Airport (AGP)",
      "to_address": "Hotel Marbella Club",
      "passengers": 3,
      "vehicle_list": "Business Van",
      "luggage": 4,
      "hand_luggage": 3,
      "assigned_driver": null,
      "commission": 0,
      "flight_number": "FR1234",
      "meet_and_greet": true,
      "coordinate_start_lat": 36.6749,
      "coordinate_start_lon": -4.4991,
      "coordinate_end_lat": 36.5098,
      "coordinate_end_lon": -4.8826
    }
  ],
  "meta": {
    "current_page": 1,
    "last_page": 3,
    "per_page": 20,
    "total": 47
  }
}
Cancellations are not pushed to your system. Include status=canceled (or use status=all) in your polling to detect bookings cancelled by the office, and remove them on your side.
GET /api/driver/bookings/{id}

Booking details

Returns the full booking: passenger, contact, addresses, coordinates, status history, action buttons, extras (child seats, wheelchair, waiting time, etc.) and attached files.

Passenger phone numbers (contact_mobile, lead_passenger_mobile) are only returned by this endpoint — never in the bookings list — and only while the booking is in an active state (accepted, onroute, arrived, onboard). While the booking is still assigned, or after it is completed or cancelled, the phone fields are returned as null. Accept the booking first, then fetch the details to get the phone number.
PATCH /api/driver/bookings/{id}/status

Update booking status

Request

JSON body
{
  "status": "accepted",
  "status_notes": "Optional note"
}
Valid status values: accepted, rejected, onroute, arrived, onboard, noshow, completed, canceled
  • status_notes is required when status is rejected.
  • Statuses onroute, arrived, onboard, noshow, completed require a recent driver GPS location (within 5 minutes). For office-side integration, use accepted, rejected, or canceled.
Once a booking has been cancelled by the office it can no longer be re-activated: any attempt to change its status (e.g. to accepted) returns a 422 error. Always re-check the current status before accepting bookings queued from an earlier poll.

Response 200

JSON
{
  "success": true,
  "data": { "id": 9876, "status": "accepted" }
}
GET /api/driver/fleet/drivers

List fleet's own drivers

Response

JSON
{
  "success": true,
  "data": [
    { "id": 55, "name": "Juan Perez", "email": "juan@example.com" }
  ]
}
PATCH /api/driver/fleet/bookings/{id}/assign-driver

Assign a driver to a booking

Request

JSON body
{
  "driver_id": 55,
  "commission": 10.00,
  "fleet_commission": 5.00
}

Response

JSON
{
  "success": true,
  "message": "Driver assigned.",
  "data": {
    "id": 9876,
    "driver_id": 55,
    "driver_name": "Juan Perez",
    "commission": 10.00,
    "fleet_commission": 5.00
  }
}
POST /api/driver/logout

Logout

Revokes the current Bearer token.

Error format

All errors return JSON with a human-readable message.

JSON
{ "success": false, "message": "Human-readable message" }
401 Invalid credentials or token
403 Not a fleet user / booking not owned by fleet
404 Booking not found
422 Validation error or invalid state transition