PHPackages                             bennetgallein/lex-office-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. bennetgallein/lex-office-api

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

bennetgallein/lex-office-api
============================

Simple API Integration for Lex-Office

0.18.0(2y ago)01.2kMITPHPPHP ^7.4 | ^8

Since Jun 11Pushed 2y agoCompare

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

READMEChangelogDependencies (5)Versions (3)Used By (0)

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

[](#lexoffice-php-api)

[![tests](https://github.com/clicksports/lexoffice-php-api/workflows/tests/badge.svg)](https://github.com/clicksports/lexoffice-php-api/workflows/tests/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/7377fca705acec0b760be80824ee6204772a588f22bcd64823cd4a2007a066ad/68747470733a2f2f706f7365722e707567782e6f72672f636c69636b73706f7274732f6c65782d6f66666963652d6170692f76)](//packagist.org/packages/clicksports/lex-office-api)[![License](https://camo.githubusercontent.com/d352c38703e7198ed2f6cbe951eaffdd97be103b819ed07a8e594586a58b8c74/68747470733a2f2f706f7365722e707567782e6f72672f636c69636b73706f7274732f6c65782d6f66666963652d6170692f6c6963656e7365)](//packagist.org/packages/clicksports/lex-office-api)

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

[](#requirements)

PHP: &gt;= 7.4
Extensions: [Composer](https://getcomposer.org/), [PHP-JSON](https://www.php.net/manual/en/book.json.php)

Install
-------

[](#install)

composer:
`composer require clicksports/lex-office-api`

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 \Clicksports\LexOffice\Api($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 \Clicksports\LexOffice\Api $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

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

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

Every ~0 days

Total

2

Last Release

1072d ago

### Community

Maintainers

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

---

Top Contributors

[![Sysix](https://avatars.githubusercontent.com/u/3897725?v=4)](https://github.com/Sysix "Sysix (123 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (35 commits)")[![servusrene](https://avatars.githubusercontent.com/u/48084558?v=4)](https://github.com/servusrene "servusrene (12 commits)")[![bennetgallein](https://avatars.githubusercontent.com/u/15325891?v=4)](https://github.com/bennetgallein "bennetgallein (7 commits)")[![antondollmaier](https://avatars.githubusercontent.com/u/1730675?v=4)](https://github.com/antondollmaier "antondollmaier (1 commits)")[![MLDMoritz](https://avatars.githubusercontent.com/u/46711821?v=4)](https://github.com/MLDMoritz "MLDMoritz (1 commits)")

---

Tags

apirestlex-officelexoffice

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bennetgallein-lex-office-api/health.svg)

```
[![Health](https://phpackages.com/badges/bennetgallein-lex-office-api/health.svg)](https://phpackages.com/packages/bennetgallein-lex-office-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)
