I am checking the Amadeus about flight tickets and a little confused about the prices that I get. I expected to see prices from Amadeus closer to airline website prices or a little cheaper. But, I see that prices are incredibly high. For example, I made the following request:
https://api.amadeus.com/v2/shopping/flight-offers?originLocationCode=SGN&destinationLocationCode=DAD&departureDate=2020-05-29&adults=1&nonStop=true¤cyCode=VND
Flight at Amadeus Price In USD Airline price in USD
11:45 ~70.41 ~38.72
13:50 ~70.41 ~34.43
18:00 ~70.41 ~42.93
Prices are higher significantly. Moreover, prices from Amadeus are the same for a lot of flights for the same air company.
Do I do something wrong or I skipped something?
PS: Response for first flight:
{
"type": "flight-offer",
"id": "1",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2020-05-29",
"numberOfBookableSeats": 4,
"itineraries": [{
"duration": "PT1H20M",
"segments": [{
"departure": {
"iataCode": "SGN",
"terminal": "1",
"at": "2020-05-29T11:15:00"
},
"arrival": {
"iataCode": "DAD",
"terminal": "1",
"at": "2020-05-29T12:35:00"
},
"carrierCode": "VJ",
"number": "628",
"aircraft": {
"code": "321"
},
"operating": {
"carrierCode": "VJ"
},
"duration": "PT1H20M",
"id": "9",
"numberOfStops": 0,
"blacklistedInEU": false
}]
}],
"price": {
"currency": "VND",
"total": "1640000.00",
"base": "1381000.00",
"fees": [{
"amount": "0.00",
"type": "SUPPLIER"
},
{
"amount": "0.00",
"type": "TICKETING"
}
],
"grandTotal": "1640000.00"
},
"pricingOptions": {
"fareType": [
"PUBLISHED"
],
"includedCheckedBagsOnly": true
},
"validatingAirlineCodes": [],
"travelerPricings": [{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {
"currency": "VND",
"total": "1640000.00",
"base": "1381000.00"
},
"fareDetailsBySegment": [{
"segmentId": "9",
"cabin": "ECONOMY",
"fareBasis": "JSP",
"class": "J",
"includedCheckedBags": {
"weight": 20,
"weightUnit": "KG"
}
}]
}]
},
Keep in mind that right now the only source for prices in the API is GDS. Many LCCs don't / only load their more expensive fares into GDS, as it costs them money.
Lately, many "normal" airlines have also added fees when booking from a GDS compared to directly on their website / or other direct distribution methods.
I assume VietJet is one of those carriers, as it is a low-cost airline.
Regarding your second question: That is because of the fare system in the airline industry. Airlines load so called "fares", which specifies the price of a ticket for a given route within a date window.
An example: VietJet offers SGN-DAD for a base fare of 55EUR ( without taxes& fees ). You can choose any flight by VJ on any date within the window of the fare, and the price will be the same, as long as there is availability in the booking class J , which the fare is for.
Related
Have access to an API that provides data for racing, including driver names, and their last lap, best lap.. etc. Completely new to coding but learning the ropes. This is an example of an output from the API.
"Successful": true,
"Session": {
"RunNumber": "47",
"SessionName": "KART DRIVERS - EXPERIENCE / PROVA 11 22:30",
"TrackName": "KGV RACE TRACKS - CIRCUITO 109",
"TrackLength": "0.725",
"CurrentTime": "23:05:24",
"SessionTime": "00:13:27",
"TimeToGo": "00:04:32",
"LapsToGo": "9999",
"FlagStatus": "Green",
"SortMode": "race",
"Classes": {
"1": {
"ClassID": "1",
"Description": "RENTAL"
}
},
"Competitors": {
"018": {
"RacerID": "018",
"Number": "018",
"Transponder": "02",
"FirstName": "LR",
"LastName": "",
"Nationality": "",
"AdditionalData": "",
"ClassID": "1",
"Position": "28",
"Laps": "8",
"TotalTime": "00:12:34.376",
"BestPosition": "26",
"BestLap": "8",
"BestLapTime": "00:01:09.158",
"LastLapTime": "00:01:09.158"
},
"043": {
"RacerID": "043",
"Number": "043",
"Transponder": "48",
"FirstName": "LORENZO",
"LastName": "",
"Nationality": "",
"AdditionalData": "",
"ClassID": "1",
"Position": "32",
"Laps": "5",
"TotalTime": "00:12:54.095",
"BestPosition": "32",
"BestLap": "4",
"BestLapTime": "00:01:38.740",
"LastLapTime": "00:02:39.277"
How would I go about reading data from this api every 30 seconds to 1 minute, and exporting that data into a CSV to put on excel?
I am new to the Amadeus API and generally the flight business as a whole but I have set up a dev account with Amadeus and I am on a test Plan at the moment. I made a call to the flightOffers API thus;
await Amadeus.shopping.flightOffersSearch.get({myRequestPayload})
I got a successful response with 2 offers. However, my confusion is around the field numberOfStops which is 0 in the response. Please see the segments below as copied from the response I got;
"segments": [
{
"departure": {
"iataCode": "SYD",
"terminal": "1",
"at": "2022-11-01T11:35:00"
},
"arrival": {
"iataCode": "MNL",
"terminal": "2",
"at": "2022-11-01T16:50:00"
},
"carrierCode": "PR",
"number": "212",
"aircraft": {
"code": "333"
},
"operating": {
"carrierCode": "PR"
},
"duration": "PT8H15M",
"id": "1",
"numberOfStops": 0,
"blacklistedInEU": false
},
{
"departure": {
"iataCode": "MNL",
"terminal": "1",
"at": "2022-11-01T19:20:00"
},
"arrival": {
"iataCode": "BKK",
"at": "2022-11-01T21:50:00"
},
"carrierCode": "PR",
"number": "732",
"aircraft": {
"code": "321"
},
"operating": {
"carrierCode": "PR"
},
"duration": "PT3H30M",
"id": "2",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
From my understanding from what I have read recently about Direct, NonStops flights, this flight is definitely not NonStop since there is a stop at MNL.
Hence I think the numberOfStops should be say 2 since:
It is a round trip
For each trip, it stops at MNL
I am just guessing this Number based on what is apparent to me. Please correct me If I am wrong.
I need to understand why numberOfStops = 0 and not > 0.
Is there a way to determine the numberOfStops without relying on the value returned?
Thanks and I anticipate any help soonest.
numberOfStops is the number of stops planned on the segment for technical or operation purpose i.e. refueling. The API will rarely return with a value but when it does it means that a segment is flown with the same plane. This represents a scheduled stop for technical/operational purposes like for example to refuel. You can check the description of the parameter in the specification file.
The API does not directly return the number of flight connections. This will need to be checked by looking at the segment size. If a segment has 2 items it means it has 2 flights. In the case of a round trip, then itineraries[0] contains the segments of the way to go back, and itineraries[1] contains the segments (flights) of the way back.
The Low-fare endpoint just recently started returning JSON with some flight segments missing a key-value pair for operating.carrierCode, for example:
"operating": {
"number": “5898"
This was the second flight segment of the first result (data[0].offerItems[0].services[0].segments[1].flightSegment) when yesterday I searched:
https://test.api.amadeus.com/v1/shopping/flight-offers?origin=LON&destination=PAE&departureDate=2019-10-29&returnDate=2019-11-13&adults=1&nonStop=false&max=50
Here it is in context:
{
"data": [
{
"type": "flight-offer",
"id": "1564934270644-1482530186",
"offerItems": [
{
"services": [
{
"segments": [
{
"flightSegment": {
"departure": {
"iataCode": "LHR",
"terminal": "2",
"at": "2019-10-29T09:20:00Z"
},
"arrival": {
"iataCode": "SFO",
"terminal": "I",
"at": "2019-10-29T13:30:00-07:00"
},
"carrierCode": "SN",
"number": "9101",
"aircraft": {
"code": "777"
},
"operating": {
"carrierCode": "UA",
"number": "9101"
},
"duration": "0DT11H10M"
},
"pricingDetailPerAdult": {
"travelClass": "ECONOMY",
"fareClass": "K",
"availability": 4,
"fareBasis": "KLP5ULGT"
}
},
{
"flightSegment": {
"departure": {
"iataCode": "SFO",
"terminal": "3",
"at": "2019-10-29T16:15:00-07:00"
},
"arrival": {
"iataCode": "PAE",
"at": "2019-10-29T18:32:00-07:00"
},
"carrierCode": "UA",
"number": "5898",
"aircraft": {
"code": "E7W"
},
"operating": {
"number": “5898”
},
"duration": "0DT2H17M"
},
"pricingDetailPerAdult": {
"travelClass": "ECONOMY",
"fareClass": "K",
"availability": 9,
"fareBasis": "KLP5ULGT"
}
}
]
…
Is this a known bug? It was pretty easy to write a workaround, but I was surprised that this data was missing since it had been working correctly for months.
This is a common issue with the operating carrier even in cryptic mode
FLT/DATE RTNG CKIN TM DEP ARR TM EQP ML DURA DIST
UA5898 Y 29OCT SFOPAE 3 415P 632P E7W G 2:17 711
SFOPAE OPERATED BY SKYWEST DBA UNITED EXPRES
>
Whilst at shopping using enterprise apis you can use the same text describing the schedule data resumed by flight number.
Dont know of any parameter to get it in the api response too.
I have an app that I would like to add payment processing similar to Amazon payment processing into it where sub-merchants get paid by customers with service fee being deducted, I can see in https://developer.visa.com/capabilities/cybersource/reference#cybersource__cybs_payments_v2__v2__process_a_payment the following request body but there is no field in request body to specify a service fee:
{
"clientReferenceInformation": {
"code": "TC588171_3"
},
"processingInformation": {
"commerceIndicator": "internet"
},
"aggregatorInformation": {
"subMerchant": {
"cardAcceptorID": "1234567890",
"country": "US",
"phoneNumber": "650-432-0000",
"address1": "900 Metro Center",
"postalCode": "94404-2775",
"locality": "Foster City",
"name": "Visa Inc",
"administrativeArea": "CA",
"region": "PEN",
"email": "test#cybs.com"
},
"name": "V-Internatio",
"aggregatorID": "123456789"
},
"orderInformation": {
"billTo": {
"country": "US",
"lastName": "VDP",
"address2": "Address 2",
"address1": "201 S. Division St.",
"postalCode": "48104-2201",
"locality": "Ann Arbor",
"administrativeArea": "MI",
"firstName": "RTS",
"phoneNumber": "999999999",
"district": "MI",
"buildingNumber": "123",
"company": "Visa",
"email": "test#cybs.com"
},
"amountDetails": {
"totalAmount": "102.21",
"currency": "USD"
}
},
"paymentInformation": {
"card": {
"expirationYear": "2031",
"number": "5555555555554444",
"securityCode": "123",
"expirationMonth": "12",
"type": "002"
}
}
}
Is there a way or a workaround to get a service fee deducted?
Service fees go in the orderInformation block. Like this:
"orderInformation": {
"amountDetails": {
"totalAmount": "102.21",
"currency": "USD",
"serviceFeeAmount": "3.00"
},
There are a few prerequisites to using service fees. One of which you must be using First Data as your processor. For more details check this documentation.
All of the following is being performed in eBay's API sandbox.
I am attempting to list an item by using the inventory API. Specifically, I have created an inventory item and a relevant offer for that item. When I make a POST request to the publish offer endpoint, I get the following error:
{
"errors": [
{
"errorId": 25016,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "The title value is invalid. Seller Provided Title Value is missing."
},
{
"errorId": 25002,
"domain": "API_INVENTORY",
"subdomain": "Selling",
"category": "REQUEST",
"message": "A user error has occurred. The duration \"GTC\" day(s) is not available for this listing type, or invalid for category \"49996\".",
"parameters": [
{
"name": "0",
"value": "GTC"
},
{
"name": "1",
"value": "49996"
}
]
}
]
}
I can't see any reference in any of the API documentation to a "Seller Provided Title". The duration error is also confusing as the API says it only supports "GTC" listings. The product has a title so it must be in reference to something else.
My inventory item is as follows:
{
"sku": "13725",
"product": {
"title": "Harley Davidson bike",
"aspects": {
"Year": [
"2016"
],
"Model": [
"Road Glide Special"
],
"Manufacurer": [
"Harley-Davidson®"
],
"Type": [
"Touring"
],
"For Sale By": [
"Dealer"
],
"Vehicle Title": [
"Clear"
],
"Mileage": [
"13393"
],
"VIN (Vehicle Identification Number)": [
"1HD1KTM10GB627264"
],
"Color": [
"Black Quartz"
]
},
"description": "Item description goes here",
"imageUrls": [
"https://dw4i9za0jmiyk.cloudfront.net/2018/01/12/pre_ic60e5df584b870c3d2a55c86800eede_70618b24eb08.jpg"
]
},
"condition": "USED_EXCELLENT",
"availability": {
"pickupAtLocationAvailability": [
{
"quantity": 1,
"merchantLocationKey": "425",
"availabilityType": "IN_STOCK",
"fulfillmentTime": {
"value": 1,
"unit": "DAY"
}
}
]
}
}
And my offer object is as follows:
{
"offerId": "5852159010",
"sku": "13725",
"marketplaceId": "EBAY_MOTORS",
"format": "FIXED_PRICE",
"availableQuantity": 0,
"pricingSummary": {
"price": {
"value": "18294.0",
"currency": "USD"
}
},
"listingPolicies": {
"paymentPolicyId": "5807565000",
"fulfillmentPolicyId": "5806186000"
},
"categoryId": "49996",
"merchantLocationKey": "425",
"tax": {
"applyTax": false
},
"status": "UNPUBLISHED",
"eBayPlusEligible": false
}
I had similar issues on sandbox, and came to the conculsion it was broken.
They also have some limits on only certain categories working.
Have you tried it agains the live API, I have found this to be far more reliable, ignoring the fact doing development work live is dangerous!
For your info here is my working code offer:
inventory_template = {
"availability": {
"shipToLocationAvailability": {
"quantity": product.quantity_available
}
},
"condition": "NEW",
"product": {
"aspects": {spec.name: [spec.value] for spec in product.specifics},
"brand": product.product_brand,
"description": product.product_description,
"imageUrls": [
"https://ebay.mydomain.co.uk/{}".format(img.image_link) for img in product.images],
"mpn": product.product_mpn,
"title": product.product_title,
"upc": [
product.product_upc,
],
"ean": [
product.product_ean,
],
# "epid": "string"
},
"sku": sku,
}
offer_body = {
"availableQuantity": offer.available_quantity,
"categoryId": offer.category_id,
"listingDescription": html,
"listingPolicies": {
"paymentPolicyId": offer.payment_policy_id,
"returnPolicyId": offer.return_policy_id,
"fulfillmentPolicyId": offer.fulfillment_policy_id,
},
"merchantLocationKey": offer.merchant_location_key,
"pricingSummary": {
"price": {
"value": offer.summary_price_value,
"currency": offer.summary_price_currency
}
},
"sku": offer.sku,
"marketplaceId": offer.marketplace_id,
"format": offer.format
}
the offer.available_quantity etc are items from my database, its the structure I'm showing.