Fare rules information in the response of search - amadeus

I could not find the fare rule information in the response of flight search API and flight offer price API (self-service).
According to the swagger (provided in the document), such information should be in offer.fareRules. Do you have any idea to fetch this information? Because I'd like to fetch the information such as refund, exchange etc. Thanks

In the Flight Offers Price API you need to use the query parameter include with the value detailed-fare-rules
For example:
https://test.api.amadeus.com/v1/shopping/flight-offers/pricing?include=detailed-fare-rules
You will get the detailed-fare-rules as part of the response into included:

Related

How to get data from a specific ID from The Guardian API?

I want to get data from a specific id from The Guardian API.
The documentation states that you just have to fetch this:
https://content.guardianapis.com/business/2014/feb/18/uk-inflation-falls-below-bank-england-target
You also have to include your API key, but when I try to fetch it, I always get only the status and some basic information and not the actual data.
response screenshot
I even added
show-fields=body
and
show-section=true&show-blocks=all
But nothing seems to work, any help would be appreciated.
Documentation: https://open-platform.theguardian.com/documentation/item

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.
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.

Ebay Trading API discountPriceInfo.OriginalPrice doesn't show

I want to show the originalPrice over my Price in my ebay auction.
I see that a lot of sellers do it so it is possible.
I add the follow code to my AddItem Request:
<DiscountPriceInfo>
<OriginalRetailPrice currencyID="EUR">100.00</OriginalRetailPrice>
</DiscountPriceInfo>
The Api Return Success but the Original price isn't show!
Sounds like you're talking about Strike-Through Pricing (STP), correct?
According to the eBay docs here, this is only valid for US, UK, and DE -- and the seller may need special approval by eBay to use STP.

REST API Explore: How to get same list ordered like the search on Foursquare Website?

I'm using the REST API (venues platform) to get a list of the top 5 venues per destination and category, like they are listed in the search results on the foursquare website.
For example i do the following request using the explore api endpoint:
https://api.foursquare.com/v2/venues/explore?near=zurich,CH&query=College %26 University
I'm using the apias a not authenticated. I do not pass a radius, to get the default radius.
Now the results from the api is as follows:
1. ETH Hönggerberg HIL
2. Technopark
3. Kantonsschule Stadelhofen
4. Zürcher Hochschule der Künste, Departement Musik
5. Klubschule Migros
When i search on the Foursquare Website as follow (not logged in!):
https://foursquare.com/explore?near=Zurich%2C%20CH&q=College%20%26%20University
I get the following results listed on the website:
1. SBB Digital
2. Technopark
3. ETH Hönggerberg HIL
4. EF Education First
5. Klubschule Migros
Is it possible to get the same list, as shown on the website (in the same order) also from the api? If yes? how can i do that? how do i call the api or how do i have to sort the results from the api to get the same list?
First i tried to sort the api results by the rating field, but that doesn't do the trick at all. Because in this example no one of the first 30 results does have any rating.
Thank you in advance for your help!
Greets
Tom
Make sure you are making the explore request with the same user account as on the web. Also, it looks like your queries do not match up exactly. One is "College & University and the other is "college" - try matching up the queries and seeing if the results change.
Well meanwhile i got the answer from foursquare.
The trick is very simple: just have to add the following parameters to the api call: time=any and day=any.
Then you get the results ordered exactly the same way as on the foursquare webpage (when not authenticated).
Thank you david from foursquare! :-)

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