PHPackages                             marcincook/laravel-renteon-api-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. marcincook/laravel-renteon-api-client

ActiveLibrary[API Development](/categories/api)

marcincook/laravel-renteon-api-client
=====================================

Laravel client for the Renteon REST API (multi-country, manager-style facade).

v0.1.0(3w ago)178↓100%MITPHPPHP ^8.3

Since May 15Pushed 3w agoCompare

[ Source](https://github.com/marcincook/laravel-renteon-api-client)[ Packagist](https://packagist.org/packages/marcincook/laravel-renteon-api-client)[ Docs](https://github.com/marcincook/laravel-renteon-api-client)[ RSS](/packages/marcincook-laravel-renteon-api-client/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

Laravel Renteon API Client
==========================

[](#laravel-renteon-api-client)

A Laravel client for the [Renteon](https://renteon.com) 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:

Status
------

[](#status)

🚧 Early development — the API surface may still change before v1.0.0.

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 11, 12 or 13

Installation
------------

[](#installation)

```
composer require marcincook/laravel-renteon-api-client
```

Publish the config:

```
php artisan vendor:publish --tag=renteon-config
```

Configuration
-------------

[](#configuration)

Set environment variables for each country you operate in:

```
RENTEON_DEFAULT_COUNTRY=pl

RENTEON_PL_API_ENABLED=true
RENTEON_PL_API_BASE_URL=https://your-tenant.renteon.com
RENTEON_PL_API_USERNAME=...
RENTEON_PL_API_PASSWORD=...
RENTEON_PL_API_CLIENT_ID=...
RENTEON_PL_API_SECRET=...
RENTEON_PL_API_SALT=00000000

# Optional — used only by reports (RealizationByOffice et al.)
RENTEON_REPORT_TOKEN=
RENTEON_REPORT_USERNAME=
RENTEON_REPORT_PASSWORD=
RENTEON_REPORT_OFFICE_ID=
```

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
-----------

[](#quick-start)

```
use MarcinCook\RenteonApi\RenteonManager;

$renteon = app(RenteonManager::class);

// Default country — config('renteon.default')
$offices = $renteon->offices()->getOffices();

// Explicit country
$cars = $renteon->for('es')->cars()->getAllCars(['IsActive' => true]);
```

You can also use the `Renteon` facade:

```
use Renteon;

$countries = Renteon::for('pl')->countries()->getCountries();
```

Resources
---------

[](#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](https://demo.s2.renteon.com/en/Api/Help/Referenceex) is your primary documentation.

ResourceKey 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 flowBooking flow example
--------------------

[](#booking-flow-example)

The typical "public-facing booking site → Renteon" pipeline looks like this:

```
use MarcinCook\RenteonApi\RenteonManager;

$renteon = app(RenteonManager::class)->for('pl');

// 1) Lookup dictionaries for the storefront (cache these).
$offices    = $renteon->offices()->getOffices();
$countries  = $renteon->countries()->getCountries();
$categories = $renteon->carCategories()->searchCarCategories(['IsActive' => true]);

// 2) Identify the customer (email-based lookup).
$customer = $renteon->addressBook()->findByEmail('jane@example.com', [
    // Optional pre-filter — keeps the search payload small.
    'AddressBookTypeIds' => [1],
    'IsActive' => true,
]);

if ($customer === null) {
    $customer = $renteon->addressBook()->createAddressBook([
        'Name'              => 'Jane Doe',
        'AddressBookTypeId' => 1,
        'Email'             => 'jane@example.com',
        'IsAgency'          => false,
        'IsAgent'           => false,
        'IsArtisan'         => false,
        'IsEmployee'        => false,
        'IsForeigner'       => false,
        'IsVatPayer'        => false,
        'AllowB2CAccess'    => true,
        'BillingDelayInDays' => 0,
        'SurveyDoNotEmail'  => false,
        'AddressBookPhones' => [
            ['Number' => '+48123456789', 'PhoneTypeId' => 1],
        ],
    ]);
}

// 3) Check availability for the chosen date window + office pair.
$availability = $renteon->bookings()->availability([
    'OfficeOutId'    => 1,
    'OfficeInId'     => 1,
    'DateTimeOut'    => '2026-06-10T10:00:00+02:00',
    'DateTimeIn'     => '2026-06-15T10:00:00+02:00',
    'AvailableOnly'  => true,
    'CarCategoryIds' => [/* optionally narrow down */],
]);

$pickedCategory = $availability[0]['AvailabilityCarCategories'][0] ?? null;

// 4) Create the booking (server computes prices + mandatory additions).
$draft = $renteon->bookings()->create([
    'OfficeOutId'             => 1,
    'OfficeInId'              => 1,
    'DateTimeOut'             => '2026-06-10T10:00:00+02:00',
    'DateTimeIn'              => '2026-06-15T10:00:00+02:00',
    'ClientId'                => $customer['Id'],
    'BookingTypeId'           => 1,
    'CurrencyId'              => 1,
    'AvailabilityCarCategory' => $pickedCategory,
]);

// (optional) Recalculate after the customer adds extras / insurance.
$draft['Services'][] = ['ServiceId' => 7, 'Quantity' => 1];
$draft = $renteon->bookings()->calculate($draft);

// 5) After your payment gateway clears the deposit & extras — persist it.
$booking = $renteon->bookings()->save(array_merge($draft, [
    'CarId'         => 42,
    'ClientId'      => $customer['Id'],
    'ClientName'    => 'Jane Doe',
    'ClientEmail'   => 'jane@example.com',
    'TotalDeposit'  => 365.38,
    'Remark'        => 'Paid online via Stripe',
]));

// $booking['Number'] is now safe to persist in your local DB for the
// customer's booking history.
```

Reports
-------

[](#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.

```
$rows = $renteon->reports()->getRealizationByOffice([
    'DateTimeInFrom'           => '01.06.2026.',
    'DateTimeInTo'             => '30.06.2026.',
    'IncludeExternalDocuments' => false,
]);
```

Caching
-------

[](#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
--------------

[](#error-handling)

All HTTP failures bubble up as exceptions:

- `MarcinCook\RenteonApi\Exceptions\RenteonAuthException` — `/token` endpoint failed or returned no `access_token`.
- `MarcinCook\RenteonApi\Exceptions\RenteonHttpException` — any other non-2xx response. The original `Illuminate\Http\Client\Response` is 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
-------

[](#testing)

```
vendor/bin/pest
vendor/bin/pint --test
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance94

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

26d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4801df0d7dd5eb9a0bb0d7bc0b9d2aa5d648b1bfe9f76e8b9757c2615c035e56?d=identicon)[marcincook](/maintainers/marcincook)

---

Top Contributors

[![marcincook](https://avatars.githubusercontent.com/u/859167?v=4)](https://github.com/marcincook "marcincook (3 commits)")

---

Tags

laravel-php-api-client-renteon-car-rentalapilaravelrest-clientcar-rentalrenteon

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/marcincook-laravel-renteon-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/marcincook-laravel-renteon-api-client/health.svg)](https://phpackages.com/packages/marcincook-laravel-renteon-api-client)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[api-platform/laravel

API Platform support for Laravel

59156.3k10](/packages/api-platform-laravel)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15104.9k4](/packages/calebdw-larastan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
