Booking | SellSSR

Set SSR for an itinerary and passenger specified in the request. Passengers should be set before current API.

Notice:
Product Scope : TechHub, FareMarket

POST

/flight/booking

Parameter

Field Mandatory Type Scope Description
action required String SellSSR
key required String API security key applied from AeroHub
signature required String Refer to Guideline to generate.
timestamp required Int The ‘timestamp’ field should be a 10-digit Unix timestamp in seconds, used for encryption and data verification.
version optional String API version information, e.g. 3.0.0
request required Object
  sessionId required String SessionId,generated from AirPricing
  journeySSRS required Object[]
    flightNumbers required Object[] The flight number of the request segment .eg. [VJ302]. There are multi flight numbers if it’s connection flight
    journeyNumber required Int Journey type, 1 represent departure journey, 2 represent arrival journey
    journeyType required Int Journey fare type. 1 represent fare by journey, 2 represent fare by segment
    ssrs required Obeject[] Passenger Ancillary info
      passengerId required String Passenger Id,Same as passengerId of SetPanssengers
      amount required float price,
retrieve from GetSSRAvailability.
      currency required String currency,
retrieve from GetSSRAvailability.
      originalAmount required Float Fare amount from airlines,
retrieve from GetSSRAvailability.
      originalCurrency required String Currency information, 3-Letter Codes e.g. USD,
retrieve from GetSSRAvailability.
      applyType required int 0: ALL, 1: DURING_BOOKING, 2: POST_BOOKING,
retrieve from GetSSRAvailability.
      code required String Unique identify code for SSR Code,
retrieve from GetSSRAvailability.
      data required String Input paramenter from GetSSRAvailability,
retrieve from GetSSRAvailability.
      name required String ssr display name,
retrieve from GetSSRAvailability.
      type required int Type, 0: Checkin Baggage; 1: Cabin Baggage; 2: Online Checkin; 3: Cabin Baggage + Priority Boarding Package; 4: Seat;
retrieve from GetSSRAvailability.
      weight required Int baggage weight, visible when type is 0
      unit required String baggage unit, visible when type is 0
      count required int SSR count

Request_Example:

{
    "action": "SellSSR",
    "key": "n93mPT7WzN6cLKC2",
    "signature": "YhQ2EoBQOfOnf/EOnuuuK5i+K+ncydeQhjFpoXYiEMo=",
    "timestamp": 1685116516,
    "request":
    {
        "journeySSRS":
        [
            {
                "flightNumbers":
                [
                    "VZ100"
                ],
                "journeyNumber": 1,
                "journeyType": 2,
                "ssrs":
                [
                    {
                        "amount": 20.98,
                        "applyType": 1,
                        "code": "BG15",
                        "count": 1,
                        "currency": "USD",
                        "data": "eyJwdXJjaGFzZV9rZXkiOiAieXEyQ1oxZFZseWJ5eFFFVERwMUQ1WDk0bTNJdTBcdTAwYTVcdTAxOTJJZE55M3RTUnpnaHBqZjNWQ1FKVFQ5cGxzTndPZERJc09LNTJMMFx1MDE5MnI3RTdkN2RzM0JcdTAxOTJkXHUwMGE1ck5FU3g1V0QwdzVua3g0dFNBXHUwMTkyZzRxeklUSER5b1F0RHdmUWFLT3hUYlJcdTAwYTVRUFNIbmJuQjJERDNGOEMzb1F1VGJEandpZnhkVVY5QWN0WDlSWFFGbGlyTDNzeE1TYTd6WkQ2Wlx1MDE5MlVkZDNPaWpoTWtvcFVMbmxFN01pM290VUdYY2J3ek1MUVdSXHUwMGE1YXJQelp2ZUZIbmtpTE1yVT0ifQ==",
                        "maxCount": 1,
                        "name": "Bag 15kgs (VZ)",
                        "originalAmount": 379.85,
                        "originalCurrency": "THB",
                        "passengerId": 0,
                        "type": 0,
                        "unit": "KG",
                        "weight": 15
                    }
                ]
            }
        ],
        "sessionId": "1592qweq95e8d7ewqeq69d268611eafb9cfc1b"
    },
    "version": "v2.0.3"
}

Response

Notes

The price included in the API response comprises the total price of both the ticket and ancillary products when purchased together with the ticket. When purchasing ancillary products separately, it only includes the price of the ancillary products.

Field Type Description
status int 0 for success, others for failure, refer to status error appendix for details
msg String Return message, maximum 64 char
contentStatus int Return the original code from airlines or suppliers.
contentMsg String Return the original message from airlines or suppliers, maximum 64 char
amount Float total amount of requested SSR
currency String Currency information, 3_letter code e.g. USD
originalAmount Float total amount of requested SSR
originalCurrency String Currency information, 3_letter code e.g. USD
balanceDue Float amount due

Success-Response:

{
    "status": 0,
    "msg": "success",
    "balanceDue": 1800.0,
    "originalAmount":  8336.15975232,
    "originalCurrency": "TWD",
    "amount":1800,
    "currency": "USD",
    "contentStatus": 0,
    "contentMsg": "success"
}

Status Code

Name Description
1000 General system error
1001 Request parameters or part of parameters missing
1002 Invalid Action
1003 API request timeout, please request again
1004 Invalid request parameter
1005 Service system error
1006 System busy, please try again
1101 Authentication fail, wrong signature
1102 Account disabled, please contact with account administrator
2002 No valid Journey in the current session
2003 No passengers in the current session
2009 PassengerID does not exist
2102 SSR Code in the request not match with Code in GetSSRAvailability
Author:admin  Create time:2023-05-24 16:06
Last editor:AeroHub  Update time:2025-04-22 14:25