Download the PHP package marcincook/laravel-renteon-api-client without Composer
On this page you can find all versions of the php package marcincook/laravel-renteon-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download marcincook/laravel-renteon-api-client
More information about marcincook/laravel-renteon-api-client
Files in marcincook/laravel-renteon-api-client
Package laravel-renteon-api-client
Short Description Laravel client for the Renteon REST API (multi-country, manager-style facade).
License MIT
Homepage https://github.com/marcincook/laravel-renteon-api-client
Informations about the package laravel-renteon-api-client
Laravel Renteon API Client
A Laravel client for the Renteon REST API, with first-class support for multi-country setups (PL / ES / LT / …) and a manager-style facade familiar to Laravel developers.
Official Renteon API reference: https://demo.s2.renteon.com/en/Api/Help/Referenceex
Status
🚧 Early development — the API surface may still change before v1.0.0.
Requirements
- PHP 8.3+
- Laravel 11, 12 or 13
Installation
Publish the config:
Configuration
Set environment variables for each country you operate in:
The same set of variables is available for RENTEON_ES_* and RENTEON_LT_*. Authentication is performed transparently: the first call exchanges your credentials for an access token (POST /token with a Base64(SHA512(…)) signature), then re-uses it for the rest of the request lifecycle.
Quick start
You can also use the Renteon facade:
Resources
Each resource maps to a slice of the Renteon REST API. Method signatures are kept close to the upstream model names so the official reference is your primary documentation.
| Resource | Key methods |
|---|---|
offices() |
getOffices(bool $onlyActive = true), fetchOfficesFromApi(), clearCache() |
countries() |
getCountries() (projected to {id, name}), clearCache() |
cars() |
searchCars($filters), getAllCars($filters), getCar($id) |
carCategories() |
searchCarCategories($filters), getCarCategory($id) |
addressBook() |
searchAddressBook($filters), findByEmail($email), getAddressBook($id), createAddressBook($payload), updateAddressBook($id, $payload) |
bookings() |
availability(...), create(...), calculate(...), save(...), getByNumber($number), cancel($number), checkOut($number, $officeCode), searchBookings(...), getBookingsForMonth($y, $m), getBookingById($id) |
carActivities() |
searchCarActivities($filters), getCarActivityDefinitions() |
finance() |
searchFinanceDocuments($filters), searchExportInvoices($filters), findExportInvoiceByInvoiceId($id), getCachedExPaymentTypes(), getCachedExportInvoiceDocumentTypes() |
reports() |
getRealizationByOffice($params) — uses the separate report-token flow |
Booking flow example
The typical "public-facing booking site → Renteon" pipeline looks like this:
Verified gotchas (production, confirmed with Renteon)
Hard-won lessons from a live integration — get these wrong and ExBooking/Save
returns an opaque 500 "Nullable object must have a value":
BookingTypeIdmust be2(Reservation), not1(Contract) for a web booking. Type 1 is the single biggest cause of the 500. Pair withBookingSubTypeId = 6(Reservation).- Dates must be UTC Zulu (
2026-06-12T08:00:00Z). An explicit local offset (+02:00) trips a .NETDateTime.Kindconversion error on Create and Save. Saverequires at least oneBooking_Driversentry — without it the server dereferences a null (500). A minimal driver{AddressBookId, SortOrder, IsDriverLicenceDomestic:false, IsPassportDomestic:false, IsIdCardDomestic:false}is enough; the client must have an address book address.Createrequires aPricelistIdon theAvailabilityCarCategory. You may override the amounts (Amount/Total/TotalDeposit) with your own prices, but the category must reference an existing Renteon pricelist.- The client needs ≥1
PersonIdentification(e.g. type 3 = Driver license), or Calculate/Save return 422. - The API user must be a member of the booking's offices (Renteon panel → user → "Offices") or Availability returns 0 categories.
- The
/tokenrequest expectsoffice_id(snake_case) — non-"External" users require it; the External flag is mandatory for machine auth (otherwise a new-device email verification kicks in).
Scope note: this
ExBooking/*(External) API is fine when the CMS owns pricing and overrides amounts. For a Renteon-priced, multi-instance storefront, Renteon recommends the Aggregator API (aggregator.renteon.com, HTTP Basic) instead.
Customer booking history
getBookingsByClient() returns a customer's full history. ClientId is the only
search filter that actually narrows to one customer (ClientIds/AddressBookId
are ignored). The rich export projection (Number, dates, office, car category,
Total/TotalDeposit/TotalDomestic, BookingSubTypeCode, IsCancelled, Client*) is
enough to render a "my bookings" view without a per-booking call.
Email lookup caveat:
AddressBook::findByEmail()is unreliable — Renteon has no email search filter, so it pages the address book and matches client-side and can miss the customer on a large base. Store the RenteonClientIdlocally (per customer) when you create the booking, and look up history by that id.
Reports
Reports::getRealizationByOffice() uses a different authentication flow — set either RENTEON_REPORT_TOKEN (a raw bearer token captured from the Renteon panel) or RENTEON_REPORT_USERNAME/RENTEON_REPORT_PASSWORD/RENTEON_REPORT_OFFICE_ID. If neither is set, the client falls back to the country token.
Caching
Dictionary endpoints (offices, countries, payment types, document types) are cached using the Laravel cache repository, keyed per country. TTL defaults to 24h and is configurable via RENTEON_DICT_CACHE_TTL (seconds). Use the clearCache() method on each resource to invalidate.
Error handling
All HTTP failures bubble up as exceptions:
MarcinCook\RenteonApi\Exceptions\RenteonAuthException—/tokenendpoint failed or returned noaccess_token.MarcinCook\RenteonApi\Exceptions\RenteonHttpException— any other non-2xx response. The originalIlluminate\Http\Client\Responseis attached as->response.MarcinCook\RenteonApi\Exceptions\RenteonException— base class for both.
The two top-level dictionary getters (getOffices, getCountries) deliberately swallow API failures and log a warning — they're used in dropdowns where a transient outage shouldn't break the page.
Testing
License
MIT — see LICENSE.
All versions of laravel-renteon-api-client with dependencies
illuminate/cache Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0