PHPackages                             gschurgast/eudr-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. gschurgast/eudr-api-client

ActiveLibrary[API Development](/categories/api)

gschurgast/eudr-api-client
==========================

Minimal EUDR SOAP client utilities and functional test

v1.0.7(4mo ago)03.2k↓50%MITPHPPHP &gt;=8.1

Since Oct 23Pushed 4mo agoCompare

[ Source](https://github.com/gschurgast/eudr-api-client)[ Packagist](https://packagist.org/packages/gschurgast/eudr-api-client)[ RSS](/packages/gschurgast-eudr-api-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (10)Used By (0)

EUDR API SOAP Client (PHP)
==========================

[](#eudr-api-soap-client-php)

This repository provides a minimal, typed PHP client for the European Union Deforestation Regulation (EUDR) SOAP services. It exposes small service classes, request/response DTOs, and a functional PHPUnit test. Internally it uses JMS Serializer for consistent array&lt;-&gt;object transformations instead of ad‑hoc toArray/fromSoap code.

What's included
---------------

[](#whats-included)

- Services (src/Services):
    - EudrEchoClient
    - EudrSubmissionClient
    - EudrRetrievalClient
    - EudrClient facade to access the right service by ModeEnum
- Request/Response DTOs (src/Dto) with JMS Serializer attributes
    - Requests: SubmitDdsRequest, AmendDdsRequest, GetDdsInfoRequest, GetStatementByIdentifiersRequest, GetReferenceDdsRequest, etc.
    - Responses: TestEchoResponse, SubmitDdsResponse, AmendDdsResponse, RetractDdsResponse, GetDdsInfoResponse, GetStatementByIdentifiersResponse, GetReferenceDdsResponse
    - Typed sub-objects in src/Dto/Type (StatementType, CommodityType, OperatorType, StatusType, ...)
- Functional tests using PHPUnit: tests/Functional/DemoTest.php

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

[](#requirements)

- PHP &gt;= 8.1
- ext-soap, ext-dom
- Composer

Install
-------

[](#install)

- make init

Running tests or acceptance tests
---------------------------------

[](#running-tests-or-acceptance-tests)

- Edit your .env file to provide your credentials.

```
EUDR_USERNAME=your-username
EUDR_PASSWORD=your-password

```

- make test

Create an EUDR client
---------------------

[](#create-an-eudr-client)

- Choose the environment via src\\Enum\\EnvironmentEnum (ACCEPTANCE or PRODUCTION).
- Provide your credentials via environment variables (recommended for local dev put them in a .env file at the project root):
- Instantiate the high-level client and pass credentials read from env:

```
$client = new EudrClient(getenv('EUDR_USERNAME'), getenv('EUDR_PASSWORD'), EnvironmentEnum::ACCEPTANCE);

```

Usage examples
--------------

[](#usage-examples)

### Echo

[](#echo)

```
$echoReq = new TestEchoRequest();
$echoReq->query = "My test query"
$testEchoResponse = $client->getClient(ModeEnum::ECHO)->testEcho($echoReq);

```

### Submit

[](#submit)

#### Submit DDS Request

[](#submit-dds-request)

```
$submitReq = new SubmitDdsRequest();
$submitReq->operatorType = OperatorTypeEnum::OPERATOR;
$submitReq->statement = new StatementType();
...
$submitDdsResponse = $client->getClient(ModeEnum::SUBMISSION)->submitDds($submitReq);

```

#### Amend DDS Request

[](#amend-dds-request)

```
$amendReq = new AmendDdsRequest();
$amendReq->ddsIdentifier = {{}};
$amendReq->statement = new StatementType();
...
$amendDdsResponse = $client->getClient(ModeEnum::SUBMISSION)->amendDds($amendReq);

```

#### Retract DDS Request

[](#retract-dds-request)

```
$retractReq = new AmendDdsRequest();
$retractReq->ddsIdentifier = {{}};
$retractReq->reason = "Reason of retractation";
$retractDdsResponse = $client->getClient(ModeEnum::SUBMISSION)->retractDds($retractReq);

```

### Retrieval

[](#retrieval)

#### Get DDS Info Request

[](#get-dds-info-request)

```
$getDDSInfoReq = new GetDdsInfoRequest
$getDDSInfoReq->identifier = {{}};
$getDDSInfoResponse = $client->getClient(ModeEnum::RETRIEVAL)->getDdsInfo($getDDSInfoReq);

```

#### Get DDS Info by Internal Reference Number

[](#get-dds-info-by-internal-reference-number)

```
$getDDSInfoByInternalRefReq = new GetDdsInfoByInternalReferenceNumberRequest
$getDDSInfoByInternalRefReq->identifier = {{}};
$getDDSInfoByInternalRefResponse = $client->getClient(ModeEnum::RETRIEVAL)->getDdsInfoByInternalReferenceNumber($getDDSInfoReq);

```

##### Get Statement by DDS Identifier

[](#get-statement-by-dds-identifier)

```
$getStatementByIdentifierReq = new GetStatementByIdentifiersRequest
$getStatementByIdentifierReq->referenceNumber = {{}};
$getStatementByIdentifierReq->verificationNumber = {{}};
$getStatementByIdentifierResponse = $client->getClient(ModeEnum::RETRIEVAL)->getStatementByIdentifiers($getDDSInfoReq);

```

#### Get Reference DDS (No test has been performed on this method)

[](#get-reference-dds-no-test-has-been-performed-on-this-method)

```
$getReferenceDDSReq = new GetReferenceDdsRequest
$getReferenceDDSReq->referenceNumber = {{}};
$getReferenceDDSReq->referenceDdsVerificationNumber = {{}};
$getReferenceDDSResponse = $client->getClient(ModeEnum::RETRIEVAL)->getReferencedDds($getDDSInfoReq);

```

Functional tests
----------------

[](#functional-tests)

- tests/Functional/DemoTest.php builds DTOs from fixtures (tests/fixtures/payloads.yaml) and can perform real calls when credentials are valid.
- Use composer run test:functional to execute the suite.

Notes
-----

[](#notes)

- EudrEchoClient operations must not be used in production environments per EUDR rules.
- Service methods return dedicated Response DTOs mapping SOAP responses to typed PHP objects.

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance74

Regular maintenance activity

Popularity22

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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 ~9 days

Recently: every ~14 days

Total

8

Last Release

146d ago

### Community

Maintainers

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

---

Top Contributors

[![gschurgast](https://avatars.githubusercontent.com/u/86120452?v=4)](https://github.com/gschurgast "gschurgast (19 commits)")

---

Tags

apiclientsoapEUDR

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gschurgast-eudr-api-client/health.svg)

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

###  Alternatives

[codedredd/laravel-soap

A SoapClient wrapper integration for Laravel

221516.6k3](/packages/codedredd-laravel-soap)[smnandre/pagespeed-api

PageSpeed Insight PHP Api Client 🚀 Analyse web pages for performances metrics, core web vitals...

1511.5k](/packages/smnandre-pagespeed-api)

PHPackages © 2026

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