Query Product
Update Date: 2024-03-26 Mandatory Online test(Sandbox)
Summary
- This interface is used to query prices, You should return the available car types and corresponding quotes.
- Performance requirements: The response must be within 2000ms, preferably within 1000ms.
API address
API address Format: {Domain}/JNT/productquery/2.0/{timeStamp}/{sign}
Request Payload
QueryProductRequest
Parameter | Type | Required | Description | Example | Note |
---|---|---|---|---|---|
categoryCode | String | Y | Service Type | airport-pickup | Service Type |
fromType | Integer | Y | channel | 1 | Booking channel source, 1:Ctrip&Trip App, 2:Air tickets, 3:Trip.Biz, 4:Trip.Biz-MICE |
duseLocation | GeoDTO | Y | Address of Departure | ||
auseLocation | GeoDTO | Y | Address of Arrival | ||
useTime | String | Y | Use Time | 2020-08-28 14:46 | Local Time, Format:yyyy-MM-dd HH:mm, For airport pick-up, please use the flight landing time plus the buffer time to calculate use time. For airport drop-off, customers can choose use time themselves. |
fixedLocation | FixedLocationDTO | Y | Airport/Station Info | ||
flightNumber | String | N | Flight Number | EU2777 | |
departDelayTime | Integer | N | Buffer time:Use car after landing | 20 | Unit: Minute;Note 1:only airport-pickup has value |
language | String | Y | Site Language | zh-CN | It means user's site and language preference, empty means zh-CN. Please use it as a hint for both customer service and driver language. Site Language list |
estimation | EstimationStandardDTO | N | Estimated Information | Note 1:This information only for reference. We recommend that suppliers calculate the estimated mileage and duration based on the starting and ending points |
GeoDTO
Parameter | Type | Required | Description | Example | Note |
---|---|---|---|---|---|
address | String | Y | Address | Ctrip headquarters building | POI name |
detailAddress | String | Y | Address Detail | Skysoho 16, No. 968 Jin Zhong Road,Changning District, Shanghai | POI address |
longitude | BigDecimal | Y | Longitude | 121.351145 | Keep 6 decimal places |
latitude | BigDecimal | Y | Latitude | 31.221373 | Keep 6 decimal places |
geoType | String | Y | Geographic Coordinate System | GCJ02 | GCJ02 is used in China, and WGS84 is used outside China (including China Hong Kong, Macao and Taiwan). |
cityId | String | Y | City Id | 258 | City ID List |
cityName | String | Y | City Name | Fuzhou | City ID List |
We will prioritize providing address information based on the site language selected by the user. For example, if a customer places an order on the Korean site, we will prioritize providing Korean address information, but in some cases, we can only provide Chinese or English address information. If you only need English address information, please contact Ctrip PM
FixedLocationDTO
Parameter | Type | Required | Description | Example | Note |
---|---|---|---|---|---|
fixedCode | String | Y | Airport/Station code | PVG | Airport use IATA code. Station code is defined by Ctrip, please contact Ctrip BD if needed. |
fixedLocationName | String | Y | Airport/Station Name | Shanghai Pudong International Airport | |
cityId | String | Y | City Id | 258 | City ID List |
cityName | String | Y | City Name | Fuzhou | City ID List |
Ctrip will specify the terminal as much as possible when querying products. If we are unable to obtain the specific terminal, we will transmit the airport latitude and longitude, which you should handle on your own. If you do not allow this situation, please contact Ctrip R&D, and we will block requests in this scenario.
EstimationStandardDTO
Parameter | Type | Required | Description | Example | Note |
---|---|---|---|---|---|
estimateDistance | Integer | Y | Estimated Mileage | 16000 | Unit: Meter |
estimateTime | Integer | Y | Estimated Time | 1200 | Unit: Second |
This estimated information only for reference.
Response Payload
QueryProductResponse
Parameter | Type | Required | Description | Example | Note |
---|---|---|---|---|---|
priceMark | String | Y | Price Mark | B00AABFF7DEA | This parameter is used to identify the unique id of each price query. You may cache the key information such as the starting and ending points, travel time, etc. for this price query. If you cache the key, please kindly ensure that the cache is valid for at least 2 hours |
currency | String | Y | Currency | CNY | Support: USD/CNY/EUR/JPY |
queryResultList | List<ShoppingQueryProductDTO> | Y | Price Info | ||
msgCode | String | Y | Response Code | OK | Recommend response Code |
message | String | N | Response Detail | Success | Recommend response message |
If you find that Trip.com does not display your price, please go to "https://vbooking.ctrip.com/micro/carwork/ota/logSystem" to inquire about the specific reason
ShoppingQueryProductDTO
Parameter | Type | Required | Description | Example | Note |
---|---|---|---|---|---|
vehicleType | Long | Y | Vehicle Type | 117 | Vehicle Type List |
price | BigDecimal | Y | Price | 50 | Do not Include Additional Service price |
addServices | <ListAddServiceDTO> | Y | Additional Service | Please note that driver language is an important additional service and we will filter prices by language. |
AddServiceDTO
Parameter | Type | Required | Description | Example | Note |
---|---|---|---|---|---|
vendorAddServiceCode | String | Y | Additional Service Code | DR-ZH | Additional Service Code |
maxCount | Integer | Y | Maximum Amount | 1 |
We will calculate the additional service price based on these parameters and the sku information configured by VBK
Request Example
{
"categoryCode": "airport-dropoff",
"duseLocation": {
"address": "清华大学",
"detailAddress": "海淀区 双清路30号",
"longitude": 116.32676694616,
"latitude": 40.003909840453,
"geoType": "GCJ02"
},
"auseLocation": {
"address": "首都国际机场",
"detailAddress": "首都国际机场",
"longitude": 116.588057,
"latitude": 40.080519,
"geoType": "GCJ02"
},
"useTime": "2020-10-29 18:26",
"fixedLocation": {
"fixedCode": "PEK",
"fixedLocationName": "首都国际机场",
"cityId": "1",
"cityName": "北京"
},
"fromType": 1
}
Response Example
{
"msgCode": "OK",
"message": "成功",
"priceMark": "B3730C27FE83FC8B",
"currency":"CNY",
"queryResultList": [
{
"price": 195,
"vehicleType": 118,
"addServices": [
{
"maxCount": 1,
"vendorAddServiceCode": "DR-ZH"
}
]
},
{
"price": 268,
"vehicleType": 125,
"addServices": [
{
"maxCount": 1,
"vendorAddServiceCode": "DR-ZH"
}
]
},
{
"price": 278,
"vehicleType": 129,
"addServices": [
{
"maxCount": 1,
"vendorAddServiceCode": "DR-ZH"
}
]
},
{
"price": 536,
"vehicleType": 131,
"addServices": [
{
"maxCount": 1,
"vendorAddServiceCode": "DR-ZH"
}
]
},
{
"price": 692,
"vehicleType": 135,
"addServices": [
{
"maxCount": 1,
"vendorAddServiceCode": "DR-ZH"
}
]
},
{
"price": 854,
"vehicleType": 140,
"addServices": [
{
"maxCount": 1,
"vendorAddServiceCode": "DR-ZH"
}
]
}
]
}
Error Example
{
"msgCode": "NO_TIMESERVICE",
"message": "提前预定时间过短",
"priceMark": "",
"currency":"",
"queryResultList": []
}