Add to Cart

Add to cart API is used for adding the user selected fares into the session. It returns the fares id, flight schedule ids and other relevant information, which need to provide in the subsequent APIs.

  • This API is used for adding the user selected fares into the booking session

Cart API should be executed once the mentioned below APIs are executed in order:

  1. Authentication
  2. Retrieve Fare

If combinability node in retrieve fare response is not empty then user should not allow to select non combinable solutions. If combinability tag is empty or null then all fares are combinable.

Note: Verify in response that the ExceptionLevel is 0 and the ExceptionDescription is Successful Transaction.

URL: https://devapi.flydubai.com/res/v3/order/cart

Method: POST

Headers:

      • Content-Type                    : application/json
      • Authorization                    : bearer<space> JWTToken

Body:

{
  "currency": "AED",
  "IATA": "05091989",
  "inventoryFilterMethod": 0,
  "securityGUID" : "",
  "originDestinations": [
    {
      "odID": 11267455,
      "origin": "DXB",
      "destination": "KWI",
      "flightNum": "051",
      "depDate": "2019-07-11T15:30:00",
      "isPromoApplied": false,
      "fareBrand": [
        {
          "fareBrandID": 3,
          "fareBrandName": "LITE",
          "fareInfos": [
            {
              "paxFareInfos": [
                {
                  "applicableTaxDetails": [
                    {
                      "amt": 35,
                      "taxCode": "F6",
                      "taxID": 8745
                    },
                    {
                      "amt": 75,
                      "taxCode": "AE",
                      "taxID": 1624
                    },
                    {
                      "amt": 5,
                      "taxCode": "TP",
                      "taxID": 4844
                    },
                    {
                      "amt": 5,
                      "taxCode": "ZR",
                      "taxID": 10386
                    },
                    {
                      "amt": 55,
                      "taxCode": "YQ",
                      "taxID": 4246
                    }
                  ],
                  "fareID": 2,
                  "ID": "1",
                  "FBC": "KO6AE2",
                  "fareClass": "K",
                  "cabin": "ECONOMY",
                  "baseFare": 190,
                  "ruleID": "",
                  "originalFare": 0,
                  "totalFare": 365,
                  "PTC": 1,
                  "seatAvailability": 9,
                  "infantAvailability": 0,
                  "secureHash": "hub/ENojFG/+5A34SWyPhg==",
                  "fareCarrier": "FZ"
                }
              ]
            }
          ]
        }
      ],
      "segmentDetails": [
        {
          "segmentID": 11081599,
          "origin": "DXB",
          "destination": "KWI",
          "depDate": "2019-07-11T15:30:00",
          "arrDate": "2019-07-11T16:20:00",
          "bookingCodes": [
            {
              "fareClass": "K",
              "cabin": "Economy",
              "paxID": [
                "1"
              ]
            }
          ],
          "OAFlight": false,
          "operCarrier": "FZ",
          "operFlightNum": "051",
          "mrktCarrier": "FZ",
          "mrktFlightNum": "051"
        }
      ]
    }
  ]
}

Response:

