~~~[api]
get:http://op.juhe.cn/trainTickets/orderStatus
string:dtype=json#说明文字
*string:key=84ac11bf14594fd4450741f02f42e95a#您申请到的APPKEY
*string:orderid=JH151238172439832#订单号
<<<
我测试的
{
"reason": "查询订单状态成功",
"result": {
"orderid": "JH151117251243259",
"user_orderid": "201711200607243274380",
"msg": "处理或操作成功;待支付",
"orderamount": "933.00",
"status": "2",
"passengers": [
{
"passengerid": 1,
"passengersename": "杨红伟",
"piaotype": "1",
"piaotypename": "成人票",
"passporttypeseid": "1",
"passporttypeseidname": "二代身份证",
"passportseno": "142201198311174558",
"price": "933.0",
"zwcode": "M",
"zwname": "一等座",
"ticket_no": "E960281705103001A",
"cxin": "03车厢,01A座",
"reason": 0
}
],
"checi": "G101",
"ordernumber": "E960281705",
"submit_time": "2017-11-20 18:08:32",
"deal_time": "2017-11-20 18:09:11",
"cancel_time": null,
"pay_time": null,
"finished_time": null,
"refund_time": null,
"juhe_refund_time": null,
"start_time": "2017-11-25 06:43:00",
"arrive_time": "2017-11-25 12:39:00",
"runtime": "05:56",
"train_date": "2017-11-25",
"from_station_name": "北京南",
"from_station_code": "VNP",
"to_station_name": "上海虹桥",
"to_station_code": "AOH",
"refund_money": null
},
"error_code": 0
}
<<<
success
/*以下示例仅作为格式上的参考,请以您实际得到的数据为准,也不代表此接口返回的全部状态*/
/*另外,部分字段的值可能为空,将来也有可能会增加字段(但不会减少),请您在程序中做好兼容性处理*/
/*订单的所有的可能的状态为
0:刚提交,待处理;处理完将变成1或2;
1:失败/失效/取消的订单;
2:占座成功待支付(此时可取消订单,超时不支付将失效);
3:支付成功待出票;
4:出票成功;
5:出票失败;关于出票失败的问题,请阅读 http://code.juhe.cn/docs/201 中第33条
6:正在处理线上退票请求;请阅读 http://code.juhe.cn/docs/201 中第16、17、18条
7:有乘客退票(改签)成功(status保存的是最后一次操作该订单后的状态,先有乘客退票失败,
然后有乘客退票成功,那么status为7);
8:有乘客退票失败(status保存的是最后一次操作该订单后的状态,先有乘客退票成功,
然后有乘客退票失败,那么status为8);
将来可能会增加状态,但不会减少,请您在程序中做好兼容性处理。
*/
/*1、刚提交订单,正在处理*/
{
"reason": "成功的返回",
"result": {
"orderid": "1444357324918", /*订单号*/
"user_orderid": "5678", /*您自定义的订单号,请务必阅读 http://code.juhe.cn/docs/201 中第14条关于各个订单号的说明*/
"msg": "订单提交成功,正在处理", /*订单描述信息*/
"orderamount": null, /*订单金额,聚合会根据此字段的值扣除您的账户余额;该订单正在处理,所以为null*/
"status": "0", /*0表示正在处理*/
"passengers": [ /*该订单下的乘客的信息*/
{
"passengerid": "1", /*您自定义的乘客编号,用于区分一个订单下的多个乘客,建议设为1-5的正整数*/
"passengersename": "聚小二", /*乘客姓名*/
"piaotype": "1", /*票类型编码*/
"piaotypename": "成人票", /*票类型*/
"passporttypeseid": "1", /*证件类型编码*/
"passporttypeseidname": "二代身份证", /*证件类型*/
"passportseno": "321201200512120415", /*证件号码*/
"price": "763.5", /*票价,如果真实票价为100元,您提交订单时将此字段设为1元,处理完订单会更正为100元*/
"zwcode": "O", /*座次编码,此处示例为大写字母O,不是数字0*/
"zwname": "二等座" /*座次*/
}
],
"checi": "G7027", /*车次*/
"ordernumber": null, /*12306的订单号,该订单正在处理,所以为null;请务必阅读 http://code.juhe.cn/docs/201 中第14条关于各个订单号的说明*/
"submit_time": "2015-10-09 10:22:05", /*您提交订单的时间*/
"deal_time": null, /*处理完占座的时间*/
"cancel_time": null, /*您主动取消订单的时间*/
"pay_time": null, /*您请求出票(支付)的时间*/
"finished_time": null, /*完成出票时间*/
"refund_time": null, /*此订单最后一次申请退票的时间(退票针对乘客不针对订单)*/
"juhe_refund_time": null, /*最后一次处理完退票的时间*/
"train_date": "2015-10-13", /*乘车日期*/
"from_station_name": "苏州", /*出发站名字*/
"from_station_code": "SZH", /*出发站简码*/
"to_station_name": "上海", /*到达站名字*/
"to_station_code": "SHH", /*到达站简码*/
"refund_money": null /*累积退款金额,请务必阅读 http://code.juhe.cn/docs/201 中第18条关于refund_money的说明*/
},
"error_code": 0
}
/*2、处理完占座请求,处理结果为占座失败*/
{
"reason": "成功的返回",
"result": {
"orderid": "1444357324918",
"user_orderid": "5678",
"msg": "乘客身份信息未通过验证_订票失败 添加乘客 未通过身份效验 聚小二121201193210080015",
"orderamount": null,
"status": "1", /*失败/失效/取消的订单*/
"passengers": [
{
"passengerid": "1",
"passengersename": "聚小二",
"piaotype": "1",
"piaotypename": "成人票",
"passporttypeseid": "1",
"passporttypeseidname": "二代身份证",
"passportseno": "121201193210080015",
"price": "763.5",
"zwcode": "O",
"zwname": "二等座"
}
],
"checi": "G7027",
"ordernumber": null,
"submit_time": "2015-10-09 10:22:05",
"deal_time": "2015-10-09 10:22:21",
"cancel_time": null,
"pay_time": null,
"finished_time": null,
"refund_time": null,
"juhe_refund_time": null,
"train_date": "2015-10-13",
"from_station_name": "苏州",
"from_station_code": "SZH",
"to_station_name": "上海",
"to_station_code": "SHH",
"refund_money": null
},
"error_code": 0
}
/*3、处理完占座请求,处理结果为占座成功,占座成功才会有cxin(车厢、座位号)*/
{
"reason": "成功的返回",
"result": {
"orderid": "1441700054308",
"user_orderid": "",
"msg": "处理或操作成功;待支付",
"orderamount": "14.50", /*将要从您的聚合账户扣除的金额*/
"status": "2",
"passengers": [
{
"passengerid": "1",
"passengersename": "聚小二",
"piaotype": "1",
"piaotypename": "成人票",
"passporttypeseid": "1",
"passporttypeseidname": "二代身份证",
"passportseno": "370827199101015265",
"price": "14.5",
"zwcode": "1",
"zwname": "硬座",
"reason": 0,
"ticket_no": "E5263400701170048", /*票号,占座成功才会有;请务必阅读 http://code.juhe.cn/docs/201 中第14条关于各个订单号的说明*/
"cxin": "17车厢,048座" /*占座成功才会有*/
}
],
"checi": "K372",
"ordernumber": "E526340070", /*12306的订单号;请务必阅读 http://code.juhe.cn/docs/201 中第14条关于各个订单号的说明*/
"submit_time": "2015-09-08 16:14:15",
"deal_time": "2015-09-08 16:14:44",
"cancel_time": null,
"pay_time": null,
"finished_time": null,
"refund_time": null,
"juhe_refund_time": null,
"train_date": "2015-09-18",
"from_station_name": "上海",
"from_station_code": "SHH",
"to_station_name": "苏州",
"to_station_code": "SZH",
"refund_money": null
},
"error_code": 0
}
/*4、出票成功*/
{
"reason": "成功的返回",
"result": {
"orderid": "1435902140362", /*订单号,此订单号仅用于您的订票产品和聚合之间的交互*/
"user_orderid": "20150825134207", /*您自定义的订单号*/
"msg": "出票成功", /*订单信息概况*/
"orderamount": "1.00", /*此订单的总金额*/
"status": "4", /*4:出票成功*/
"passengers": [ /*乘客信息,不同状态的订单此字段有所不同,请以您实际得到的结果为准*/
{
"piaotype": "1",
"reason": 0,
"passporttypeseidname": "二代身份证",
"passporttypeseid": "1",
"zwname": "硬座",
"price": "1.0",
"piaotypename": "成人票",
"ticket_no": "E1162394841080090", /*车票编号,退票时会用到。请务必阅读 http://code.juhe.cn/docs/201 中第14条关于各个订单号的说明*/
"passengersename": "黄晓明",
"zwcode": "1",
"passportseno": "370817198901012343",
"passengerid": 1,
"cxin": "08车厢,010座"
}
],
"checi": "6253",
"ordernumber": "E116239484", /*取票订单号,等同于您在12306官网订票时提供的订单编号;请务必阅读 http://code.juhe.cn/docs/201 中第14条关于各个订单号的说明*/
"submit_time": "2015-07-03 13:42:20", /*提交订单的时间*/
"deal_time": "2015-07-03 13:42:45", /*处理完订单的时间*/
"pay_time": "2015-07-03 13:44:14", /*请求出票(从聚合账户扣款)时间*/
"finished_time": "2015-07-03 13:44:23", /*出票成功时间*/
"refund_time": null",
"juhe_refund_time": null,
"refund_money":null,
"train_date": "2015-07-09",
"from_station_name": "哈尔滨东",
"from_station_code": "VBB",
"to_station_name": "滨江",
"to_station_code": "BJB"
},
"error_code": 0
}
/*5、有乘客退票成功*/
{
"reason": "成功的返回",
"result": {
"orderid": "1441696917857",
"user_orderid": "",
"msg": "有乘客退票成功,相关款项已退还至您的账户",
"orderamount": "8.50", /*该订单总金额*/
"status": "7",
"passengers": [
{
"passengerid": "1",
"passengersename": "杨颖",
"piaotype": "1",
"piaotypename": "成人票",
"passporttypeseid": "1",
"passporttypeseidname": "二代身份证",
"passportseno": "370827199109123212",
"price": "8.5",
"zwcode": "O",
"zwname": "二等座",
"reason": 0,
"ticket_no": "EC07095328101001B",
"cxin": "01车厢,01B座",
"returntickets": { /*退票的相关信息,只有申请过退票的乘客才有此字段。如您于2016年2月1日后初次看到此文档,
请忽略此字段,并从下面的refundTimeline中读取退票信息*/
"returnsuccess": true, /*退票是否成功*/
"returnmoney": "6.5", /*退票(改签差价)金额,退票要收手续费,所以此金额小于等于票价*/
"returntime": "2015-09-08 15:28:10",/*完成此退票的时间*/
"returnfailid": "", /*退票失败原因ID*/
"returnfailmsg": "", /*退票失败原因描述*/
"returntype": "1" /*1:线上退票;0:线下退票,即用户持票去火车站窗口退票*/
},
"refundTimeline": /*请注意,此字段新增于2016年2月1日,此日期前的订单无此字段*/
[
{
"time": "2016-01-28 20:51:55", /*时间发生的日期*/
"msg": "线上申请退票" /*事件概要*/
},
{
"time": "2016-01-28 20:54:13",
"msg": "线上退票成功",
"detail": { /*事件详情*/
"returnsuccess": true, /*退票是否成功*/
"returnmoney": "6.5", /*退款金额*/
"returnfailid": "", /*失败原因ID,退票失败时有值*/
"returnfailmsg": "", /*失败原因,退票失败时有值*/
"returntype": "1", /*1,线上退票;0,线下退票*/
"ticket_no": "E886597309101005D",
"passengername": "小黄",
"passporttypeseid": "1", /*退票乘客的证件类型*/
"passportseno": "321088789512071236" /*退票乘客的证件号*/
}
}
]
}
],
"checi": "G7213",
"ordernumber": "EC07095328",
"submit_time": "2015-09-08 15:21:58",
"deal_time": "2015-09-08 15:22:18",
"cancel_time": null,
"pay_time": "2015-09-08 15:23:46",
"finished_time": "2015-09-08 15:24:02",
"refund_time": "2015-09-08 15:24:44", /*此订单最后一次申请退票的时间*/
"juhe_refund_time": "2015-09-08 15:26:28", /*此订单最后一次完成退票的时间*/
"train_date": "2015-09-13",
"from_station_name": "上海西",
"from_station_code": "SXH",
"to_station_name": "上海",
"to_station_code": "SHH",
"refund_money": "6.50" /*累积退款金额(包含退票金额、改签退差价金额)。请阅读常见问题中关于退票退款的说明:http://code.juhe.cn/docs/201*/
},
"error_code": 0
}
<<<
error
~~~
## 如图
![mark](http://qiniu.newthink.cc/blog/20171201-182857268.png)
- 回调操作
- 测试post请求
- 一:提交订单回调
- 二:请求出票回调
- 三:退票回调
- 火车票全部接口
- 1.站点简码查询
- 2.余票查询
- 3.提交订单(占座)
- 4.请求出票
- 5.订单状态查询
- 6.线上退票
- 7.历史订单查询
- 8.下载csv格式报表
- 9.取消待支付的订单
- 10.设置回调
- 11.查询账户余额
- 整理车票API
- 火车票简码采集
- 火车票相关
- 火车票相关截图
- 火车票车型
- 火车票订单
- 座位类型
- 火车票11个接口封装后
- 票的状态
- 聚合联系方式
- response不支持行内式写法
- 火车票登录接口信息
- 火车票回调
- 火车票订票接口常见问题
- 退票手续费
- 退票返回的信息
- 相关知识
- javascript 日期相减 涉及到时分秒
- 火车票订单流程
- 火车票提交
- 因公一些权限
- 工具
- 箭头
- 执行标准和政策详情
- 执行情况
- 成本中心
- miyou当前用户及政策相关信息
- 审批信息弹出
- 人员ID姓名与政策ID
- 费用
- 流程
- bookOne
- bookTwo
- booOnePost
- 旧的成本中心
- 成本中心联动
- 注意事项
- 提交返回的数据 train_all
- 选座
- 易购火车票
- 签约