BEST SELLER product list code in shopify

Highlighted
Shopify Partner
6 0 1

Hello,

I'm a new to shopify and i'm developing the shopify . I want to know about the BEST SELLER product list code because i have used many code but the products are not fetching best seller.so please provide me code for fetching the best seller product.
I'm using CLassic theme.

Thanks in advance.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
619 48 94

Hi there,

Retrieving a list of best selling products through the API is something that will have to be done on your end using either the Analytics API or looking through line items on orders using the Order API. You'll need to keep a record of this, and potentially listen to order webhooks to keep your records current.

0 Likes
Highlighted
Tourist
4 0 1

But Analytics API must be run from the embedded API (now called Bridge, it is app which run inside the dashboard of the admin of a store ) so probably it is not relevant. you left with only the Order API

0 Likes