Note: the BigBuy API is not versioned and some endpoints are often added or removed without notice. The removal of methods that call deleted endpoints is not considered a breaking change.
- Fix the return type hint for
get_shipping_order
: the documentation from BigBuy says it returns a list but in reality it returns a dict with ashippingOptions
key - Bump
api-session
requirement to 1.4.1
- Remove calls to endpoints removed by BigBuy in April 2024:
get_product_variations_stock
,get_products_variations_stock
,get_product_stock
,get_products_stock
- Remove
get_products_stock_by_reference
; BigBuy has silently removed the endpoint - Add
get_products_information
andget_product_variations_prices
- Add deprecation warnings on categories methods because BigBuy deprecated categories in favor of taxonomies
- Add a return type hint on all methods
- Fix the docstring of
get_carriers
- Bump
api-session
requirement to 1.4.0
- Don’t crash if BigBuy returns a bad error payload with inverted code and error message (
{"code": "Bad request", "message": 400}
)
- Add a default auto-retry on connection and server errors on all read call
- The read-only mode now allows
POST
calls to the API that read data without modifying it, like order simulation or checking tracking numbers
- Add official support for Python 3.12.0
- Use
BBTimeoutError
for more timeout errors instead ofBBResponseError
- Add
get_user_auth_status
,get_product_stock_by_handling_days
,get_product_variations_stock_by_handling_days
- Deprecate
get_products_stock
,get_product_stock
,get_products_variations_stock
andget_product_variations_stock
, because the endpoint they’re calling are deprecated and will be unsupported from April 1st, 2024
- Remove
get_products_stock_available
andget_products_variations_stock_available
, because BigBuy removed the endpoints on September 28, 2023
- Add official support for Python 3.12-rc2
- Remove the
mode
argument of the class constructor. This has been deprecated for almost a year, since 3.16.0. Usesandbox=True
to use the sandbox mode instead ofmode="sandbox"
. Note the class now defaults to production mode rather than the sandbox.
- Add
get_order_delivery_notes
for the neworder/delivery-notes
route - Add
BBTimeoutError
as a subclass ofBBServerError
andTimeoutError
- Support more weird HTML formatting for 500 errors
- Add
get_order_statuses
for the neworder/orderstatuses
route - Add
get_new_products
for the newcatalog/new-products
route - Support another weird HTML formatting for 500 errors
- Allow to import
BBShippingError
andBBWarehouseSplitError
directly frombigbuy
- Remove
BBRateLimitError.reset_time
(useBBRateLimitError.rate_limit.reset_time
) - Remove
wait_rate_limit(e)
(usee.wait_rate_limit()
) - Remove
BBWarehouseError
(useBBWarehouseSplitError
)
- Document
create_multi_shipping_order
response - Rename
BBWarehouseError
asBBWarehouseSplitError
but keep the aliasBBWarehouseError
for now
- Remove the ability to call
get_shipping_order
/check_order
/create_order
with{"order": order}
instead oforder
. This behavior has been deprecated in 3.13.11. - Rename
create_multi_shipping_order_id
ascreate_multi_shipping_order_ids
create_multi_shipping_order
now returns a dict instead of aResponse
object- All cookies are now rejected by default. You can change this by using
.cookies.set_policy(http.cookiejar.DefaultCookiePolicy())
. Cookies are not necessary for the API usage so this should not break anything.
- Add
check_multi_shipping_order
,create_multi_shipping_order
,create_multi_shipping_order_id
- Add a
BBWarehouseError
for the new warehouse errors that BigBuy returns on some orders - Add
BBShippingError
as a parent class forBBWarehouseError
andBBNoCarrierError
- Deprecated
mode
argument ofBigBuy
and add the optionalsandbox
boolean keyword argument. Ifsandbox
is not set, the behavior is exactly the same as today. If it’s set, it overrides the mode. In the future, we’ll removemode
in favor ofsandbox=True
(sandbox mode) orsandbox=False
(production mode; the default). raise_for_response
: trim more garbage in HTML error responses- Remove
get_products_stock_available_by_handling_days
andget_products_variations_stock_available_by_handling_days
: BigBuy removed the endpoints
- Arguments
retry_on_rate_limit
andmax_retry_on_rate_limit
ofBigBuy
are now keyword-only. Before you could useBigBuy(app_key, "sandbox", True)
; now you must useBigBuy(app_key, "sandbox", retry_on_rate_limit=True)
This is the first public release.
- Add
get_products_stock_by_handling_days
,get_products_stock_available_by_handling_days
,get_products_variations_stock_by_handling_days
,get_products_variations_stock_available_by_handling_days
- Add
upload_order_invoice
andupload_order_invoice_by_path
- Fix
repr()
onBigBuy
instances without app key
- Add optional
max_retry_on_rate_limit
toBigBuy
to configure the maximum number of retries in case of rate-limit error response. This has no effect ifretry_on_rate_limit
is not used.
- Add
RateLimit
and move all the rate-limit logic in it. Existing attributes and functions are conserved for backward-compatibility. - Improve the "automatic retry on rate-limit errors" feature by making it work on all calls. Previously, it worked only
on calls using
throw=True
and not onget_json_api(none_on_404=True)
ones wait_rate_limit
: remove the 0.01s of additional delay introduced in the previous release. Don’t returnFalse
if the delta is negative.- Remove
get_order_addresses
andget_order_carriers
: the endpoints they were calling have been removed by BigBuy three months ago
- Add optional
retry_on_rate_limit
boolean flag toBigBuy
to enable automatic retry on rate-limit errors - Pass keyword arguments given to
__init__
to the parent wait_rate_limit
: add 0.01s of additional delay (configurable)
- Deprecate functions called as
function({"order": order})
in favor offunction(order)
raise_for_response
: trim some garbage in HTML error responses
- Add
wait_rate_limit
to wait for aBBRateLimitError
delay
raise_for_response
: raise aBBProductError
with a more useful error message when BigBuy returns the errorProducts error.
- Additional typing hints
get_*
: returnNone
when we get an empty response from BigBuy instead of crashing when trying to decode it as JSON. The API has been returning a lot of200 OK
with empty bodies lately instead of proper 404s.- Add methods to get taxonomies
- All methods now accept additional keyword parameters to pass to the underlying
requests
call - Additional typing hints
- Remove dead doc links in docstrings
raise_for_response
: don’t crash on empty response bodies
raise_for_response
now support soft errors where a full error response is embedded in a200 OK
response body
raise_for_response
now supports soft errors; for example BigBuy may return a200 OK
response whose body is{"code": 409, "message": "Something went wrong"}
. This is now treated as an error instead of a success.
- Add
get_modules
andget_module_platforms
- Raise
BBValidationError
instead of a genericBBResponseError
on even more validation errors.
- Add
create_order_id
andget_purse_amount
- Add
get_lowest_shipping_cost_by_country
andget_lowest_shipping_costs_by_country
.request_api
now always return arequests.Response
object and don’t accept araw_response
parameter anymore. This is a breaking change only if you rely on a direct call to this method.- Raise
BBValidationError
instead of a genericBBResponseError
on more validation errors. This is not breaking since the former inherit from the latter. get_tracking_orders
now accepts bothint
andstr
order ids.
- Fix typo in
setup.py
by generating it with Poetry (it usedapi-sessions
instead ofapi-session
)
- All calls now raise by default
This release revert the main change of 3.10.0.
- All
POST
calls now raise by default
- The client now raises if a response has an error body, even if its HTTP status code doesn’t indicate an error.
- Use
api-session
as a base class. This changesBigBuy#request_api
’s signature:request_api(endpoint, method)
becomesrequest_api(method, endpoint)
. - Add
BBValidationError
requests.RequestError
exceptions are no longer wrapped inBBResponseError
- Fix the previous release
- Raise
BBServerError
on another format of internal server error responses
- Raise
BBServerError
on internal server errors
- Add
BBServerError
as a subclass ofBBResponseError
for503
/504
errors
- Fix
bigbuy.__version__
- Make BigBuy an HTTP client
- Add a class for each error code
- Clarify error messages
- Add type hints
First version.