PHPackages                             chuckbe/dokapi-laravel-sdk - 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. chuckbe/dokapi-laravel-sdk

ActiveLibrary[API Development](/categories/api)

chuckbe/dokapi-laravel-sdk
==========================

A Laravel package to consume the Dokapi API.

v1.0.4(3mo ago)0103MITPHPPHP ^8.0

Since Dec 23Pushed 3mo agoCompare

[ Source](https://github.com/chuckbe/dokapi-laravel-sdk)[ Packagist](https://packagist.org/packages/chuckbe/dokapi-laravel-sdk)[ Docs](https://github.com/chuckbe/dokapi-laravel-sdk)[ RSS](/packages/chuckbe-dokapi-laravel-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (12)Versions (6)Used By (0)

Dokapi Laravel SDK
------------------

[](#dokapi-laravel-sdk)

This package consumes the Dokapi API.

### Installation

[](#installation)

```
composer require chuckbe/dokapi-laravel-sdk

```

### Publish

[](#publish)

Publish the config file with:

```
php artisan vendor:publish --tag="dokapi"

```

### Configuration &amp; Environment

[](#configuration--environment)

```
return [
    'api_endpoint' => env('DOKAPI_API_ENDPOINT', 'https://peppol-api.dokapi-stg.io'),
    'oauth2_api_endpoint' => env('DOKAPI_OAUTH2_API_ENDPOINT', 'https://ixordocs.apiable.io/api/oauth2/token'),
    'client_id' => env('DOKAPI_CLIENT_ID'),
    'client_secret' => env('DOKAPI_CLIENT_SECRET'),
];
```

> Make sure to set up your environment variables and modify where necessary.

### Usage

[](#usage)

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->lookup->find('0208:0553792301');
```

### Endpoints

[](#endpoints)

#### Lookup

[](#lookup)

This endpoint is to lookup participants in the SML (or SMK - test).

Parameters:

- `string $value` :: The participant identifier to lookup.

> For scheme ‘iso6523-actorid-upis’ the values should adhere to the ‘ISO/IEC 6523’ standard with a semicolon seperator. [See full list of ICD’s](https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/). The value is a combination of an International Code Designator (ICD) and an organization ID. For instance, for Belgian companies, the ICD value is 0208 and the organization ID is the KBO number. Example: 0208:0123456789

- `?string $scheme` :: This parameter specifies the identification scheme. It is optional and defaults to iso6523-actorid-upis.

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->lookup->find('0208:0553792301');
```

Response: `Dokapi\Api\Resources\Lookup`

#### Participant registration

[](#participant-registration)

This endpoint is to register and deregister participants their business cards and document types.

##### Page

[](#page)

This will a paginated list of participant registrations registered by this client.

Parameters:

- `?string $from = null` :: From what key shall participants be returned
- `?int $limit = null` :: How many items on a page

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->participantRegistations->page();
```

Response: `Dokapi\Api\Resources\ParticipantRegistrationCollection`

##### All

[](#all)

This will get all participant registrations registered by this client.

Parameters:

- `?string $from = null` :: From what key shall participants be returned
- `?int $limit = null` :: How many items should be returned

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->participantRegistations->page();
```

Response: `Dokapi\Api\Resources\ParticipantRegistrationCollection`

##### Find

[](#find)

This will search for a participant registration registered by this client. This will not perform a full lookup.

Parameters:

- `string $value` :: The participant identifier to lookup.

> For scheme ‘iso6523-actorid-upis’ the values should adhere to the ‘ISO/IEC 6523’ standard with a semicolon seperator. [See full list of ICD’s](https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/). The value is a combination of an International Code Designator (ICD) and an organization ID. For instance, for Belgian companies, the ICD value is 0208 and the organization ID is the KBO number. Example: 0208:0123456789

- `?string $scheme` :: This parameter specifies the identification scheme. It is optional and defaults to iso6523-actorid-upis.

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->participantRegistations->find('0208:0553792301');
```

Response: `Dokapi\Api\Resources\ParticipantRegistrationCollection`

##### Create

[](#create)

This will create a participant registration for this client.

Parameters:

- `array $data` :: The array should exist out of the participant identifier, the country code and the business card info.

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->participantRegistrations->create([
    'participantIdentifier' => '0208:0553792301',
    'countryCode' => 'BE',
    'businessCardInfo' => [
        'name' => 'Company Name',
        'iso3166Alpha2CountryCode' => 'BE',
        'registrationDate' => now('UTC')->format('Y-m-d\TH:i:s.v\Z'),
    ]
]);
```

Response: `Dokapi\Api\Resources\ParticipantRegistration`

##### Business card

[](#business-card)

This will perform a full replace of a participant's business card.

Parameters:

- `array $data` :: The array should exist out of the participant identifier and the business card info.

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->participantRegistrations->businessCard([
    'participantIdentifier' => '0208:0553792301',
    'businessCardInfo' => [
        'name' => 'Company Name',
        'iso3166Alpha2CountryCode' => 'BE',
        'registrationDate' => now('UTC')->format('Y-m-d\TH:i:s.v\Z'),
    ]
]);
```

Response: `Dokapi\Api\Resources\Status`

##### Register document type

[](#register-document-type)

This will register a document type for a participant.

Parameters:

- `array $data` :: The array should exist out of the participant identifier, document type identifier and the process identifier.

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->participantRegistrations->registerDocumentType([
    'participantIdentifier' => [
        'scheme' => 'iso6523-actorid-upis', //optional
        'value' => '0208:0553792301'
    ],
    'documentTypeIdentifier' => [
        'scheme' => 'busdox-docid-qns',
        'value' => 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1'
    ],
    'processIdentifier' => [
        'scheme' => 'cenbii-procid-ubl',
        'value' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'
    ]
]);
```

Response: `Dokapi\Api\Resources\Status`

##### Deregister document type

[](#deregister-document-type)

This will deregister a document type for a participant.

Parameters:

- `array $data` :: The array should exist out of the participant identifier and document type identifier.

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->participantRegistrations->deregisterDocumentType([
    'participantIdentifier' => [
        'scheme' => 'iso6523-actorid-upis', //optional
        'value' => '0208:0553792301'
    ],
    'documentTypeIdentifier' => [
        'scheme' => 'busdox-docid-qns',
        'value' => 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1'
    ]
]);
```

Response: `Dokapi\Api\Resources\Status`

#### Incoming document

[](#incoming-document)

##### Confirm download

[](#confirm-download)

This endpoint will confirm Dokapi of the download of a file.

Parameters:

- `string $documentUlid` :: The document ulid that was given upon receival of the webhook.

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->incomingDocuments->confirm($documentUlid);
```

Response: `Dokapi\Api\Resources\IncomingDocument`

##### Generate presigned url

[](#generate-presigned-url)

This endpoint will generate a new pre signed url if the existing one has been expired.

Parameters:

- `string $documentUlid` :: The document ulid that was given upon receival of the webhook.

Example:

```
use Dokapi\Facades\Dokapi;

Dokapi::api()->incomingDocuments->generatePresignedUrl($documentUlid);
```

Response: `Dokapi\Api\Resources\IncomingDocument`

#### Outgoing document

[](#outgoing-document)

##### Create

[](#create-1)

This endpoint will create a new outgoing document.

Parameters:

- `array $data` :: Look at example...

Example:

```
Dokapi::api()->outgoingDocuments->create([
    'sender' => [
        'scheme' => 'iso6523-actorid-upis', //optional
        'value' => '0208:0553792301'
    ],
    'receiver' => [
        'scheme' => 'iso6523-actorid-upis', //optional
        'value' => '0208:0123456789'
    ],
    'c1CountryCode' => 'BE',
    'documentTypeIdentifier' => [
        'scheme' => 'busdox-docid-qns',
        'value' => 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1'
    ],
    'processIdentifier' => [
        'scheme' => 'cenbii-procid-ubl',
        'value' => 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'
    ],
    'externalReference' => $documentToBeSent->id, // this is our internal reference of the document to be sent
]);
```

Response: `Dokapi\Api\Resources\OutgoingDocument`

#### Webhook

[](#webhook)

##### All

[](#all-1)

This endpoint lists all webhooks registered.

Example:

```
Dokapi::api()->webhooks->all();
```

Response: `Dokapi\Api\Resources\WebhookCollection`

##### Create

[](#create-2)

This endpoint creates a webhook, this can be for multiple events. Possible events: 'outgoing-peppol-documents.sent', 'incoming-peppol-documents.received', 'client.cancellation'.

Parameters:

- `array $data` :: The data consisting of an url and an array of events.

Example:

```
Dokapi::api()->webhooks->create([
    'url' => 'https://peppol.com/webhook',
    'events' => ['outgoing-peppol-documents.sent'],
]);
```

Response: `Dokapi\Api\Resources\Webhook` :: Response will contain a ulid string; store this, you'll need if you want to remove the webhook.

##### Delete

[](#delete)

This endpoint deletes a webhook.

Parameters:

- `string $ulid` :: The ulid of the webhook that you want to delete.

Example:

```
Dokapi::api()->webhooks->delete($ulid);
```

Response: `Dokapi\Api\Resources\Status`

##### Secret

[](#secret)

This endpoint generates a webhook secret. In case you need a new key, rerun this operation to invalidate the previous key and regenerate a new one.

Example:

```
Dokapi::api()->webhooks->secret();
```

Response: `Dokapi\Api\Resources\Status` :: Store the message as the webhook secret key and use to validate webhooks.

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance87

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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

Every ~10 days

Total

5

Last Release

95d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5599ac2c2c73cedb92bd392657a3f13f3b01bc982ab75b4b84a90417ee1edaef?d=identicon)[KarelBrijs](/maintainers/KarelBrijs)

---

Top Contributors

[![KarelBrijs](https://avatars.githubusercontent.com/u/16884712?v=4)](https://github.com/KarelBrijs "KarelBrijs (6 commits)")

---

Tags

phplaravelsdkpeppoldokapi

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/chuckbe-dokapi-laravel-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/chuckbe-dokapi-laravel-sdk/health.svg)](https://phpackages.com/packages/chuckbe-dokapi-laravel-sdk)
```

###  Alternatives

[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[gemini-api-php/laravel

Gemini API client for Laravel

8915.7k](/packages/gemini-api-php-laravel)[octw/aramex

A Library to integrate with Aramex APIs

2925.2k](/packages/octw-aramex)[jetimob/asaas-sdk-php-laravel

Laravel SDK for Asaa's API

194.7k](/packages/jetimob-asaas-sdk-php-laravel)[wxm/pdd-sdk

拼多多 SDK 封装, 调用简单、语义化增强。支持 Laravel/Lumen。

154.7k](/packages/wxm-pdd-sdk)

PHPackages © 2026

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