Rental contracts list

This API provides information about rental contracts from the Rent Car module, including open, booked, and closed contracts.
For each contract, the response includes details about the renter, pickup and drop-off locations, planned start and end dates, as well as contract and vehicle numbers.

How to get data

Method

GET

Request address

To get the data, use the address: https://<server_address>/api/api.php?

Request parameters

To retrieve the required data, add the following parameters to the request URL:
  • cmd=rentcar_contracts — command to get the list of rental contracts
  • status — contract status(es) to retrieve. You can pass one or multiple values separated by commas:
  • open — active contracts (rental is currently ongoing)
  • booked — reserved contracts (booking created, rental not started yet)
  • closed — completed contracts (rental finished)
Response format: array of rental contracts
 

Example request

https://<server_address>/api/api.php?cmd=rentcar_contracts&status=open,booked,closed
Response example
{
  "code": 0,
  "msg": "OK",
  "list": [
    {
      "driver_name": "Test renter",
      "driver_phone": "905074521698",
      "end_location": {
        "title": "Dubai"
      },
      "start_location": {
        "title": "Dubai"
      },
      "mva": "12312",
      "ra": "16",
      "te_expected": 1775901540,
      "ts_expected": 1775812680,
      "plate_number": "Private house"
    },
    {
      "driver_name": "Test renter",
      "driver_phone": "905074521698",
      "end_location": {
        "title": "rgergrr"
      },
      "start_location": {
        "title": "erterter"
      },
      "mva": "2222",
      "ra": "17",
      "te_expected": 1775901540,
      "ts_expected": 1775812680,
      "plate_number": "ABC-123"
    }
  ]
}
The API response includes:
  • code — status code (0 = success)
  • msg — status message ("OK" = request successful)
  • list — array of rental contracts, where each contract contains:
  • driver_name — name of the renter (driver)
  • driver_phone — renter’s contact phone number
  • start_location — rental start location (vehicle pickup):
  • title — name/address of the pickup location
  • end_location — rental end location (vehicle return):
  • title — name/address of the return location
  • mva — Master Vehicle Agreement number
  • ra — Rental Agreement / booking number
  • ts_expected — planned rental start time (Unix timestamp)
  • te_expected — planned rental end time (Unix timestamp)
  • plate_number — vehicle license plate number associated with the contract