PHPackages                             retailcrm/aliexpress-top-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. [HTTP &amp; Networking](/categories/http)
4. /
5. retailcrm/aliexpress-top-client

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

retailcrm/aliexpress-top-client
===============================

API client implementation for AliExpress TOP.

v1.1.2(4y ago)32857[1 issues](https://github.com/retailcrm/aliexpress-top-client/issues)MITPHPPHP &gt;=7.3.0

Since Oct 20Pushed 4y ago2 watchersCompare

[ Source](https://github.com/retailcrm/aliexpress-top-client)[ Packagist](https://packagist.org/packages/retailcrm/aliexpress-top-client)[ Docs](http://www.retailcrm.pro/)[ RSS](/packages/retailcrm-aliexpress-top-client/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (26)Versions (9)Used By (0)

[![Build Status](https://github.com/retailcrm/aliexpress-top-client/workflows/ci/badge.svg)](https://github.com/retailcrm/aliexpress-top-client/actions)[![Coverage](https://camo.githubusercontent.com/8fb2283c5c2e5d259319eaea63efffa2221464fc15b0c924b7753a0d6363b585/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f72657461696c63726d2f616c69657870726573732d746f702d636c69656e742f6d61737465722e7376673f6c6f676f3d636f6465636f76)](https://codecov.io/gh/retailcrm/aliexpress-top-client)[![Latest stable](https://camo.githubusercontent.com/d00a7b03bb722adad36d64e2b8be4efa94dffc6b7b5634add925335a70f83300/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72657461696c63726d2f616c69657870726573732d746f702d636c69656e742e737667)](https://packagist.org/packages/retailcrm/aliexpress-top-client)[![PHP from Packagist](https://camo.githubusercontent.com/a2321d32bd93d6f6a4ac479df3149d89c9625cbe9019fb89bbde1de1b95b2027/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f72657461696c63726d2f616c69657870726573732d746f702d636c69656e742e737667)](https://packagist.org/packages/retailcrm/aliexpress-top-client)

AliExpress TOP API client
=========================

[](#aliexpress-top-api-client)

API client implementation for AliExpress TOP.

Usage
-----

[](#usage)

1. This library uses `php-http/httplug` under the hood. If you don't want to bother with details, just install library and it's dependencies via Composer:

```
composer require php-http/curl-client nyholm/psr7 php-http/message retailcrm/aliexpress-top-client
```

Details about those third-party libraries and why you need to install them can be found [here](http://docs.php-http.org/en/latest/httplug/users.html).

2. Instantiate client using `TopClientFactory`:

```
use RetailCrm\Component\AppData;
use RetailCrm\Factory\TopClientFactory;

$client = TopClientFactory::createClient(
    AppData::OVERSEAS_ENDPOINT,
    'appKey',
    'appSecret',
    'session token here'
);
```

3. Create and fill request data. All requests and responses use the same naming: part of the namespace is the first word in the request name, and everything else is in the request DTO class name. Requests live under `RetailCrm\Model\Request` namespace, and responses can be found in the `RetailCrm\Model\Response` namespace. Let's use `taobao.httpdns.get` request as an example. It's first word is the `taobao`, so, this request can be found under `RetailCrm\Model\Request\Taobao` namespace, and it's class name is `HttpDnsGetRequest`. You can instantiate it with this code:

```
use RetailCrm\Model\Request\Taobao\HttpDnsGetRequest;

$request = new HttpDnsGetRequest();
```

4. Send request using `TopClient::sendRequest` or `TopClient::sendAuthenticatedRequest` (you can't send authenticated request using client without authenticator). `taobao.httpdns.get` can be sent like this:

```
/** @var \RetailCrm\Model\Response\Taobao\HttpDnsGetResponse $response */
$response = $client->sendRequest(new HttpDnsGetRequest());
```

This particular request doesn't require authorization, so, it can be sent via `TopClient::sendRequest` method. For any other requests which require authorization you must use `TopClient::sendAuthenticatedRequest` method (an example of such request would be `aliexpress.solution.seller.category.tree.query`, which class FQN is `\RetailCrm\Model\Request\AliExpress\SolutionSellerCategoryTreeQuery`).

**Friendly note.** Use response type annotations. Both client methods which returns responses actually returns `ResponseInterface` (not the PSR one). Actual response type will be determined by the request model. Your IDE will not recognize any response options unless you put a proper type annotation for the response variable.

Customization
-------------

[](#customization)

This library uses Container pattern under the hood. You can pass additional dependencies using `ContainerBuilder`. For example:

```
use Http\Client\Curl\Client;
use RetailCrm\Component\AppData;
use RetailCrm\Component\Environment;
use Nyholm\Psr7\Factory\Psr17Factory;
use RetailCrm\Builder\TopClientBuilder;
use RetailCrm\Builder\ContainerBuilder;
use RetailCrm\Component\Logger\StdoutLogger;
use RetailCrm\Component\Authenticator\TokenAuthenticator;

$client = new Client();
$logger = new StdoutLogger();
$factory = new Psr17Factory();
$authenticator = new TokenAuthenticator('token');
$appData = new AppData(AppData::OVERSEAS_ENDPOINT, 'appKey', 'appSecret');
$container = ContainerBuilder::create()
            ->setEnv(Environment::TEST)
            ->setClient($client)
            ->setLogger($logger)
            ->setStreamFactory($factory)
            ->setRequestFactory($factory)
            ->setUriFactory($factory)
            ->build();
$client = TopClientBuilder::create()
            ->setContainer($container)
            ->setAppData($appData)
            ->build();
```

Logger should implement `Psr\Log\LoggerInterface` (PSR-3), HTTP client should implement `Psr\Http\TopClient\TopClientInterface` (PSR-18), HTTP objects must be compliant to PSR-7. You can use your own container if you want to - it must be compliant to PSR-11. This is strongly discouraged because it'll be much easier to just integrate library with your own application, and your own DI system.

The simplest example of client initialization without using `TopClientFactory` looks like this:

```
use RetailCrm\Component\AppData;
use RetailCrm\Builder\TopClientBuilder;
use RetailCrm\Builder\ContainerBuilder;
use RetailCrm\Component\Authenticator\TokenAuthenticator;

$appData = new AppData(AppData::OVERSEAS_ENDPOINT, 'appKey', 'appSecret');
$client = TopClientBuilder::create()
            ->setContainer(ContainerBuilder::create()->build())
            ->setAppData($appData)
            ->setAuthenticator(new TokenAuthenticator('session token here'))
            ->build();
```

In fact, `TopClientFactory` works just like this under the hood.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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 ~37 days

Recently: every ~47 days

Total

8

Last Release

1768d ago

### Community

Maintainers

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

---

Top Contributors

[![Neur0toxine](https://avatars.githubusercontent.com/u/24733820?v=4)](https://github.com/Neur0toxine "Neur0toxine (54 commits)")[![gwinn](https://avatars.githubusercontent.com/u/477726?v=4)](https://github.com/gwinn "gwinn (7 commits)")[![AlexBergal](https://avatars.githubusercontent.com/u/53344575?v=4)](https://github.com/AlexBergal "AlexBergal (2 commits)")[![iyzoer](https://avatars.githubusercontent.com/u/25742344?v=4)](https://github.com/iyzoer "iyzoer (2 commits)")[![altqq885](https://avatars.githubusercontent.com/u/11505508?v=4)](https://github.com/altqq885 "altqq885 (1 commits)")

---

Tags

apirestretailCRMAliexpress

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/retailcrm-aliexpress-top-client/health.svg)

```
[![Health](https://phpackages.com/badges/retailcrm-aliexpress-top-client/health.svg)](https://phpackages.com/packages/retailcrm-aliexpress-top-client)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[retailcrm/api-client-php

PHP client for RetailCRM API

68981.8k1](/packages/retailcrm-api-client-php)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k63.6M233](/packages/nelmio-api-doc-bundle)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k48.1M236](/packages/api-platform-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)

PHPackages © 2026

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