POST /reservations/reprice

The POST verb will recalculate the price of a flight option from a /shop response to provide a more accurate price. Sometimes the price from a /shop does not include all taxes. This method should be called before create a booking.

Verb URI Description
POST /reservations/reprice/{ver}/{airline} Reprice a Flight

Path Parameters

Path Parameter Notes Example
ver API Version number v1
airline 2 character IATA code. MH

POST Data

The post data contains the pricedAvailOption string, which is one option from the /shop response.

The following is an example of JSON request string:


pricedAvailOption 
{
     "flights": [
       {
         "flightNumber": "1138",
         "departureAirport": {
           "code": "KUL",
           "name": "Kuala Lumpur Intl",
           "city": "Kuala Lumpur",
           "country": "Malaysia",
           "lat": 2.745578,
           "lng": 101.709917,
           "terminal": null,
           "gate": null,
           "timezone": "Asia/Kuala_Lumpur"
         },
         "arrivalAirport": {
           "code": "PEN",
           "name": "Penang Intl",
           "city": "Penang",
           "country": "Malaysia",
           "lat": 5.297139,
           "lng": 100.276864,
           "terminal": null,
           "gate": null,
           "timezone": "Asia/Kuala_Lumpur"
         },
         "marketingAirline": "MH",
         "operatingAirline": null,
         "equipment": "734",
         "equipmentName": "Boeing 737-400",
         "flightRPH": 10101,
         "comments": [],
         "depScheduled": "2013-12-14T09:15:00.000+08:00",
         "arrScheduled": "2013-12-14T10:05:00.000+08:00",
         "depEstimated": null,
         "depActual": null,
         "arrEstimated": null,
         "arrActual": null,
         "eligibleForEticketing": true,
         "cabin": "ECONOMY",
         "fareMarketingType": "FLEX_SAVER",
         "rbd": "L",
         "seatsAvailable": 9,
         "durationMinutes": 50,
         "minutesToScheduledFlightDeparture": 622
       }
     ],
     "stopOvers": [],
     "fareDetails": {
       "perPassengerJourneyFares": [
         {
           "passengerType": "ADT",
           "fare": "126",
           "currencyCode": "MYR"
         }
       ],
       "perPassengerTripTaxes": [
         {
           "passengerType": "ADT",
           "totalTax": "9",
           "taxes": [
             {
               "code": "MY",
               "amount": "9",
               "currency": "MYR"
             }
           ]
         }
       ],
       "journeyFare": "126",
       "totalTripFare": "135",
       "fareCurrency": "MYR"
     },
     
      "magicString":"pxfhxGywG8+dEFBzALNIMj6GCr0dkhCqBHysvDT/mP8L0K+xg6LHqKWkaaCB+vBhgTUZZUUyrd6sK
      /Zop1zcQoSgZSOQRYI+OJfz/muVkQyf2958ouXwGtz5k5Gt52I/Vqb/E2rvbLxRcneANC8t/pROAzK0D
      S/ALqrTmz97FSoHOiO7gcn4szPu7Gyu5nuNV8pnIv7vzN9fka4yWiBAKDQlSYknmRxCKXP0X1PJZVSE4Fnr
      27tghTSuZyqIqkhdTbPqlLe6CriKMX7N+sTw2kv3smg3tL6OCn4E0fD9A
      /TM5zFQEU3m2JXAU2EQERbGDffrgalXE8Mxzyrh4qgXkvP9sl5YULXZURgcJoOVrRutMelIHG6SmTnOsM3sxxUCAJ
      /DRnFEgJgBmHA9Gsz+Q6LgMu0E9DNy6oLIxOIxY6Q9gXSqViFPCFjV+LoC9YJN9M6RWKFJVr3Wvo2UQLj
      TurxDkhwrqLyt6OlFywqRkktEwowWN4TuyiY2uhLp4KmAFTpzRHvMCnb5Crt3SUYogW0taRPi86odH9x6O
      LeRiFRFXUIZpEVJ1dxNvIDAetie095gwR93LXZ16XYovHhcwApYgxtVWCxPC9LgeqdVZnEwd7ossWIFacA
      hdiv0yDZYyJy0gJgu6ZHX86KRWZMSpscwMg6ujoue1kWELNDFz7cUavpajS27ZawEjLLL3+l5ZNjBxWSLC
      rI/S8GtLyBXECScl9jvvqzIqwIpO9wnmz5nTCc72pmssEftdBtoJTgl/PJd4E+ob+
      /jdGIzxt25Ql8WYKzlBlpLbQi1tG1MzUFHall1CJs6trYHci9Jq7BUX4XLsxdPkYDcztdBz4H9mLcXc+CT
      INHhyWtB9hn0XqHtUae1gGL7BWNoSuNCDxqCuf2Tcfqwz1D/uUY7WA1O
      /jPmXiSegAjejnxAyT5uZKX1XPrYHlUISclZX8ehpPgaK6ScgoQvXlAlW+oeT0c7IF8v0tQvbldFHsq3
      /nMC9s
      /a6LJ/Iq3xSxMuFgAMtZqwI+3pfqAklQb3rmgdnTXdoct1BaafemkHIbuQCh4czs+ZcgIjKeiGvrTBS42u
      fjv3LoG1DlXZzQqUqAaQfB/mw/
      3K7nnBTLdRTz3wqkBvImIA9a8lhD2/NumwrHfpD5CqnB2erw==",
     "seatsAvailable": [
       9
     ],
     "corporateAccount": false,
     "flightCanBeHeld": true,
     "durationMinutes": 50,
     "directFlight": true,
     "lowestSeatCount": 9,
     "eligibleForeTicketing": true
   } 
} 

Response Data

The response will contain the pricedAvailOption with updated magicString if the final price is different than the price quoted from the /shop.