Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Using Shopify Product API

Using Shopify Product API

Mike-B
Visitor
3 0 0

I am trying to use the productAPI via a NodeJS application. My question lies with the parameters you can use.

Documentation: https://shopify.dev/api/admin-rest/2021-10/resources/product#[get]/admin/api/2021-10/products.json

 

According to the documentation linked above, this is the way to only retrieve products based on a list of IDs:

 

 

 

const data = await client.get({
path: 'products',
query: {"ids":"<id_1>%2C<id_2>"},
});

 

 

 

 

However, this filter does not work for me. When I do this:

 

 

 

const data = await client.get({
path: 'products',
query: {"ids": [<id_1>,<id_2>]},
});

 

 

 

It does filter, but only by one of the ID's (I have verified that both ID's are valid)

 

The same thing happens when I use the 'fields' parameter

 

Is there something I am missing here? Any help would be appreciated

Replies 0 (0)