PHPackages                             datana-gmbh/datapool-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. datana-gmbh/datapool-api

ActiveLibrary

datana-gmbh/datapool-api
========================

API for Datapool

3.18.0(2y ago)0288.6k[2 issues](https://github.com/datana-gmbh/datapool-api/issues)MITPHPPHP &gt;=8.1CI passing

Since Feb 28Pushed 2mo agoCompare

[ Source](https://github.com/datana-gmbh/datapool-api)[ Packagist](https://packagist.org/packages/datana-gmbh/datapool-api)[ RSS](/packages/datana-gmbh-datapool-api/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (13)Versions (28)Used By (0)

datapool-api
============

[](#datapool-api)

BranchPHPCode Coverage`master`[![PHP](https://github.com/datana-gmbh/datapool-api/workflows/PHP/badge.svg?branch=master)](https://github.com/datana-gmbh/datapool-api/actions)[![Code Coverage](https://camo.githubusercontent.com/248787b8420750a3996e04f1902493d6eca5d5e02c8c5ebe0c4b496dde381c67/68747470733a2f2f636f6465636f762e696f2f67682f646174616e612d676d62682f64617461706f6f6c2d6170692f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/datana-gmbh/datapool-api)Usage
-----

[](#usage)

### Installation

[](#installation)

```
composer require datana-gmbh/datapool-api
```

### Setup

[](#setup)

```
use Datana\Datapool\Api\DatapoolClient;

$client = new DatapoolClient(
    baseUri: 'https://api.datapool...',
    username: 'my-username',
    password: '******',
    timeout: 10 // optional
);

// you can now request any endpoint which needs authentication
$client->request('GET', '/api/something', $options);
```

Akten
-----

[](#akten)

In your code you should type-hint to `Datana\Datapool\Api\AktenApiInterface`

### Search by string (`string`)

[](#search-by-string-string)

```
use Datana\Datapool\Api\AktenApi;
use Datana\Datapool\Api\DatapoolClient;

$client = new DatapoolClient(/* ... */);

$aktenApi = new AktenApi($client);
$response = $aktenApi->search('MySearchTerm');
```

### Get by Aktenzeichen (`string`)

[](#get-by-aktenzeichen-string)

```
use Datana\Datapool\Api\AktenApi;
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\Domain\Value\DatapoolId;

$client = new DatapoolClient(/* ... */);

$aktenApi = new AktenApi($client);
$response = $aktenApi->getByAktenzeichen('1abcde-1234-5678-Mustermann');

/*
 * to get the DatapoolId transform the response to array
 * and use the 'id' key.
 */
$akten = $response->toArray();
$datapoolId = DatapoolId::fromInt($akte['id']);
```

### Get by Fahrzeug-Identifikationsnummer (`string`)

[](#get-by-fahrzeug-identifikationsnummer-string)

```
use Datana\Datapool\Api\AktenApi;
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\Domain\Value\DatapoolId;

$client = new DatapoolClient(/* ... */);

$aktenApi = new AktenApi($client);
$response = $aktenApi->getByFahrzeugIdentifikationsnummer('ABC1234ABCD123456');

/*
 * to get the DatapoolId transform the response to array
 * and use the 'id' key.
 */
$akten = $response->toArray();
$datapoolId = DatapoolId::fromInt($akte['id']);
```

### Get one by Aktenzeichen (`string`) or get an exception

[](#get-one-by-aktenzeichen-string-or-get-an-exception)

```
use Datana\Datapool\Api\AktenApi;
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\Domain\Value\DatapoolId;

$client = new DatapoolClient(/* ... */);

$aktenApi = new AktenApi($client);

// is an instance of AktenResponse
$result = $aktenApi->getOneByAktenzeichen('1abcde-1234-5678-Mustermann');
/*
 * $response->toArray():
 *   [
 *     'id' => 123,
 *     ...
 *   ]
 *
 * or use the dedicated getter methods like
 *  - getId(): DatapoolId
 * etc.
 */
```

### Get by ID (`Datana\Datapool\Api\Domain\Value\DatapoolId`)

[](#get-by-id-datanadatapoolapidomainvaluedatapoolid)

```
use Datana\Datapool\Api\AktenApi;
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\Domain\Value\DatapoolId;

$client = new DatapoolClient(/* ... */);

$aktenApi = new AktenApi($client);

$id = DatapoolId::fromInt(123);

$aktenApi->getById($id);
```

### Get KT Akten Info (`Datana\Datapool\Api\Domain\Value\DatapoolId`)

[](#get-kt-akten-info-datanadatapoolapidomainvaluedatapoolid)

```
use Datana\Datapool\Api\AktenApi;
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\Domain\Value\DatapoolId;

$client = new DatapoolClient(/* ... */);

$aktenApi = new AktenApi($client);

$id = DatapoolId::fromInt(123);

// is an instance of KtAktenInfoResponse
$result = $aktenApi->getKtAktenInfo($id);
/*
 * $response->toArray():
 *   [
 *     'id' => 123,
 *     'url' => 'https://projects.knowledgetools.de/rema/?tab=akten&akte=4528',
 *     'instance' => 'rema',
 *     'group' => 'GARA',
 *   ]
 *
 * or use the dedicated getter methods like
 *  - getId()
 *  - getUrl()
 *  - getInstance()
 *  - getGroup()
 * etc.
 */
```

### Get E-Termin Info (`Datana\Datapool\Api\Domain\Value\DatapoolId`)

[](#get-e-termin-info-datanadatapoolapidomainvaluedatapoolid)

```
use Datana\Datapool\Api\AktenApi;
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\Domain\Value\DatapoolId;

$client = new DatapoolClient(/* ... */);

$aktenApi = new AktenApi($client);

$id = DatapoolId::fromInt(123);

/* @var $response Datana\Datapool\Api\Domain\Response\EterminInfoResponse */
$response = $aktenApi->getETerminInfo($id);
/*
 * $response->toArray():
 *   [
 *     'service_id' => 123,
 *     'service_url' => 'https://www.etermin.net/Gansel-Rechtsanwaelte/serviceid/123',
 *   ]
 *
 * or use the dedicated getter methods like
 *  - getServiceId()
 *  - getServiceUrl()
 * etc.
 */
```

### Get SimplyBook Info (`Datana\Datapool\Api\Domain\Value\DatapoolId`)

[](#get-simplybook-info-datanadatapoolapidomainvaluedatapoolid)

```
use Datana\Datapool\Api\AktenApi;
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\Domain\Value\DatapoolId;

$client = new DatapoolClient(/* ... */);

$aktenApi = new AktenApi($client);

$id = DatapoolId::fromInt(123);

/* @var $response Datana\Datapool\Api\Domain\Response\SimplyBookInfoResponse */
$response = $aktenApi->getETerminInfo($id);
/*
 * $response->toArray():
 *   [
 *     'service_id' => 12,
 *     'service_url' => 'https://ganselrechtsanwaelteag.simplybook.it/v2/#book/service/12/count/1/provider/any/',
 *   ]
 *
 * or use the dedicated getter methods like
 *  - getServiceId()
 *  - getServiceUrl()
 * etc.
 */
```

### Set value "Nutzer Mandantencockpit" (`bool`)

[](#set-value-nutzer-mandantencockpit-bool)

```
use Datana\Datapool\Api\AktenApi;
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\Domain\Value\DatapoolId;

$client = new DatapoolClient(/* ... */);

$aktenApi = new AktenApi($client);

$id = DatapoolId::fromInt(123);

$aktenApi->setValueNutzerMandantencockpit($id, true); // or false
```

Aktenzeichen
------------

[](#aktenzeichen)

In your code you should type-hint to `Datana\Datapool\Api\AktenzeichenApiInterface`

### Get a new one

[](#get-a-new-one)

```
use Datana\Datapool\Api\AktenzeichenApi;
use Datana\Datapool\Api\DatapoolClient;

$client = new DatapoolClient(/* ... */);

$aktenzeichenApi = new AktenzeichenApi($client);
$aktenzeichenApi->new(); // returns sth like "6GU5DCB"
```

AktenEventLog
-------------

[](#akteneventlog)

In your code you should type-hint to `Datana\Datapool\Api\AktenEventLogApiInterface`

### Create a new log

[](#create-a-new-log)

```
use Datana\Datapool\Api\AktenEventLogApi;
use Datana\Datapool\Api\DatapoolClient;

$client = new DatapoolClient(/* ... */);

$aktenEventLog = new AktenEventLogApi($client);
$aktenEventLog->log(
    key: 'email.sent',
    aktenzeichen: '1234/12',
    info: 'E-Mail versendet',
    timestamp: new \DateTimeImmutable(), // Zeitpunkt des Events
    creator: 'Mein Service',             // Ersteller des Events
);
```

SystemEventLog
--------------

[](#systemeventlog)

In your code you should type-hint to `Datana\Datapool\Api\SystemEventLogApiInterface`

### Create a new log

[](#create-a-new-log-1)

```
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\SystemEventLogApi;

$client = new DatapoolClient(/* ... */);

$systemEventLog = new SystemEventLogApi($client);
$systemEventLog->log(
    key: 'received.webhook',
    info: 'Webhook received on /api/cockpit/DAT-changed',  // Info-Text
    timestamp: new \DateTimeImmutable(),                   // Zeitpunkt des Events
    creator: 'Mein Service',                               // Ersteller des Events
    context: ['foo' => 'bar'],                             // Kontext (optional)
    ttl: '+2 months',                                      // Gültigkeitsdauer im strtotime Format (optional)
);
```

The API internally converts the "+2 months" to a datetime object. If this datetime is reached, Datapool will delete the log entry. Pass `null` to keep the log entry forever.

ChatProtocol
------------

[](#chatprotocol)

In your code you should type-hint to `Datana\Datapool\Api\ChatProtocolApiInterface`

### Save a new chat protocol

[](#save-a-new-chat-protocol)

```
use Datana\Datapool\Api\ChatProtocolApi;
use Datana\Datapool\Api\DatapoolClient;

$client = new DatapoolClient(/* ... */);

$chatProtocol = new ChatProtocolApi($client);
$chatProtocol->log(
    '1234/12',                // Aktenzeichen
    '123456',                 // Conversation ID
    array(/*...*/),           // Das JSON der Intercom conversation
    new \DateTimeImmutable(), // Startzeitpunkt der Conversation
);
```

KnowledgeTools
--------------

[](#knowledgetools)

In your code you should type-hint to `Datana\Datapool\Api\KnowledgeToolsApiInterface`

### Get Fieldvalue by Instance and OID

[](#get-fieldvalue-by-instance-and-oid)

```
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\KnowledgeToolsApi;

$client = new DatapoolClient(/* ... */);

$api = new KnowledgeToolsApi($client);
$api->getFieldvalueByInstanceAndOid(
    instance: 'my-instance',
    oid: 123456,
    fieldhash: 'abcdefghi',
);
```

### Get Fieldvalue by Aktenzeichen

[](#get-fieldvalue-by-aktenzeichen)

```
use Datana\Datapool\Api\DatapoolClient;
use Datana\Datapool\Api\KnowledgeToolsApi;

$client = new DatapoolClient(/* ... */);

$api = new KnowledgeToolsApi($client);
$api->getFieldvalueByAktenzeichen(
    oid: '1abcde-1234-5678-Mustermann',
    fieldhash: 'abcdefghi',
);
```

###  Health Score

45

—

FairBetter than 92% of packages

Maintenance58

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 74.4% 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 ~25 days

Recently: every ~15 days

Total

26

Last Release

898d ago

Major Versions

1.11.3 → 2.6.02022-02-28

2.7.0 → 3.0.02022-03-09

PHP version history (2 changes)1.11.2PHP &gt;=7.4

3.9.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b0aaaa249bfef22b586e459b3fd8687e58644fb6223ffe8e4e709ac05be704d?d=identicon)[OskarStark](/maintainers/OskarStark)

---

Top Contributors

[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (29 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![igst](https://avatars.githubusercontent.com/u/5346377?v=4)](https://github.com/igst "igst (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/datana-gmbh-datapool-api/health.svg)

```
[![Health](https://phpackages.com/badges/datana-gmbh-datapool-api/health.svg)](https://phpackages.com/packages/datana-gmbh-datapool-api)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k69](/packages/humbug-box)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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