Skip to main content
https://app.travis-ci.com/dreambits/python-bol-api.svg?branch=master https://badge.fury.io/py/python-bol-api-latest.svg https://static.pepy.tech/personalized-badge/python-bol-api-latest?period=total&units=international_system&left_color=brightgreen&right_color=black&left_text=Downloads

A Python wrapper for the bol.com API forked from https://github.com/pennersr/python-bol-api 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 bol.com 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']
u'0093155141650'

Retailer API

Supports the BOL Api v10, documented here: https://api.bol.com/retailer/public/Retailer-API/selling-on-bolcom-processflow.html

Instantiate the API:

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

Authenticate:

>>> 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 bol.com API, including lower-CamelCase conventions:

>>> order.customerDetails.shipmentDetails.streetName
'Billingstraat'

Fields are properly typed:

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

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:

tox

Download files

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

Source Distribution

python_bol_api_latest-1.5.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_bol_api_latest-1.5.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file python_bol_api_latest-1.5.0.tar.gz.

File metadata

  • Download URL: python_bol_api_latest-1.5.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for python_bol_api_latest-1.5.0.tar.gz
Algorithm Hash digest
SHA256 c9bcf3732d407b9b6865ee0813d5d588bac9c3da1da6e71c403293522a48a541
MD5 845d5df0a2434c2a38aff0b71cba013a
BLAKE2b-256 667065e3db955803ecfd4832aeae262319ac8cc4579ab0ec49acd6f0bbb873f5

See more details on using hashes here.

File details

Details for the file python_bol_api_latest-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_bol_api_latest-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0944ae11d4acb04fd6f02899d17cfd500fc2c8ba8f537920874c8b71d6c862c2
MD5 5de1d83ed2fcd886ec5ddd92a9568102
BLAKE2b-256 2af58e28b6bbc257f82fb76e155b2f6ec8add1974c8f457db86a217240228299

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

1 file

1.0.0

1 file

0.9.2

2 files

0.9.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page