PHPackages                             melvin-hamilton-digital/tradebyte-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. melvin-hamilton-digital/tradebyte-api

ActiveLibrary[API Development](/categories/api)

melvin-hamilton-digital/tradebyte-api
=====================================

Tradebyte API integration

0.1.1(4y ago)02MITPHPPHP &gt;=7.2

Since Aug 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/melvin-hamilton-digital/tradebyte-api)[ Packagist](https://packagist.org/packages/melvin-hamilton-digital/tradebyte-api)[ RSS](/packages/melvin-hamilton-digital-tradebyte-api/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Tradebyte API
=============

[](#tradebyte-api)

[![build](https://camo.githubusercontent.com/6b6d916d0b077d1d4c97d5d691285384a579891a38776972d780345206a6a265/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d656c76696e2d68616d696c746f6e2d6469676974616c2f7472616465627974652d6170692f504850253230436f6d706f736572)](https://github.com/melvin-hamilton-digital/tradebyte-api/actions)

API documentation
-----------------

[](#api-documentation)

Current features
----------------

[](#current-features)

- order data exchange,
- stock data exchange,
- order messages,
- product and article csv feed generation.

Example usage
-------------

[](#example-usage)

```
use GuzzleHttp\Client as HttpClient;
use MHD\Tradebyte\Api\Client as TradebyteClient;
use MHD\Tradebyte\Data\Message;
use MHD\Tradebyte\Data\MessagesList;
use MHD\Tradebyte\Data\OrdersList;
use MHD\Tradebyte\Data\Stock;

$httpClient = new HttpClient([
    'auth' => ['username', 'password'],
    'base_uri' => "http://rest.trade-server.net/{$yourAccountId}/",
]);
$tradebyteClient = new TradebyteClient($httpClient);

# process orders
$response = $orders$tradebyteClient->getOrders('chxx');
foreach (new OrdersList($response->getBody()->getContents()) as $order) {
# ...
}

# send messages
$message = new Message();
$message->setType(Message::TYPE_NO_INVENTORY);
$message->setSku('12345678');

$messagesList = new MessagesList();
$messagesList->addMessage($message);

$tradebyteClient->sendMessages($messagesList);

# send stock
$stock = new Stock();
$stock->addArticle('12345678', 0);

$tradebyteClient->sendStock($stock);
```

Product CSV feed
----------------

[](#product-csv-feed)

Library provides [`MHD\Tradebyte\Data\Csv\Product`](./src/Data/Csv/Product.php) class which is meant to be used with `symfony/serializer` in order to simplify and streamline Tradebyte product CSV feed generation.

```
use MHD\Tradebyte\Data\Csv\Product;
use Symfony\Component\Serializer\Encoder\CsvEncoder;
use Symfony\Component\Serializer\Normalizer\CustomNormalizer;
use Symfony\Component\Serializer\Serializer;

$product = new Product();
$product->id = '1234';
$product->brand = 'T-Shirts inc.';
$product->name = 'Blue T-Shirt';
$product->description = 'It\'s a t-shirt';
$product->addComponent('color', 'blue');

$serializer = new Serializer([new CustomNormalizer()], [new CsvEncoder()]);

echo $serializer->serialize([$product], 'csv');
# p_nr,p_brand,p_name,p_text,p_keywords,p_comp[color]
# 1234,"T-Shirts inc.","Blue T-Shirt","It's a t-shirt",,blue
```

Article CSV feed
----------------

[](#article-csv-feed)

Library provides [`MHD\Tradebyte\Data\Csv\Artilce`](./src/Data/Csv/Article.php) class which is meant to be used with `symfony/serializer` in order to simplify and streamline Tradebyte article CSV feed generation.

```
use MHD\Tradebyte\Data\Csv\Article;
use Symfony\Component\Serializer\Encoder\CsvEncoder;
use Symfony\Component\Serializer\Normalizer\CustomNormalizer;
use Symfony\Component\Serializer\Serializer;

$article = new Article();
$article->productId = '1234';
$article->articleId = '12345678';
$article->stock = '10';
$article->unit = Article::UNIT_PIECE;
$article->addRetailPrice('chxx', 24.99);
$article->addVatRate('chxx', Article::VAT_RATE_NORMAL);

$serializer = new Serializer([new CustomNormalizer()], [new CsvEncoder()]);

echo $serializer->serialize([$article], 'csv');
# p_nr,a_nr,a_stock,a_unit,a_weight,a_vk[chxx],a_mwst[chxx]
# 1234,12345678,10,ST,,24.99,1
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% 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 ~1 days

Total

2

Last Release

1737d ago

PHP version history (2 changes)0.1PHP ^7.2

0.1.1PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11462938?v=4)[wiatrogon](/maintainers/wiatrogon)[@Wiatrogon](https://github.com/Wiatrogon)

![](https://avatars.githubusercontent.com/u/4592934?v=4)[Jan Myszkier](/maintainers/janmyszkier)[@janmyszkier](https://github.com/janmyszkier)

---

Top Contributors

[![Wiatrogon](https://avatars.githubusercontent.com/u/11462938?v=4)](https://github.com/Wiatrogon "Wiatrogon (3 commits)")[![janmyszkier](https://avatars.githubusercontent.com/u/4592934?v=4)](https://github.com/janmyszkier "janmyszkier (1 commits)")

---

Tags

tradebyte

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/melvin-hamilton-digital-tradebyte-api/health.svg)

```
[![Health](https://phpackages.com/badges/melvin-hamilton-digital-tradebyte-api/health.svg)](https://phpackages.com/packages/melvin-hamilton-digital-tradebyte-api)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[googleads/googleads-php-lib

Google Ad Manager SOAP API Client Library for PHP

67410.3M25](/packages/googleads-googleads-php-lib)[theodo-group/llphant

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

1.5k311.5k5](/packages/theodo-group-llphant)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)[vin-sw/shopware-sdk

A PHP SDK for Shopware 6 Platform

122469.3k6](/packages/vin-sw-shopware-sdk)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27539.9k1](/packages/yoti-yoti-php-sdk)

PHPackages © 2026

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