I want to create booking and generate PNR using amadeus API
I have follow step
- serach with origin and destination and one way trip to get list of result using below API https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-search/api-reference
- Then verify selected offer price to get actual flight fare price.To verify selected offer price I have used below API https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-price/api-reference
But I am facing below issue to verify flight offer price and get actual flight fare.
I got list of flight offer price when search flght with "BLR" as from and "LAX" as to and one way trip using amadeus flight-offers-search API.
I have called another api "flight-offers-price" to verify flight offer price to get actual offer price.
I got response with actual flight fare price and show result when search filght with "BLR" as from and "LAX" as to and one way trip
i have use this API https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-price/api-reference
This is my request parameter
{
"data": {
"type": "flight-offers-pricing",
"flightOffers": [
{
"type": "flight-offer",
"id": "1",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2021-07-06",
"numberOfBookableSeats": 4,
"itineraries": [
{"duration": "PT30H58M",
"segments": [
{"departure": {"iataCode": "BLR","at": "2021-07-12T03:05:00"},
"arrival": {"iataCode": "FRA","terminal": "1","at": "2021-07-12T09:00:00"
},
"carrierCode": "AC",
"number": "9057",
"aircraft": {"code": "74H"},
"operating": {"carrierCode": "LH"},
"duration": "PT9H25M",
"id": "256",
"numberOfStops": 0,
"blacklistedInEU": false
},
{
"departure": {"iataCode": "FRA","terminal": "1","at": "2021-07-12T13:20:00"
},
"arrival": {"iataCode": "YVR","terminal": "M","at": "2021-07-12T14:15:00"
},
"carrierCode": "AC",
"number": "9101",
"aircraft": {"code": "744"},
"operating": {"carrierCode": "LH"},
"duration": "PT9H55M",
"id": "257",
"numberOfStops": 0,
"blacklistedInEU": false
},
{
"departure": {
"iataCode": "YVR",
"terminal": "M",
"at": "2021-07-12T18:35:00"
},
"arrival": {
"iataCode": "LAX",
"terminal": "6",
"at": "2021-07-12T21:33:00"
},
"carrierCode": "AC",
"number": "558",
"aircraft": {"code": "320"},
"operating": {"carrierCode": "AC"},
"duration": "PT2H58M",
"id": "258",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
}
],
"price": {
"currency": "USD",
"total": "545.62",
"base": "201.00",
"fees": [
{"amount": "0.00","type": "SUPPLIER"},
{"amount": "0.00","type": "TICKETING"
}
],
"grandTotal": "545.62"
},
"pricingOptions": {
"fareType": ["PUBLISHED"],
"includedCheckedBagsOnly": true
},
"validatingAirlineCodes": ["AC"],
"travelerPricings": [
{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {"currency": "USD","total": "545.62","base": "201.00"},
"fareDetailsBySegment": [
{
"segmentId": "256",
"cabin": "ECONOMY",
"fareBasis": "KRCZOAAW",
"class": "K",
"includedCheckedBags": {
"quantity": 2
}
},
{
"segmentId": "257",
"cabin": "ECONOMY",
"fareBasis": "KRCZOAAW",
"class": "K",
"includedCheckedBags": {"quantity": 2}
},
{
"segmentId": "258",
"cabin": "ECONOMY",
"fareBasis": "KRCZOAAW",
"brandedFare": "STANDARD",
"class": "K",
"includedCheckedBags": {"quantity": 2}
}
]
}
]
}
]
}
}
This is my API Response
stdClass Object
(
[data] => stdClass Object (
[type] => flight-offers-pricing
[flightOffers] => Array (
[0] => stdClass Object (
[type] => flight-offer
[id] => 1
[source] => GDS
[instantTicketingRequired] =>
[nonHomogeneous] =>
[paymentCardRequired] =>
[lastTicketingDate] => 2021-07-06
[itineraries] => Array(
[0] => stdClass Object(
[segments] => Array(
[0] => stdClass Object (
[departure] => stdClass Object (
[iataCode] => BLR
[at] => 2021-07-12T03:05:00
)
[arrival] => stdClass Object (
[iataCode] => FRA
[terminal] => 1
[at] => 2021-07-12T09:00:00
)
[carrierCode] => AC
[number] => 9057
[aircraft] => stdClass Object (
[code] => 74H
)
[operating] => stdClass Object (
[carrierCode] => LH
)
[duration] => PT9H25M
[id] => 256
[numberOfStops] => 0
[co2Emissions] => Array(
[0] => stdClass Object(
[weight] => 353
[weightUnit] => KG
[cabin] => ECONOMY
)
)
)
[1] => stdClass Object (
[departure] => stdClass Object (
[iataCode] => FRA
[terminal] => 1
[at] => 2021-07-12T13:20:00
)
[arrival] => stdClass Object (
[iataCode] => YVR
[terminal] => M
[at] => 2021-07-12T14:15:00
)
[carrierCode] => AC
[number] => 9101
[aircraft] => stdClass Object
(
[code] => 744
)
[operating] => stdClass Object
(
[carrierCode] => LH
)
[duration] => PT9H55M
[id] => 257
[numberOfStops] => 0
[co2Emissions] => Array
(
[0] => stdClass Object
(
[weight] => 502
[weightUnit] => KG
[cabin] => ECONOMY
)
)
)
[2] => stdClass Object
(
[departure] => stdClass Object
(
[iataCode] => YVR
[terminal] => M
[at] => 2021-07-12T18:35:00
)
[arrival] => stdClass Object
(
[iataCode] => LAX
[terminal] => 6
[at] => 2021-07-12T21:33:00
)
[carrierCode] => AC
[number] => 558
[aircraft] => stdClass Object
(
[code] => 320
)
[operating] => stdClass Object
(
[carrierCode] => AC
)
[duration] => PT2H58M
[id] => 258
[numberOfStops] => 0
[co2Emissions] => Array
(
[0] => stdClass Object
(
[weight] => 171
[weightUnit] => KG
[cabin] => ECONOMY
)
)
)
)
)
)
[price] => stdClass Object
(
[currency] => USD
[total] => 545.62
[base] => 201.00
[fees] => Array
(
[0] => stdClass Object
(
[amount] => 0.00
[type] => SUPPLIER
)
[1] => stdClass Object
(
[amount] => 0.00
[type] => TICKETING
)
[2] => stdClass Object
(
[amount] => 0.00
[type] => FORM_OF_PAYMENT
)
)
[grandTotal] => 545.62
[billingCurrency] => USD
)
)
)
But when i serach flight with "CCU" as from and "Lax" as to and one way trip then i got list of flight fare price offer. and choose specific price to booking then i called same API with same request parameter but value was different depending on origin and destination to verify flight fare and get actual flight price,then API return response with error "INVALID DATA RECEIVED" code : 4926.
I have use these api https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-price/api-reference This is my another api request parameter
{
"data": {
"type": "flight-offers-pricing",
"flightOffers": [
{
"type": "flight-offer",
"id": "1",
"source": "GDS",
"instantTicketingRequired": false,
"nonHomogeneous": false,
"oneWay": false,
"lastTicketingDate": "2021-07-06",
"numberOfBookableSeats": 3,
"itineraries": [
{
"duration": "PT30H38M",
"segments": [
{
"departure": {
"iataCode": "CCU",
"at": "2021-07-12T15:20:00"
},
"arrival": {
"iataCode": "DEL",
"terminal": "3",
"at": "2021-07-12T17:45:00"
},
"carrierCode": "UA",
"number": "7726",
"aircraft": {
"code": "320"
},
"operating": {
"carrierCode": "UK"
},
"duration": "PT2H25M",
"id": "141",
"numberOfStops": 0,
"blacklistedInEU": false
},
{
"departure": {
"iataCode": "DEL",
"terminal": "3",
"at": "2021-07-12T23:35:00"
},
"arrival": {
"iataCode": "EWR",
"terminal": "B",
"at": "2021-07-13T04:30:00"
},
"carrierCode": "UA",
"number": "83",
"aircraft": {
"code": "77W"
},
"operating": {
"carrierCode": "UA"
},
"duration": "PT14H25M",
"id": "142",
"numberOfStops": 0,
"blacklistedInEU": false
},
{
"departure": {
"iataCode": "EWR",
"terminal": "C",
"at": "2021-07-13T06:00:00"
},
"arrival": {
"iataCode": "LAX",
"terminal": "7",
"at": "2021-07-13T09:28:00"
},
"carrierCode": "UA",
"number": "2434",
"aircraft": {
"code": "752"
},
"operating": {
"carrierCode": "UA"
},
"duration": "PT6H28M",
"id": "143",
"numberOfStops": 0,
"blacklistedInEU": false
}
]
}
],
"price": {
"currency": "USD",
"total": "712.89",
"base": "336.00",
"fees": [
{
"amount": "0.00",
"type": "SUPPLIER"
},
{
"amount": "0.00",
"type": "TICKETING"
}
],
"grandTotal": "712.89"
},
"pricingOptions": {
"fareType": [
"PUBLISHED"
],
"includedCheckedBagsOnly": true
},
"validatingAirlineCodes": [
"UA"
],
"travelerPricings": [
{
"travelerId": "1",
"fareOption": "STANDARD",
"travelerType": "ADULT",
"price": {
"currency": "USD",
"total": "712.89",
"base": "336.00"
},
"fareDetailsBySegment": [
{
"segmentId": "141",
"cabin": "ECONOMY",
"fareBasis": "KRCZOAAW",
"class": "K",
"includedCheckedBags": {
"quantity": 1
}
},
{
"segmentId": "142",
"cabin": "ECONOMY",
"fareBasis": "KRCZOAAW",
"class": "K",
"includedCheckedBags": {
"quantity": 1
}
},
{
"segmentId": "143",
"cabin": "ECONOMY",
"fareBasis": "KRCZOAAW",
"brandedFare": "ECONOMY",
"class": "K",
"includedCheckedBags": {
"quantity": 1
}
}
]
}
]
}
]
}
}
This is the API response
stdClass Object
(
[errors] => Array
(
[0] => stdClass Object
(
[code] => 4926
[title] => INVALID DATA RECEIVED
[detail] => No fare applicable
[status] => 400
)
)
)
That mean API return error using some specific origin and destination to get actual flight price for booking.
please guide me how to find out the issue and solve it Thanks