PHPackages                             affiliateforge/php-admitad-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. [API Development](/categories/api)
4. /
5. affiliateforge/php-admitad-api

ActiveLibrary[API Development](/categories/api)

affiliateforge/php-admitad-api
==============================

Provides Admitad API

v1.0.12(1y ago)51261[2 PRs](https://github.com/affiliateforge/php-admitad-api/pulls)MITPHPPHP ^8.1

Since Apr 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/affiliateforge/php-admitad-api)[ Packagist](https://packagist.org/packages/affiliateforge/php-admitad-api)[ RSS](/packages/affiliateforge-php-admitad-api/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (6)Versions (18)Used By (0)

php-admitad-api
===============

[](#php-admitad-api)

The package provides [Admitad API Client](https://developers.admitad.com/hc/en-us/articles/7981317512337-Introduction).

Requirements
============

[](#requirements)

- `php ^8.1`
- any implementation for PSR-18 `Client Interface`. For example, `symfony/http-client`

Installation
============

[](#installation)

`composer require affiliateforge/php-admitad-api`

Usage
=====

[](#usage)

### Example

[](#example)

For example, to get a list of coupons for a website, you first need to get an authorization token, and then use your token to get a list of coupons. The code for these requests will look like this

```
$api = new \Affiliateforge\PhpAdmitadApi\APIClient();

$clientID = '777xyz';
$authHash = 'XE5NVl0bU5NcQ==';
$scopes = ['coupons'];

$getTokenCmd = new \Affiliateforge\PhpAdmitadApi\Api\Endpoints\ClientAuthorization\GetToken($clientID, $scopes);
$getTokenResponse = $api->doRequest($getTokenCmd, [
    'Authorization' => 'Basic ' . $authHash,
]);

$headers = [
    'Authorization' => 'Bearer ' . $getTokenResponse->getAccessToken(),
];
$couponsCmd = new \Affiliateforge\PhpAdmitadApi\Api\Endpoints\Coupons\GetList(limit: 1);
$couponsResponse = $api->doRequest($couponsCmd, $headers);

var_dump($couponsResponse->getResults());

```

### Description

[](#description)

The package provides DTO objects for each (not yet) endpoint in the API. These DTO objects are distributed by namespace in accordance with their description in the documentation.

Each such DTO accepts in the constructor all the parameters that the endpoint can accept (from the documentation). They will be substituted when the request is executed in the right place (query parameters or the request body). In response, you will receive a DTO that has getters for each response field from the documentation.

To execute a request, you must create an DTO object and pass it to the `Affiliateforge\PhpAdmitadApi\APIClient` class in the `doRequest(CommandDTO $command, array $headers = []): ResponseDTO`.

Many API endpoints require a token to be specified in the authorization headers. Headers are passed in the `$headers` parameter of the `doRequest` method.

To receive a token, you should use the DTO `Affiliateforge\PhpAdmitadApi\Api\Endpoints\ClientAuthorization\GetToken`. In the constructor you should specify the `clientID` and the requested scopes. In response, you will receive a DTO for this endpoint, from which you can receive the token itself.

Then, you must pass this token in the `Authorization` header for every request for other endpoints.

### APIClient Configuration

[](#apiclient-configuration)

You can pass any implementation of the PSR-18 `Client Interface` when creating a `APIClient` object. If no implementation is passed, the package will try to find one in your dependencies using the package `php-http/discovery`.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

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

Total

13

Last Release

698d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/154636973?v=4)[Stanislav Surskii](/maintainers/forgeworker)[@forgeworker](https://github.com/forgeworker)

---

Top Contributors

[![postfriday](https://avatars.githubusercontent.com/u/888136?v=4)](https://github.com/postfriday "postfriday (20 commits)")[![kvatra](https://avatars.githubusercontent.com/u/23643570?v=4)](https://github.com/kvatra "kvatra (9 commits)")

---

Tags

admitadadmitad api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/affiliateforge-php-admitad-api/health.svg)

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

###  Alternatives

[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k28.0M318](/packages/openai-php-client)[sylius/sylius

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

8.5k5.9M737](/packages/sylius-sylius)[deeplcom/deepl-php

Official DeepL API Client Library

2607.3M113](/packages/deeplcom-deepl-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3856.2M31](/packages/gotenberg-gotenberg-php)

PHPackages © 2026

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