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

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.

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.

Related

ebay finding api finditemsbykeywords pagination problem

I tried the following calls:
https://svcs.ebay.com/services/search/FindingService/v1?X-EBAY-SOA-OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.13.0&keywords=waschbecken&RESPONSE-DATA-FORMAT=JSON&GLOBAL-ID=EBAY-DE&outputSelector(0)=ItemSpecifics&paginationInput.entriesPerPage=100&paginationInput.pageNumber=2
then on the ebay API explorer for the post request body,
<findItemsByKeywordsRequest xmlns="http://www.ebay.com/marketplace/search/v1/services">
<keywords>waschbecken</keywords>
<paginationInput>
<entriesPerPage>100</entriesPerPage>
<pageNumber>2</pageNumber>
</paginationInput>
</findItemsByKeywordsRequest>
but I do not get 100 searchResult count per page, in Postman I get 32 searchResult and in API explorer 56; furthermore 2nd page forward I do not get any searchResult count, I am trying to understand is there something wrong that I am writing in the call or there is some another problem or any parameter I am missing.
Thanks for the help.
I am also running into this problem. I am guessing that the pagination results are for the entire store, but not for the search by keywords....Seems like they dropped the ball on this.
Sorry, I did not update on the question, I forgot about it.
The problem was not with the pagination, the problem is the variants.
Simply explained, the output of the query doesn't count for the variants listed on the Ebay search by the same seller. If you have from a same seller the same product with the different variant, the query does not show the variants from those product from the same seller just different variant, as it would if you do an ebay search.
The mechanism of the query is different as that of the product search on Ebay.

Filter BigCommerce products on a custom field using API

I have products in my catalog that benefit from a rebate.
If a product does have a rebate, he has a custom field "rebate" set to 1.
I want to display a page with all products having a rebate, and I'm doing it trough the API.
As I'm new, I'm wondering what should be the syntax to get the custom field value and filter on it.
I'm testing with something like this :
https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products?include=custom_fields&rebate=1
But not working at all ... I'm getting a 422, saying that rebate is not a valid filter.
Thank you for your help,
Jaad
That's correct--custom_field keys are not a valid filter on a product request. To see the list of valid parameters you can use with a Get Product request, see our documentation here (expand the Query Params section):
https://developer.bigcommerce.com/api-reference/catalog/catalog-api/products/getproducts
You could make the request for all product data and sort the products by custom field key within your application. Or, if you wanted to limit the request to only rebate products, you could tag all rebate products in a Rebate category (this category could even be hidden). Then you could filter the request to get all products that are in that category:
https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products?categories:in={rebateCategoryID}

eBay API limit findItemsByProduct to Regional Site

Im trying to use the Ebay API in order to find items by ISBN or UPC.
Using the findItemsByProduct API
Using the following URL (Replacing MY_APP_ID with a real one), I can get a list of items that match the UPC of Inception 883929106646
http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByProduct&SERVICE-VERSION=1.0.0&SECURITY-APPNAME=MY_APP_ID&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&productId.#type=UPC&productId=883929106646&paginationInput.entriesPerPage=3
However, I want to limit this to Ebay UK items only.
The documentation says that you should pass GLOBAL-ID=EBAY-GB in the URL but then I get the following error (with no other changes to the URL):
<findItemsByProductResponse xmlns="http://www.ebay.com/marketplace/search/v1/services">
<ack>Failure</ack>
<errorMessage>
<error>
<errorId>41</errorId>
<domain>Marketplace</domain>
<severity>Error</severity>
<category>Request</category>
<message>Invalid product ID value.</message>
<subdomain>Search</subdomain>
<parameter>883929106646</parameter>
</error>
</errorMessage>
<version>1.13.0</version>
<timestamp>2016-02-12T10:07:44.800Z</timestamp>
</findItemsByProductResponse>
How can I limit this product search to Ebay UK?
The particular SKU you're looking for isn't available in the UK store.

Bigcommerce API: Get Proudct URL w/PHP

I could not find the API that returns Product URL for the given product Id. I have noticed the product URL on the store is formatted using the product name EX: http://mystore.mybigcommerce.com/gideon-canvas-espadrilles-multiple-colours/. But this may not be reliable.

eBay API change currency of returned price

Is there a way to get an item in another currency using the eBay API?
Very simple. All you have to do is change the site ID parameter. Since you didn't specify a language, I'm going to assume you're doing this HTTP-GET and just parsing the XML. The same principles will apply regardless of how you do it, programatically or not.
For a URL:
"http://open.api.ebay.com/shopping"
?callname=GetSingleItem
&responseencoding=XML
&appid=[APPID]
&siteid=2 <------------This, for example, is Canada's siteid. 0 is US. This will change the currency returned under < ConvertedCurrentPrice>
&version=839
&ItemID=181195344321
Put it all together and you get this copy/paste-friendly "http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=[APPID]&siteid=2&version=839&ItemID=181195344321"
Make sure to use your app ID as the parameter.
You can use this call for currency change:
Currency type can be changed in Ebay while listing an item using Add Item call in Ebay's trading API.
http://developer.ebay.com/devzone/xml/docs/Reference/eBay/extra/additms.rqst.additmrqstcntnr.itm.crrncy.html
Thanks CedCommerce
You can and it's actually very simple. You can use the Shopping API GetSingleItem.
Depending on what currency you are interested in, all you have to do is change the SiteID on which you are making the call. For example, if you want to get the price in EUR, you can set the SiteID to 3(UK), or 77(Germany). You will also have to set the IncludeSelector to "Details". This way, you will get a response that will contain the following fields.
<ConvertedCurrentPrice currencyID="GBP">68.55</ConvertedCurrentPrice>
<CurrentPrice currencyID="USD">92.9</CurrentPrice>
where the CurrentPrice is the original price of the listing, on the ebay site the listing was made, and the ConvertedCurrentPrice is the price of the listing on the site that corresponds to the SiteID you supplied.
You can see a full list of SiteIDs with the currencies they are using here