bigcommerce-api-python icon indicating copy to clipboard operation
bigcommerce-api-python copied to clipboard

Using v3 Catalog/Product filters

Open joegarcia opened this issue 3 years ago • 3 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.

joegarcia avatar Feb 14 '22 23:02 joegarcia

No answer from BigCommerce?

shane-syc avatar Jun 19 '23 16:06 shane-syc

I don't even remember what the question was. LOL I tend to give up on BigCommerce most the time. Joey G. On Monday, June 19, 2023 at 09:05:58 AM PDT, shane-syc @.***> wrote:

No answer from BigCommerce?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

joegarcia avatar Jun 19 '23 16:06 joegarcia