Skip to main content

Wrapper for the API

Project description

A Python wrapper for the API forked from This is currently under development but stable to be used. We are adding more and more features as the api has changed a lot from the time this version was created in original project

A Python wrapper for the API. Currently rather incomplete, as it offers only those methods required for my own projects so far.

Open API

Instantiate the API:

>>> from bol.openapi.api import OpenAPI
>>> api = OpenAPI('api_key')

Invoke a method:

>>> data = api.catalog.products((['1004004011187773', '1004004011231766'])

JSON data is returned “as is”:

>>> data['products'][0]['ean']

Plaza API

Plaza API is removed in the latest release v1.0 as it is now not supported by

Retailer API

Supports the BOL API V5, documented here:

Instantiate the API:

>>> from bol.retailer.api import RetailerAPI
>>> api = RetailerAPI()


>>> api.login('client_id', 'client_secret')

Invoke a method:

>>> orders = api.orders.list()
>>> order = api.orders.get(orders[0].orderId))

Fields are derived 1:1 from the API, including lower-CamelCase conventions:

>>> order.customerDetails.shipmentDetails.streetName

Fields are properly typed:

>>> repr(order.dateTimeOrderPlace)
datetime.datetime(2020, 2, 12, 16, 6, 17, tzinfo=tzoffset(None, 3600))
>>> repr(order.orderItems[0].offerPrice)

Access the underlying raw (unparsed) data at any time:

>>> order.raw_data
>>> order.raw_content

Running the tests

First, make sure that you have tox installed on your system:

pip install tox

Then, just run the tox:


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

python_bol_api_latest-1.1.0-py3-none-any.whl (21.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page