Phone Bookings NON STOP: +4 0752 012 012

API Documentation

PHP Rent a Car API

Overview

Public, read-only endpoints for locations, fleet, availability, and quotes.
Requests accept European dates (DD-MM-YYYY) via pick_up_date and delivery_date. Responses keep current field names as implemented (e.g. pickup_date / return_date in ISO).

Base URL
https://phprentacar.ro
Agents & search engines can auto-discover this API via: Link: ; rel="service-desc"
GET

/api/v1/locations

List fixed pickup/return locations.

Query params
Name Type Required Description
q string No Optional free-text filter
cURL
Copycurl -s https://phprentacar.ro/api/v1/locations | jq .
Response (example)
Copy{
  "items": [
    {
      "id": "clj_airport",
      "name": "Cluj-Napoca International Airport",
      "iata_code": "CLJ",
      "address": {
        "street": "Str. Traian Vuia 149",
        "city": "Cluj-Napoca",
        "region": "Cluj",
        "postal_code": "400397",
        "country_code": "RO"
      },
      "timezone": "Europe/Bucharest"
    }
  ]
}
GET

/api/v1/cars

List car models; if dates are provided, includes computed total and availability hint.

Query params
Name Type Req Description
car_id string No Filter by model id
pick_up_date string DD-MM-YYYY No Pickup date
delivery_date string DD-MM-YYYY No Return date
category string No economy|compact|suv|minivan|premium
transmission string No manual|automatic
ac boolean No Air conditioning
cURL (with dates)
Copycurl -s "https://phprentacar.ro/api/v1/cars?pick_up_date=03-11-2025&delivery_date=20-11-2025" | jq .
Response item (example)
Copy{
  "id": "40",
  "make": "Seat",
  "model": "Ibiza",
  "category": "economy",
  "year": null,
  "seats": null,
  "doors": null,
  "luggage_small": null,
  "luggage_large": null,
  "transmission": null,
  "ac": true,
  "fuel_type": null,
  "features": ["usb","abs","esp"],
  "images": [
    { "url": "https://phprentacar.ro/uploads/cars/big/40-seat-ibiza-s1.webp", "alt": "Seat Ibiza exterior" }
  ],
  "lead_price": {
    "pickup_date": "2025-11-03",
    "return_date": "2025-11-20",
    "currency": "EUR",
    "price_per_day": 26,
    "total_price": 442,
    "availability_hint": "in_stock"
  },
  "jsonld": {
    "@context": "https://schema.org",
    "@type": "Car",
    "brand": "Seat",
    "model": "Ibiza"
  }
}
GET

/api/v1/cars/{car_id}

Get full details for one model.

cURL
Copycurl -s https://phprentacar.ro/api/v1/cars/108 | jq .
Response (example)
Copy{
  "id":"108",
  "make":"VW",
  "model":"Passat",
  "year":null,
  "category":"premium",
  "category_label_ro":"Family | Business",
  "seats":null,
  "doors":null,
  "luggage_small":null,
  "luggage_large":null,
  "transmission":null,
  "ac":true,
  "fuel_type":null,
  "features":["bluetooth","abs","esp","parking_sensors"],
  "images":[
    {"url":"https://phprentacar.ro/uploads/cars/big/108-vw-passat-b7-automat.webp","alt":"VW Passat exterior"}
  ],
  "description":"Here comes the car description",
  "included":["Asigurare RCA","Asistență rutieră 24/7","Kilometraj 200 km/zi"],
  "policies":{
    "mileage_policy":"200 km/zi incluse; 0.15 EUR/km după",
    "fuel_policy":"La fel ca la preluare",
    "deposit_amount":200,
    "age_requirement":"Șofer 21+ ani, permis 2+ ani",
    "cancellation_policy":"Gratuit până la 24h înainte de preluare",
    "terms_url":"https://phprentacar.ro/termeni-si-conditii"
  },
  "base_price":{"currency":"EUR","price_per_day":35},
  "extras":[],
  "links":{
    "self":"https://phprentacar.ro/api/v1/cars/108",
    "availability":"https://phprentacar.ro/api/v1/availability?car_id=108",
    "quote":"https://phprentacar.ro/api/v1/quote"
  },
  "jsonld":{
    "@context":"https://schema.org",
    "@type":"Car",
    "brand":"Volkswagen",
    "model":"Passat"
  }
}
GET

/api/v1/availability

Check precise availability for a model in a date range.

Query params
Name Type Req Description
car_id string Yes Model id
pick_up_date string DD-MM-YYYY Yes Pickup date
delivery_date string DD-MM-YYYY Yes Return date
cURL
Copycurl -s "https://phprentacar.ro/api/v1/availability?car_id=108&pick_up_date=03-11-2025&delivery_date=20-11-2025" | jq .
Response (example)
Copy{
  "car_id": "108",
  "pickup_date": "2025-11-03",
  "return_date": "2025-11-20",
  "available": true,
  "remaining_units": 2,
  "notes": "Available to reserve",
  "jsonld": {
    "@context": "https://schema.org",
    "@type": "Offer",
    "itemOffered": { "@type": "Car", "brand": "Volkswagen", "model": "Passat" },
    "availability": "https://schema.org/InStock"
  }
}
POST

/api/v1/quote

Calculate final price for a rental. Extras are optional and priced per day.

Request body
Name Type Req Description
car_id string Yes Model id
pick_up_date string DD-MM-YYYY Yes Pickup date
delivery_date string DD-MM-YYYY Yes Return date
pickup_time string HH:MM No Optional
return_time string HH:MM No Optional
currency string No Default EUR
extras object (map) No e.g. {"gps":1,"child_seat":2}
cURL
Copycurl -s -X POST https://phprentacar.ro/api/v1/quote 
  -H "Content-Type: application/json" 
  -d '{"car_id":"88","pick_up_date":"03-11-2025","delivery_date":"20-11-2025"}' | jq .
Response (example)
Copy{
  "car_id": "88",
  "pickup_date": "2025-11-03",
  "return_date": "2025-11-20",
  "rental_days": 17,
  "currency": "EUR",
  "price_per_day": 37,
  "base_total": 629,
  "extras_total": 0,
  "total_price": 629,
  "breakdown": [
    { "label": "Base", "detail": "37 × 17 zile / days", "amount": 629, "currency": "EUR" }
  ]
}
Error examples
{
  "error": "bad_request",
  "message": "car_id, pick_up_date and delivery_date are required (DD-MM-YYYY)."
}
{
  "error": "conflict",
  "message": "Car not available for the requested interval."
}

Contact & Terms

Support: office@phprentacar.ro

Terms: https://alfarentacar.ro/en/p-terms-and-conditions