FlightRoutes24 API(Purchaser)
  1. FR24_API_V1.1.0
FlightRoutes24 API(Purchaser)
  • FR24_API_V1.1.0
    • API Work Flow
    • Introduction
    • Appendix
    • 错误码
    • Error Code
    • Shopping
      POST
    • Pricing
      POST
    • PresaleAncillaryShopping
      POST
    • Booking
      POST
    • Ticketing
      POST
    • OrderDetail
      POST
    • PostsaleAncillaryShopping
      POST
    • AncillaryBooking
      POST
    • AncillaryPurchase
      POST
    • AncillaryOrderDetail
      POST
    • ChangeReshop
      POST
    • ReissueRequest
      POST
    • RefundRequest
      POST
    • RefundConfirming
      POST
    • VoidRequest
      POST
  1. FR24_API_V1.1.0

Shopping

POST
/api/new/shopping.do
Searching available flight information through the Shopping API, supports one-way, round trip, notch route.

Request

Header Params
Accept-Encoding
string 
required
Use gzip compression format
Default:
gzip, deflate, br
content-Type
string 
required
Response format
Default:
application/json
appKey
string 
required
User account
Default:
{{appKey}}
Body Params application/json
authentication
object 
User authentication
required
sign
string 
Signature
required
The encrypted string of appkey, appSecret and timestamp.Refer to Appendix I
timestamp
string 
Unix timestamp
required
measuring in Second
searchLegs
array[object (Searching for segment information) {5}] 
Searching for segment information
required
which maximum is 6-segments
>= 1 items<= 6 items
origin
string 
Departure city
required
code by IATA
>= 3 characters<= 3 characters
typeO
enum<string> 
The origin type restrictions
optional
airportcode: The type of origin is an airportcode airportgroup: The origin type is a city code
Allowed values:
airportcodeairportgroup
destination
string 
Arrival city
required
code by IATA
>= 3 characters<= 3 characters
typeD
enum<string> 
The destination type restrictions
optional
airportcode: The type of origin is an airportcode airportgroup: The origin type is a city code
Allowed values:
airportcodeairportgroup
depDate
string <date>
Departure date
required
YYYY-MM-DD
>= 10 characters<= 10 characters
Match pattern:
^\d{4}-\d{2}-\d{2}$
adultNum
integer 
The total number of adult passengers
required
The sum of adults, children and infants cannot be greater than 9.
>= 1<= 9
Default:
0
childNum
integer 
The total number of children passenger
required
One adult can only take two children or infants in total.
>= 0<= 9
Default:
0
infantNum
integer 
The total number of infant passengers
required
One adult can only take two children or infants in total.
>= 0<= 9
Default:
0
preferences
object 
Search preference
required
You can set up preferences to get filtered results.
Following preferences are provided:
Cabin
cabin
enum<string> 
Cabin preference
optional
If you choose not to set up, your acquiescence is Economy.
>= 0 characters<= 1 characters
Allowed values:
FCPY
Default:
Y
Example
{
    "authentication": {
        "sign": "{{sign}}",
        "timestamp": "{{timestamp}}"
    },
    "searchLegs": [
        {
            "origin": "BKK",
            "typeO": null,
            "destination": "SIN",
            "typeD": null,
            "depDate": "2024-10-24"
        },
        {
            "origin": "SIN",
            "typeO": null,
            "destination": "BKK",
            "typeD": null,
            "depDate": "2024-11-17"
        }
    ],
    "adultNum": 1,
    "childNum": 0,
    "infantNum": 0,
    "preferences": {
        "cabin": "Y",
        "preferredCarrier": null,
        "prohibitedCarrier": null,
        "stops": null,
        "resultCtrl": null
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://flight-test.flightroutes24.com/api/new/shopping.do' \
--header 'Accept-Encoding;' \
--header 'appKey;' \
--header 'content-Type: application/json' \
--data-raw '{
    "authentication": {
        "sign": "",
        "timestamp": ""
    },
    "searchLegs": [
        {
            "origin": "BKK",
            "typeO": null,
            "destination": "SIN",
            "typeD": null,
            "depDate": "2024-10-24"
        },
        {
            "origin": "SIN",
            "typeO": null,
            "destination": "BKK",
            "typeD": null,
            "depDate": "2024-11-17"
        }
    ],
    "adultNum": 1,
    "childNum": 0,
    "infantNum": 0,
    "preferences": {
        "cabin": "Y",
        "preferredCarrier": null,
        "prohibitedCarrier": null,
        "stops": null,
        "resultCtrl": null
    }
}'

Responses

🟢200OK
application/json
Body
traceId
string 
Traceability code
required
traceId can help locate problems when problems occur between partners and FR24.
code
string 
Status code
required
000000 means success, others mean failure.
message
string 
Error code message
required
processingTime
number 
Processing time
required
measuring in ms
data
object 
All the data returned according to the Request
required
All the data returned according to the Request.
If code returns failure, data would be empty.
offers
array[object (Price information) {16}] 
Price information
required
returns combination of direct flight and transit.
legs
array[object (Itinerary information) {2}] 
Itinerary information
required
returns all flight combinations
segments
array [object {16}] 
Flight information
required
returns all non-duplicated segments.
Example
{
    "traceId": "queryFlight_NEWAPI24093010481195307702",
    "code": "000000",
    "message": "ok",
    "processingTime": 1064,
    "data": {
        "offers": [
            {
                "offerId": "17981625171120128",
                "legId": "4ad38e31d03829dae6035cf4eb6fc972",
                "currency": "USD",
                "platingCarrier": "FD",
                "pricePerPax": [
                    {
                        "paxType": "ADT",
                        "baseFare": 315.2,
                        "totalTax": 40.02,
                        "taxBreakdown": [],
                        "serviceFee": null
                    }
                ],
                "cabin": [
                    "Y",
                    "Y"
                ],
                "fareBasis": [
                    "DSVFED",
                    "DSVFED"
                ],
                "availability": [
                    "9",
                    "5"
                ],
                "extraInfo": {
                    "freeBaggageAllowance": [
                        {
                            "segmentId": "cdabc75289fb9dcf917526324de0e878",
                            "cabinBagPc": "0-0-0",
                            "cabinBagSize": "e-e-e",
                            "cabinBagWeight": "0-0-0",
                            "checkedBagPc": "0-0-0",
                            "checkedBagSize": "e-e-e",
                            "checkedBagWeight": "0-0-0"
                        },
                        {
                            "segmentId": "82ba60be4c9f9af3c2cdb06dd78403ae",
                            "cabinBagPc": "0-0-0",
                            "cabinBagSize": "e-e-e",
                            "cabinBagWeight": "0-0-0",
                            "checkedBagPc": "0-0-0",
                            "checkedBagSize": "e-e-e",
                            "checkedBagWeight": "0-0-0"
                        }
                    ]
                },
                "eligibilityFlag": true,
                "eligibilityDetail": null,
                "rules": {
                    "refund": [
                        {
                            "paxType": "ADT",
                            "couponStatus": 1,
                            "refundPolicy": "withCondition",
                            "applicableTime": [
                                null,
                                null
                            ],
                            "fullRefundAP": null,
                            "refundFee": 99
                        },
                        {
                            "paxType": "CHD",
                            "couponStatus": 1,
                            "refundPolicy": "withCondition",
                            "applicableTime": [
                                null,
                                null
                            ],
                            "fullRefundAP": null,
                            "refundFee": 99
                        }
                    ],
                    "change": [
                        {
                            "paxType": "ADT",
                            "couponStatus": 1,
                            "changePolicy": "withCondition",
                            "applicableTime": [
                                null,
                                null
                            ],
                            "changeFee": 99
                        },
                        {
                            "paxType": "CHD",
                            "couponStatus": 1,
                            "changePolicy": "withCondition",
                            "applicableTime": [
                                null,
                                null
                            ],
                            "changeFee": 99
                        }
                    ]
                },
                "productType": null,
                "productTag": {
                    "ticketPromise": null,
                    "refuseDeadline": null,
                    "ticketingTime": null,
                    "reschedulePendingTime": null,
                    "voluntaryRefundTime": null,
                    "involuntaryRefundTime": null,
                    "refundCondition": null,
                    "reissueCondition": null,
                    "voidingCondition": false,
                    "voluntaryServiceStandard": null,
                    "involuntaryServiceStandard": null,
                    "rescheduleProcessingTime": null,
                    "RBDChangedRisk": false
                },
                "productSource": "OTH",
                "fareBrand": [
                    "basic eco",
                    "basic eco"
                ],
                "posArea": [
                    "US",
                    "US"
                ],
                "RBD": [
                    "Y",
                    "Y"
                ]
            },
            {
                "offerId": "17981625171120129",
                "legId": "aaabd8d12abef43eff289cb54d0f9483",
                "currency": "USD",
                "platingCarrier": "OX",
                "pricePerPax": [
                    {
                        "paxType": "ADT",
                        "baseFare": 315.2,
                        "totalTax": 40.02,
                        "taxBreakdown": [],
                        "serviceFee": null
                    }
                ],
                "cabin": [
                    "Y",
                    "Y"
                ],
                "fareBasis": [
                    "DSVFED",
                    "DSVFED"
                ],
                "availability": [
                    "5",
                    "9"
                ],
                "extraInfo": {
                    "freeBaggageAllowance": [
                        {
                            "segmentId": "f82d1f8d50510f832be133ed56d2a0b7",
                            "cabinBagPc": "0-0-0",
                            "cabinBagSize": "e-e-e",
                            "cabinBagWeight": "0-0-0",
                            "checkedBagPc": "0-0-0",
                            "checkedBagSize": "e-e-e",
                            "checkedBagWeight": "0-0-0"
                        },
                        {
                            "segmentId": "a06798eafa401c5b028dd4f7f10178d1",
                            "cabinBagPc": "0-0-0",
                            "cabinBagSize": "e-e-e",
                            "cabinBagWeight": "0-0-0",
                            "checkedBagPc": "0-0-0",
                            "checkedBagSize": "e-e-e",
                            "checkedBagWeight": "0-0-0"
                        }
                    ]
                },
                "eligibilityFlag": true,
                "eligibilityDetail": null,
                "rules": {
                    "refund": [
                        {
                            "paxType": "ADT",
                            "couponStatus": 1,
                            "refundPolicy": "withCondition",
                            "applicableTime": [
                                null,
                                null
                            ],
                            "fullRefundAP": null,
                            "refundFee": 99
                        },
                        {
                            "paxType": "CHD",
                            "couponStatus": 1,
                            "refundPolicy": "withCondition",
                            "applicableTime": [
                                null,
                                null
                            ],
                            "fullRefundAP": null,
                            "refundFee": 99
                        }
                    ],
                    "change": [
                        {
                            "paxType": "ADT",
                            "couponStatus": 1,
                            "changePolicy": "withCondition",
                            "applicableTime": [
                                null,
                                null
                            ],
                            "changeFee": 99
                        },
                        {
                            "paxType": "CHD",
                            "couponStatus": 1,
                            "changePolicy": "withCondition",
                            "applicableTime": [
                                null,
                                null
                            ],
                            "changeFee": 99
                        }
                    ]
                },
                "productType": null,
                "productTag": {
                    "ticketPromise": null,
                    "refuseDeadline": null,
                    "ticketingTime": null,
                    "reschedulePendingTime": null,
                    "voluntaryRefundTime": null,
                    "involuntaryRefundTime": null,
                    "refundCondition": null,
                    "reissueCondition": null,
                    "voidingCondition": false,
                    "voluntaryServiceStandard": null,
                    "involuntaryServiceStandard": null,
                    "rescheduleProcessingTime": null,
                    "RBDChangedRisk": false
                },
                "productSource": "OTH",
                "fareBrand": [
                    "basic eco",
                    "basic eco"
                ],
                "posArea": [
                    "US",
                    "US"
                ],
                "RBD": [
                    "Y",
                    "Y"
                ]
            }
        ],
        "legs": [
            {
                "legId": "4ad38e31d03829dae6035cf4eb6fc972",
                "segmentIds": [
                    "cdabc75289fb9dcf917526324de0e878",
                    "82ba60be4c9f9af3c2cdb06dd78403ae"
                ]
            },
            {
                "legId": "aaabd8d12abef43eff289cb54d0f9483",
                "segmentIds": [
                    "f82d1f8d50510f832be133ed56d2a0b7",
                    "a06798eafa401c5b028dd4f7f10178d1"
                ]
            }
        ],
        "segments": [
            {
                "segmentId": "cdabc75289fb9dcf917526324de0e878",
                "duration": 1492,
                "carrier": "FD",
                "flightNo": "8750",
                "codeShare": false,
                "operatingCarrier": "FD",
                "operatingFlightNo": "FD8750",
                "aircraftCode": "空客A300",
                "depAirport": "DMK",
                "depTerminal": "T1",
                "depTime": "2024-10-24T03:18",
                "arrAirport": "SIN",
                "arrTerminal": "T2",
                "arrTime": "2024-10-25T05:10",
                "stopAirport": null,
                "stopDuration": null
            },
            {
                "segmentId": "82ba60be4c9f9af3c2cdb06dd78403ae",
                "duration": 1612,
                "carrier": "FD",
                "flightNo": "2271",
                "codeShare": false,
                "operatingCarrier": "FD",
                "operatingFlightNo": "FD2271",
                "aircraftCode": "空客A300",
                "depAirport": "SIN",
                "depTerminal": "T1",
                "depTime": "2024-11-17T03:18",
                "arrAirport": "BKK",
                "arrTerminal": "T2",
                "arrTime": "2024-11-18T05:10",
                "stopAirport": null,
                "stopDuration": null
            },
            {
                "segmentId": "f82d1f8d50510f832be133ed56d2a0b7",
                "duration": 776,
                "carrier": "OX",
                "flightNo": "8335",
                "codeShare": false,
                "operatingCarrier": "OX",
                "operatingFlightNo": "OX8335",
                "aircraftCode": "波音767",
                "depAirport": "BKK",
                "depTerminal": "T1",
                "depTime": "2024-10-24T21:58",
                "arrAirport": "SIN",
                "arrTerminal": "T2",
                "arrTime": "2024-10-25T11:54",
                "stopAirport": null,
                "stopDuration": null
            },
            {
                "segmentId": "a06798eafa401c5b028dd4f7f10178d1",
                "duration": 896,
                "carrier": "OX",
                "flightNo": "6546",
                "codeShare": false,
                "operatingCarrier": "OX",
                "operatingFlightNo": "OX6546",
                "aircraftCode": "波音767",
                "depAirport": "XSP",
                "depTerminal": "T1",
                "depTime": "2024-11-17T21:58",
                "arrAirport": "BKK",
                "arrTerminal": "T2",
                "arrTime": "2024-11-18T11:54",
                "stopAirport": null,
                "stopDuration": null
            }
        ]
    }
}
Modified at 2024-10-17 07:14:34
Previous
Error Code
Next
Pricing
Built with