PHPackages                             stephenmittag/php-afterbuyapi - 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. stephenmittag/php-afterbuyapi

ActiveLibrary[API Development](/categories/api)

stephenmittag/php-afterbuyapi
=============================

This fork of WkAfterbuyApi provides a some endpoints of Afterbuy XML API

v1.3.2(9y ago)0135MITPHPPHP ~5.4

Since Nov 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/stephenmittag/afterbuyapi)[ Packagist](https://packagist.org/packages/stephenmittag/php-afterbuyapi)[ Docs](https://github.com/asgoodasnu/afterbuyapi)[ RSS](/packages/stephenmittag-php-afterbuyapi/feed)WikiDiscussions master Synced 6d ago

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

PHP-AfterbuyApi
===============

[](#php-afterbuyapi)

This fork of the WkAfterbuyApiBundle provides implementations for some endpoints of [Afterbuy XML API](http://xmldoku.afterbuy.de/dokued/) using Guzzle.

Installation
------------

[](#installation)

Require the bundle and its dependencies with composer:

```
$ composer require stephenmittag/php-afterbuyapi

```

Usage
-----

[](#usage)

#### Retrieving a list of sold items from Afterbuy:

[](#retrieving-a-list-of-sold-items-from-afterbuy)

```
$client = new Client(
    $config['afterbuy']['userId'],
    $config['afterbuy']['userPw'],
    $config['afterbuy']['partnerId'],
    $config['afterbuy']['partnerPw'],
    'EN'
);
$soldItems = $client->getSoldItems($filters, $orderDirection, $maxSoldItems, $detailLevel);
```

The response will be an instance of `Wk\AfterbuyApiBundle\Model\XmlApi\GetSoldItems\GetSoldItemsResponse` and provides methods to traverse the XML sent back from Afterbuy such as fetching the orders:

```
$orders = $soldItems->getResult()->getOrders();
```

Provide an array of filters defined in Afterbuy, for example a DateFilter or a DefaultFilter. The models for these filters can be found in `Wk\AfterbuyApiBundle\Model\XmlApi\GetSoldItems\Filter`.

```
$dateFilter = (new DateFilter(DateFilter::FILTER_AUCTION_END_DATE))
                ->setDateFrom(new DateTime('2000-01-01 00:00:00'))
                ->setDateTo(new DateTime('2000-01-10 00:00:00'));

$defaultFilter = new DefaultFilter(DefaultFilter::FILTER_COMPLETED_AUCTIONS);
```

#### Updating sold items on Afterbuy:

[](#updating-sold-items-on-afterbuy)

```
$order = new \Wk\AfterbuyApiBundle\Model\XmlApi\UpdateSoldItems\Order();
$order->setOrderId(1234567890)
      ->setUserDefinedFlag(12345)
      ->setInvoiceMemo("You didn't read the memo? You are fired!");
$client->updateSoldItems(array($orders));
```

The response will be an instance of `Wk\AfterbuyApiBundle\Model\XmlApi\UpdateSoldItems\UpdateSoldItemsResponse`.

Dependencies
------------

[](#dependencies)

- `jms/serializer` - Allows you to easily serialize, and deserialize data of any complexity
- `guzzlehttp/guzzle` - Guzzle is a PHP HTTP client library

PHPUnit Tests
-------------

[](#phpunit-tests)

You can run the tests using the following command:

```
$ vendor/bin/phpunit

```

Resources
---------

[](#resources)

Afterbuy XML Interface Documentation:

>

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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

Recently: every ~79 days

Total

18

Last Release

3440d ago

Major Versions

v0.10.2 → v1.0.02016-01-28

### Community

Maintainers

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

---

Top Contributors

[![simonchrz](https://avatars.githubusercontent.com/u/1298545?v=4)](https://github.com/simonchrz "simonchrz (13 commits)")[![staegi](https://avatars.githubusercontent.com/u/1256010?v=4)](https://github.com/staegi "staegi (12 commits)")[![bwelke](https://avatars.githubusercontent.com/u/12692421?v=4)](https://github.com/bwelke "bwelke (8 commits)")[![vikbert](https://avatars.githubusercontent.com/u/3229226?v=4)](https://github.com/vikbert "vikbert (7 commits)")[![paschdan](https://avatars.githubusercontent.com/u/1469576?v=4)](https://github.com/paschdan "paschdan (6 commits)")[![stephenmittag](https://avatars.githubusercontent.com/u/326249?v=4)](https://github.com/stephenmittag "stephenmittag (4 commits)")[![sgalonska](https://avatars.githubusercontent.com/u/157554?v=4)](https://github.com/sgalonska "sgalonska (1 commits)")

---

Tags

afterbuy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stephenmittag-php-afterbuyapi/health.svg)

```
[![Health](https://phpackages.com/badges/stephenmittag-php-afterbuyapi/health.svg)](https://phpackages.com/packages/stephenmittag-php-afterbuyapi)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[currency-cloud/client

A PHP library which implements the complete functionality of v2 of the The Currency Cloud API.

17327.2k](/packages/currency-cloud-client)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

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