bigcommerce/bigcommerce-api-python

Using v3 Catalog/Product filters

joegarcia opened this issue · 2 comments

Expected behavior

I'm trying to use the v3 Products API's, but I need to filter by "id:not_in". As far as I know, Python does not allow colons in variable names. So what is the work-around to this?

I expect that all the filters using a colon will not work.

# v3 products
include_fields = "sku, price"
sort = "sku"
id:not_in = "689"
endpoint = '/catalog/products'
response = api.get(endpoint, include_fields=include_fields, id:not_in=id:not_in, limit=5, page=1, sort=sort)

The expected result would be a list of products where the IDs are not in the list of IDs.

Actual behavior

id:not_in = "689"
NameError: name 'not_in' is not defined

Steps to reproduce behavior

Use above filter to reproduce.

No answer from BigCommerce?