PHPackages                             koenreiniers/bol-sdk - 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. koenreiniers/bol-sdk

ActiveLibrary[API Development](/categories/api)

koenreiniers/bol-sdk
====================

SDK For the Bol Plaza API

1.1.2(10y ago)326MITPHP

Since Feb 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/koenreiniers/bol-sdk)[ Packagist](https://packagist.org/packages/koenreiniers/bol-sdk)[ Docs](http://www.koenreiniers.nl/)[ RSS](/packages/koenreiniers-bol-sdk/feed)WikiDiscussions master Synced 2mo ago

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

bol-sdk
=======

[](#bol-sdk)

SDK for the Bol API

About
-----

[](#about)

Since there is not yet a SDK available for the new part of the Bol Plaza API (offer management), I decided to create one. That means this SDK does not support orders and the Open Api. However, they MIGHT be added in the future. You are free to extend this SDK to your likings or even submit a pull request.

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

[](#installation)

```
composer require koenreiniers/bol-sdk

```

Usage
-----

[](#usage)

There are two ways to use the SDK. The recommended way is using `Kr\Bol\Plaza`, which has predefined methods for each API call. You can use it as follows:

```
use \Kr\Bol\Plaza;
use \Kr\Model\Offer;

$plaza = new Plaza($publicKey, $privateKey);
// Create an offer
// Note you can also create an Offer model the old fashioned way using getters/setters
$offer = Offer::toCreate($id, $ean, $condition, $price, $deliveryCode, $quantityInStock, $publish, $referenceCode, $description);
$plaza->createOffer($offer);

// Update an offer
$offer = Offer::toUpdate($id, $price, $deliveryCode, $publish, $referenceCode, $description);
$plaza->updateOffer($offer);

// Update an offer's stock
$offer = Offer::toUpdate($id, $quantityInStock);
$plaza->updateOfferStock($offer);
// Alternatively:
$plaza->updateOfferStock($id, $quantityInStock);

// Delete an offer
$offer = Offer::toDelete($id);
$plaza->deleteOffer($offer);
// Alternatively:
$plaza->deleteOffer($id);

// Request an export of your offers
$exportFilename = $plaza->requestExport($filter);
// Try to read an export
$offers = $plaza->readExport($exportFilename);
```

### PlazaClient

[](#plazaclient)

Alternatively you can use `\Kr\Bol\Http\PlazaClient`, which can be used for any Plaza api call:

```
use \Kr\Bol\Http\PlazaClient;

$plazaClient = new PlazaClient($publicKey, $privateKey);
$plazaClient->get("/offers/v1");
$plazaClient->post("/offers/v1", $content);
$plazaClient->put("/offers/v1", $content);
$plazaClient->delete("/offers/v1");
```

The downside of using `\Kr\Bol\PlazaClient` is that it doesn't validate your offers against Bol.com's predefined rules, which `\Kr\Bol\Plaza` does.

### Other

[](#other)

There's also a few more things like the Enums for conditions and delivery codes. They are primarily used to validate offers, but you can also use them to list all the available conditions and delivery codes:

```
use \Kr\Bol\Enum\Condition;
use \Kr\Bol\Enum\DeliveryCode;

$conditions = Condition::all();
$deliveryCodes = DeliveryCode::all();
```

And let's not forget the `HeaderGenerator`:

```
$headerGenerator = new \Kr\Bol\Http\HeaderGenerator();
$headers = $headerGenerator->generateHeaders($publicKey, $privateKey, $target, $method);
```

Tests
-----

[](#tests)

Coverage is about ~70% atm.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity67

Established project with proven stability

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

Total

5

Last Release

3742d ago

### Community

Maintainers

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

---

Top Contributors

[![koenreiniers](https://avatars.githubusercontent.com/u/8321296?v=4)](https://github.com/koenreiniers "koenreiniers (7 commits)")

---

Tags

apibolplaza

### Embed Badge

![Health badge](/badges/koenreiniers-bol-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/koenreiniers-bol-sdk/health.svg)](https://phpackages.com/packages/koenreiniers-bol-sdk)
```

###  Alternatives

[openai-php/laravel

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

3.7k7.6M74](/packages/openai-php-laravel)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)

PHPackages © 2026

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