Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flipkart Product API - How to get top selling product from the category

According to the flipkart product api we can get the top selling products from the category, but I'm not able to get the top selling products. According to the flipkart following is the sample url which return top selling products.

https://affiliate-api.flipkart.net/affiliate/1.0/topFeeds/fnkygygma/category/reh/55ab6c2673a4773ffb8e4019.json?expiresAt=1452881213871&sig=1c4c5111b6b014a71a17b229e6df6afc&inStock=true

I have following queries. what is reh in the URL? what is "55ab6c2673a4773ffb8e4019" in the URL is this category name, how I'll get the category name like this for other categories. As I know "expiresAt" comes from flipkart, how I can generate this myself? How I can generate "sig"?

it will be really helpful if someone answer for this.

like image 391
user3764679 Avatar asked Feb 20 '17 02:02

user3764679


1 Answers

My guess is you would have to query their database for the ID of the category that you want the top products from, and then use it in the URI when requesting the feed.

The documentation doesn't show "reh" in the URI so I'm guessing that sample is for testing purposes.

I found the section that says, "The Product Feed Listing API provides the full list of categories present in the catalogue." The URI is: https://affiliate.flipkart.com/api-docs/af_prod_ref.html#product-feed-listing-api

You do realize that there is a new version of the API? It's 1.1

The documentation says that you have to request a list of the categories with this URI: https://affiliate-api.flipkart.net/affiliate/api/<trackingId>.json

Insert your ID where it says <trackingId> and it will return a list of the categories along with metaData.

The categories live in the apiListings section of the JSON response.

like image 91
Abraham Luna Avatar answered Sep 28 '22 01:09

Abraham Luna