I need help on how to change the US DOLLAR currency into Philippine currency in Sabre REST API. Using the Bargain Finder Max.
It is need to change the currency because we are located in Philippines. Provided the code below and if there is a problem in credentials just post and i will create a new access token.
<?php
$key = "T1RLAQK5VRIz4u9UxsrtRpVkv3TPUpGDpxD3eZ1ylkey88VRPyWu7FXRAADAK01jW46inTdqwxIBMPzzfM30QkYRuzvEnf3wEslyMSLmfZMPfV0rTTjdyuv4EYAzi+276mRO3f1VRsDI+Y/VW+CRm82SYlgkp6cW+MhqltdgpnuP+uzDCL8aXE3yD3hcRXQPlEDbFtcjWQ1lLE1fmfr5+xrcHwtggEGcwRG4BDyVwDgKFucjSfE9jZ51ORnYpTPgfK6rDsyHU/rJr8QKb83PVqKBKD+L/FeKaqrQolkcn5Pdemg2bWFtaTzNoQCi";
$header[] = "Authorization: Bearer " . $key;
$header[] = "Accept: application/json";
$header[] = "Content-Type: application/json";
$data = '{
"OTA_AirLowFareSearchRQ": {
"Target": "Production",
"POS": {
"Source": [{
"PseudoCityCode":"F9CE",
"RequestorID": {
"Type": "1",
"ID": "1",
"CompanyName": {
}
}
}]
},
"OriginDestinationInformation": [{
"RPH": "1",
"DepartureDateTime": "2019-01-05T11:00:00",
"OriginLocation": {
"LocationCode": "CGK"
},
"DestinationLocation": {
"LocationCode": "SUB"
},
"TPA_Extensions": {
"SegmentType": {
"Code": "O"
}
}
},
{
"RPH": "2",
"DepartureDateTime": "2019-01-06T11:00:00",
"OriginLocation": {
"LocationCode": "CGK"
},
"DestinationLocation": {
"LocationCode": "SUB"
},
"TPA_Extensions": {
"SegmentType": {
"Code": "O"
}
}
}],
"TravelPreferences": {
"ValidInterlineTicket": true,
"CabinPref": [{
"Cabin": "Y",
"PreferLevel": "Preferred"
}],
"TPA_Extensions": {
"TripType": {
"Value": "Return"
},
"LongConnectTime": {
"Min": 780,
"Max": 1200,
"Enable": true
},
"ExcludeCallDirectCarriers": {
"Enabled": true
}
}
},
"TravelerInfoSummary": {
"SeatsRequested": [1],
"AirTravelerAvail": [{
"PassengerTypeQuantity": [{
"Code": "ADT",
"Quantity": 1
}]
}],
"PriceRequestInformation" : {
"CurrencyCode" : "PHP"
}
},
"TPA_Extensions": {
"IntelliSellTransaction": {
"RequestType": {
"Name": "50ITINS"
}
}
}
}
}';
$jsonstr = json_decode($data, true);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api-crt.cert.havail.sabre.com/v4.3.0/shop/flights?mode=live&limit=50&offset=1" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER,$header);
$result = curl_exec ($ch);
?>
I just added the code below:
"PriceRequestInformation" : {
"CurrencyCode" : "PHP"
}