This is an open source PHP client for the Bol.com Retailer API version 3.
This project can easily be installad through Composer:
composer require picqer/bol-retailer-php-client
First configure the client by setting the credentials:
Picqer\BolRetailer\Client::setCredentials('your-client-id', 'your-client-secret');
Then you can get the first page of open orders by using the Order model:
$reducedOrders = Picqer\BolRetailer\Order::all();
foreach ($reducedOrders as $reducedOrder) {
echo 'hello, I am order ' . $reducedOrder->orderId . PHP_EOL;
}
In the list of orders, Bol only gives you a reduced amount of details per order. That is what we call a "reduced order". If you need all details of the order, retrieve the order by its id:
$order = Picqer\BolRetailer\Order::get($reducedOrder->orderId);
At this moment, this client supports:
- Offer
- Order
- ProcessStatus
- ReturnItem
- Shipment
See more examples in the examples/ directory.