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.

Have a question on one of the shopify API’s which was not returning expected results.

Have a question on one of the shopify API’s which was not returning expected results.

akhil_ecdigital
Shopify Partner
2 0 0

Have a question on one of the shopify API’s which was not returning expected results. Would you be able to assist us here in troubleshooting it?

We were accessing shopify's Products API to fetch product data. Our backend was on nodejs using @Shopify/shopify-api to access shopify API.

Request was -

const client = new Shopify.Clients.Rest('your-development-store.myshopify.com', accessToken);
const data = await client.get({
path: 'products',
query:{limit:250,id:[
6633803579607,
6633804136663,
6633804103895,
6633804169431,
6633804071127
]
}
});

Expected Response was to get the details of all 5 products. Actual Response received had the details of only 4.
Missing product id was 6633803579607.

Individual requests were being returned successfully.

const data = await client.get({
path: 'products/6633803579607',
});

Would you know what’s causing the incomplete response?

Replies 0 (0)