查询购票信息
GET
/api/ticket-service/ticket/query请求参数
Query 参数
fromStation
string
出发地
示例值:
北京
toStation
string
目的地
示例值:
杭州
departureDate
string
必需
出发日期,格式:yyyy-MM-dd
示例值:
2023-06-01
departure
string
出发站点
arrival
string
到达站点
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
string
必需
message
null
必需
data
object
必需
trainList
array [object {18}]
车次数据
trainBrandList
array[string]
车次类型
departureStationList
array[string]
出发车站
arrivalStationList
array[string]
到达车站
seatClassTypeList
array[string]
车次席别
requestId
null
必需
success
boolean
必需
示例
{
"code": "0",
"message": null,
"data": {
"trainList": [
{
"trainNumber": "G35",
"departureTime": "09:56",
"arrivalTime": "14:26",
"duration": "04:30",
"departure": "北京南",
"arrival": "杭州东",
"departureFlag": true,
"arrivalFlag": false,
"highSpeedTrain": {
"businessClassQuantity": 10,
"businessClassCandidate": false,
"businessClassPrice": 231300,
"firstClassQuantity": 140,
"firstClassCandidate": false,
"firstClassPrice": 107700,
"secondClassQuantity": 810,
"secondClassCandidate": false,
"secondClassPrice": 67400
},
"bulletTrain": {
"sleeperQuantity": 1,
"sleeperCandidate": false,
"sleeperPrice": 123,
"firstSleeperQuantity": 1,
"firstSleeperCandidate": false,
"firstSleeperPrice": 123,
"secondSleeperQuantity": 1,
"secondSleeperCandidate": false,
"secondSleeperPrice": 123,
"secondClassQuantity": 1,
"secondClassCandidate": false,
"secondClassPrice": 123
},
"regularTrain": {
"softSleeperQuantity": 1,
"softSleeperCandidate": false,
"softSleeperPrice": 123,
"deluxeSoftSleeperQuantity": 1,
"deluxeSoftSleeperCandidate": false,
"deluxeSoftSleeperPrice": 123,
"hardSleeperQuantity": 1,
"hardSleeperCandidate": false,
"hardSleeperPrice": 123,
"hardSeatQuantity": 1,
"hardSeatCandidate": false,
"hardSeatPrice": 123
}
}
],
"trainBrandList": [
"复兴号"
],
"departureStationList": [
"北京南"
],
"arrivalStationList": [
"杭州东"
],
"seatClassList": [
"商务座",
"一等座",
"二等座"
]
},
"requestId": null,
"success": true
}
最后修改时间: 1 年前