PHPackages                             exbil/lexoffice-php-api - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. exbil/lexoffice-php-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

exbil/lexoffice-php-api
=======================

Simple API Integration for Lex-Office

0.14.1(2y ago)2291MITPHPPHP ^7.4 | ^8CI passing

Since Sep 28Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/Exbil/lexoffice-php-api)[ Packagist](https://packagist.org/packages/exbil/lexoffice-php-api)[ RSS](/packages/exbil-lexoffice-php-api/feed)WikiDiscussions development Synced 1mo ago

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

💾 Lexoffice PHP API
===================

[](#-lexoffice-php-api)

[![visitors](https://camo.githubusercontent.com/7b07965d10714a0795c5295bfbe17eb9aa7c942d28f83e4756f1c43194c9c0fa/68747470733a2f2f76697369746f722d62616467652e6c616f62692e6963752f62616467653f706167655f69643d657862696c2e6c65786f66666963652d7068702d617069)](https://camo.githubusercontent.com/7b07965d10714a0795c5295bfbe17eb9aa7c942d28f83e4756f1c43194c9c0fa/68747470733a2f2f76697369746f722d62616467652e6c616f62692e6963752f62616467653f706167655f69643d657862696c2e6c65786f66666963652d7068702d617069)[![](https://camo.githubusercontent.com/f95589c7d094171de001bd17718ce5087c2f0d3b34cfea156a2f50dede5e687f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d762e312e302d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f436f6c6f723d776869746526636f6c6f723d366161366638)](https://camo.githubusercontent.com/f95589c7d094171de001bd17718ce5087c2f0d3b34cfea156a2f50dede5e687f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652d762e312e302d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f436f6c6f723d776869746526636f6c6f723d366161366638)[![](https://camo.githubusercontent.com/74c02ebafa99db5ec618934969f4f0ec49df8f179e371a4d2d3e4b5fabf50bab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f436f6c6f723d776869746526636f6c6f723d366161366638)](https://camo.githubusercontent.com/74c02ebafa99db5ec618934969f4f0ec49df8f179e371a4d2d3e4b5fabf50bab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d696e666f726d6174696f6e616c3f7374796c653d666c6174266c6f676f436f6c6f723d776869746526636f6c6f723d366161366638)

Getting Started
===============

[](#getting-started)

### Requirements

[](#requirements)

- [**PHP 8.3+**](https://www.php.net/downloads.php)
- Extensions: [Composer](https://getcomposer.org/), [PHP-JSON](https://www.php.net/manual/en/book.json.php)

⚒️ Install
==========

[](#️-install)

In the root of your project execute the following:

```
composer require exbil/lexoffice-php-api
```

or add this to your `composer.json` file:

```
{
  "require": {
    "exbil/lexoffice-php-api": "^0.14.1"
  }
}
```

📑 Usage
=======

[](#-usage)

Search for the official API Documentation [here](https://developers.lexoffice.io/docs/).
You need an [API Key](https://app.lexoffice.de/addons/public-api) for that.

### 🗃️ Basic

[](#️-basic)

```
$apiKey = getenv('LEX_OFFICE_API_KEY'); // store keys in .env file
$api = new \exbil\LexOffice\LexOfficeClient($apiKey);
```

### 🗃️ set cache

[](#️-set-cache)

```
// can be any PSR-6 compatibly cache handler
// in this example we are using symfony/cache
$cacheInterface = new \Symfony\Component\Cache\Adapter\FilesystemAdapter(
  'lexoffice',
  3600,
 __DIR__ . '/cache'
);

$api->setCacheInterface($cacheInterface);
```

### 🔚 Contact Endpoint

[](#-contact-endpoint)

```
// get a page
/** @var \exbil\LexOffice\LexOfficeClient $api */
$client = $api->contact();

$client->size = 100;
$client->sortDirection = 'ASC';
$client->sortProperty = 'name';

// get a page
$response = $client->getPage(0);

//get all
$response = $client->getAll();

// other methods
$response = $client->get($entityId);
$response = $client->create($data);
```

### 🗺️ Country Endpoint

[](#️-country-endpoint)

```
$response = $api->country()->getAll();
```

### 🔚 Invoices Endpoint

[](#-invoices-endpoint)

```
$response = $api->invoice()->getAll();
$response = $api->invoice()->get($entityId);
$response = $api->invoice()->create($data);
$response = $api->invoice()->document($entityId); // get document ID
$response = $api->invoice()->document($entityId, true); // get file content
```

### 🔚 Down Payment Invoices Endpoint

[](#-down-payment-invoices-endpoint)

```
$response = $api->downPaymentInvoice()->getAll();
$response = $api->downPaymentInvoice()->get($entityId);
$response = $api->downPaymentInvoice()->create($data);
$response = $api->downPaymentInvoice()->document($entityId); // get document ID
$response = $api->downPaymentInvoice()->document($entityId, true); // get file content
```

### 💵 Order Confirmation Endpoint

[](#-order-confirmation-endpoint)

```
$response = $api->orderConfirmation()->getAll();
$response = $api->orderConfirmation()->get($entityId);
$response = $api->orderConfirmation()->create($data);
$response = $api->orderConfirmation()->document($entityId); // get document ID
$response = $api->orderConfirmation()->document($entityId, true); // get file content
```

### 📃 Quotation Endpoint

[](#-quotation-endpoint)

```
$response = $api->quotation()->getAll();
$response = $api->quotation()->get($entityId);
$response = $api->quotation()->create($data);
$response = $api->quotation()->document($entityId); // get document ID
$response = $api->quotation()->document($entityId, true); // get file content
```

### 📄 Voucher Endpoint

[](#-voucher-endpoint)

```
$response = $api->voucher()->getAll();
$response = $api->voucher()->get($entityId);
$response = $api->voucher()->create($data);
$response = $api->voucher()->update($entityId, $data);
$response = $api->voucher()->document($entityId); // get document ID
$response = $api->voucher()->document($entityId, true); // get file content
```

### 💵 Credit Notes Endpoint

[](#-credit-notes-endpoint)

```
$response = $api->creditNote()->getAll();
$response = $api->creditNote()->get($entityId);
$response = $api->creditNote()->create($data);
$response = $api->creditNote()->document($entityId); // get document ID
$response = $api->creditNote()->document($entityId, true); // get file content
```

### 💵 Payment Endpoint

[](#-payment--endpoint)

```
$response = $api->payment()->get($entityId);
```

### 💵 Payment Conditions Endpoint

[](#-payment-conditions-endpoint)

```
$response = $api->paymentCondition()->getAll();
```

### 🗂️ Posting Categories Endpoint

[](#️-posting-categories-endpoint)

```
$response = $api->postingCategory()->getAll();
```

### 🧑🏻 Profile Endpoint

[](#-profile-endpoint)

```
$response = $api->profile()->get();
```

### 📜 Recurring Templates Endpoint

[](#-recurring-templates-endpoint)

```
// get single entitiy
$response = $api->recurringTemplate()->get($entityId);

// use pagination
$client = $api->recurringTemplate();
$client->size = 100;

// get a page
$response = $client->getPage(0);

//get all
$response = $client->getAll();
```

### 🔚 Voucherlist Endpoint

[](#-voucherlist-endpoint)

```
$client = $api->voucherlist();

$client->size = 100;
$client->sortDirection = 'DESC';
$client->sortColumn = 'voucherNumber';
$client->types = [
    'salesinvoice',
    'salescreditnote',
    'purchaseinvoice',
    'purchasecreditnote',
    'invoice',
    'downpaymentinvoice',
    'creditnote',
    'orderconfirmation',
    'quotation'
];
$client->statuses = [
    'draft',
    'open',
    'paid',
    'paidoff',
    'voided',
    //'overdue', overdue can only be fetched alone
    'accepted',
    'rejected'
];

// get everything what we can, not recommend:
//$client->setToEverything()

// get a page
$response = $client->getPage(0);

//get all
$response = $client->getAll();
```

### 📁 File Endpoint

[](#-file-endpoint)

```
$response = $api->file()->upload($filePath, $voucherType);
$response = $api->file()->get($entityId);
```

### ⚒️ Get JSON from Response

[](#️-get-json-from-response)

```
$json = $api->*()->getAsJson($response);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance47

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.9% 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

963d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c49e891503685d4e1ee870127fbce046a2b86a1ff2583c160dc9e04c2c31d62e?d=identicon)[Exbil](/maintainers/Exbil)

---

Top Contributors

[![efebagri](https://avatars.githubusercontent.com/u/81169584?v=4)](https://github.com/efebagri "efebagri (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

apiapi-clientexbillex-officelexofficelexoffice-apilexoffice-api-clientlexoffice-php-apiphprestapirestlex-officelexoffice

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/exbil-lexoffice-php-api/health.svg)

```
[![Health](https://phpackages.com/badges/exbil-lexoffice-php-api/health.svg)](https://phpackages.com/packages/exbil-lexoffice-php-api)
```

###  Alternatives

[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.3M14](/packages/xeroapi-xero-php-oauth2)[api-platform/metadata

API Resource-oriented metadata attributes and factories

243.5M96](/packages/api-platform-metadata)[sysix/lex-office-api

Simple API Integration for Lexoffice

2370.6k](/packages/sysix-lex-office-api)[cybercog/youtrack-rest-php

YouTrack REST API PHP Client.

37149.2k3](/packages/cybercog-youtrack-rest-php)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)

PHPackages © 2026

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