{
    "action": null,
    "loadTax": false,
    "SecurityGUID": "db0cb2593ed640bd69r47b737ewfnaj06dt0gbj75daa",
    "currency": "AED",
    "CurrencyOfFareQuote": "AED",
    "IATA": "05091989",
    "CorporationId": 0,
    "inventoryFilterMethod": null,
    "promoCode": null,
    "flightGroups": [
        {
            "ID": "11267455",
            "fareGroupID": "UXBxcIU4L2lCF7H9s42gkA==",
            "origin": "DXB",
            "destination": "KWI",
            "flightNum": "051",
            "depDate": "2019-07-11T15:30:00",
            "flightGroup": [
                "1"
            ],
            "fareBrands": [
                {
                    "fareBrandID": 3,
                    "fareBrand": null,
                    "fareInfos": [
                        {
                            "paxFareInfos": [
                                {
                                    "FBC": "KO6AE2",
                                    "HeldId": 0,
                                    "ID": 1,
                                    "PTC": 1,
                                    "PaxID": null,
                                    "applicableTaxDetails": [
                                        {
                                            "amt": 35,
                                            "taxCode": "F6",
                                            "taxID": 8745,
                                            "codeType": "TAX",
                                            "taxDesc": "Passenger Facilities Charge."
                                        },
                                        {
                                            "amt": 75,
                                            "taxCode": "AE",
                                            "taxID": 1624,
                                            "codeType": "TAX",
                                            "taxDesc": "Passenger Service Charge (Intl)"
                                        },
                                        {
                                            "amt": 5,
                                            "taxCode": "TP",
                                            "taxID": 4844,
                                            "codeType": "TAX",
                                            "taxDesc": "Passengers Security & Safety Service Fees"
                                        },
                                        {
                                            "amt": 5,
                                            "taxCode": "ZR",
                                            "taxID": 10386,
                                            "codeType": "TAX",
                                            "taxDesc": "Advanced passenger information fee"
                                        },
                                        {
                                            "amt": 55,
                                            "taxCode": "YQ",
                                            "taxID": 4246,
                                            "codeType": "TAX",
                                            "taxDesc": "YQ - DUMMY"
                                        }
                                    ],
                                    "baseFare": 190,
                                    "fareCarrier": "FZ",
                                    "fareID": 1,
                                    "originalFare": 0,
                                    "ruleID": null,
                                    "secureHash": "hub/ENojFG/+5A34SWyPhg==",
                                    "ticketDesignator": null,
                                    "totalFare": 365
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "originDestinations": [
        {
            "ID": "1",
            "odID": 11267455,
            "origin": "DXB",
            "destination": "KWI",
            "flightNum": "051",
            "depDate": "2019-07-11T15:30:00",
            "isPromoApplied": false,
            "fareBrands": [
                {
                    "fareBrandID": 3,
                    "fareBrand": null,
                    "fareInfos": [
                        {
                            "paxFareInfos": [
                                {
                                    "FBC": "KO6AE2",
                                    "HeldId": 0,
                                    "ID": 1,
                                    "PTC": 1,
                                    "PaxID": null,
                                    "applicableTaxDetails": [
                                        {
                                            "amt": 35,
                                            "taxCode": "F6",
                                            "taxID": 8745,
                                            "codeType": "TAX",
                                            "taxDesc": "Passenger Facilities Charge."
                                        },
                                        {
                                            "amt": 75,
                                            "taxCode": "AE",
                                            "taxID": 1624,
                                            "codeType": "TAX",
                                            "taxDesc": "Passenger Service Charge (Intl)"
                                        },
                                        {
                                            "amt": 5,
                                            "taxCode": "TP",
                                            "taxID": 4844,
                                            "codeType": "TAX",
                                            "taxDesc": "Passengers Security & Safety Service Fees"
                                        },
                                        {
                                            "amt": 5,
                                            "taxCode": "ZR",
                                            "taxID": 10386,
                                            "codeType": "TAX",
                                            "taxDesc": "Advanced passenger information fee"
                                        },
                                        {
                                            "amt": 55,
                                            "taxCode": "YQ",
                                            "taxID": 4246,
                                            "codeType": "TAX",
                                            "taxDesc": "YQ - DUMMY"
                                        }
                                    ],
                                    "baseFare": 190,
                                    "fareCarrier": "FZ",
                                    "fareID": 1,
                                    "originalFare": 0,
                                    "ruleID": null,
                                    "secureHash": "hub/ENojFG/+5A34SWyPhg==",
                                    "ticketDesignator": null,
                                    "totalFare": 365
                                }
                            ]
                        }
                    ]
                }
            ],
            "segmentDetails": [
                {
                    "segmentID": 11267455,
                    "origin": "DXB",
                    "destination": "KWI",
                    "depDate": "2019-07-11T15:30:00",
                    "legDetails": [
                        {
                            "arrDate": "2019-07-11T16:20:00",
                            "arrTerminal": "",
                            "depDate": "2019-07-11T15:30:00",
                            "depTerminal": "",
                            "destination": "KWI",
                            "legID": 118865,
                            "mrktCarrier": "FZ",
                            "mrktFlightNum": "0051",
                            "operCarrier": "FZ",
                            "operFlightNum": "051",
                            "origin": "DXB"
                        }
                    ],
                    "bookingCodes": [
                        {
                            "fareClass": "K",
                            "cabin": "Economy",
                            "paxID": [
                                1
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "OASegments": [],
    "ticketingInfo": [],
    "Exceptions": [
        {
            "ExceptionCode": 0,
            "ExceptionDescription": "Successful Transaction",
            "ExceptionSource": "SetChargesInSession",
            "ExceptionLevel": 0
        }
    ]
}