Api Node - SmartCollection order return 404

Highlighted
New Member
1 0 0

Hi

I want reorder collection products, but shopify  return 404 :HTTPError: Response code 404 (Not Found).

I use shopify-api-node, Below is my code:

const shopify = new Shopify({
  shopName: ctx.session.shop,
  accessToken: ctx.session.accessToken
})

var sortParams = {products: productIds.reverse(), sort_order: 'manual'}

await shopify.smartCollection.order(params.collection_id, JSON.stringify(sortParams)).then((orders) => console.log(orders)).catch((err) => console.error(err));

But received HTTPError: Response code 404 (Not Found). any help will be appreciated

0 Likes