• 257
  • 64
  • 53

火车票抢票

聚合数据 企业专用

根据乘客的车次与座席要求快速订票出票,业务特殊需要请联系在线客服

  • API文档
  • 错误码参照
  • 示例代码
  • 联系我们
立即调用
接口地址:http://v.juhe.cn/grabTicket/action/orderDetail.php
返回格式:json
请求方式:get post
请求示例:http://v.juhe.cn/grabTicket/action/orderDetail.php?outOrderNo=123456&key=你申请的key
接口备注:查询订单的详细信息、车票状态、以及车票号等

请求参数说明:

名称 必填 类型 说明
  key string 在个人中心->我的数据,接口名称上方查看
  outOrderNo string 订单号
  issue int 0:未出票 1:已经出票,默认0(如果订单还未出票则不需要此参数,否则传1,退票时候需要传passengerId,可以通过输入此参数查询,未出票也可以加入此参数,若加上此参数则没有抢票的状态)

返回参数说明:

名称 类型 说明
  见json示例

JSON返回示例:

未出票(不传issue参数)json示例:
----------------------------------------
{
  "reason": "success",
  "result": {
    "status": "U",
    "fromStation": "苏州",
    "toStation": "昆山",
    "departDate": "2016-12-30T02:29:00",
    "orderNo": "TFT583U2D6U21011A3068416353",
    "trainNo": "Z175",
    "seatClass": "硬座",
    "passengers": [
      {
        "passengerName": "魏XX",
        "passengerType": 1,
        "certificateNo": "320382XXXXXXX3916",
        "ticketPrice": 0
      }
    ],
    "phone": "1599XXXXXXX",
    "mainTrainNo": "",
    "failMsg": "乘客身份信息未通过验证_订票失败 添加乘客 未通过身份效验 XXX 320382XXXXXXX3916 ",
    "mainSeatClass": "",
    "grabEndTime": "2016-11-30T18:00:00"
  },
  "error_code": 0
}

已出票(加issue参数)json示例:
----------------------------------------
{
    "reason": "success",
    "result": {
        "orderNo": "FT584505292101648041264455",
        "outOrderNo": "2016120501",
        "trainNo": "K8371",
        "trainDate": "2016-12-29",
        "fromStation": "苏州",
        "toStation": "昆山",
        "departureTime": "2016-12-29 03:34:00",
        "arrivalTime": "2016-12-29 03:58:00",
        "orderState": "已出票",
        "orderStateCode": "F",
        "failureReason": "",
        "bookTime": "2016-12-05 14:11:52",//可忽略
        "payTime": "2016-12-05 14:13:13",//可忽略
        "issueTime": "2016-12-05 14:13:13",
        "payType": "暂存单支付",//可忽略
        "orderPrice": "9.00",
        "ticketNo": "E345091034",
        "placeTime": "2016-12-05 14:12:29",//可忽略
        "payStatus": "0",//可忽略
        "payInfo": "",//可忽略
        "passengers": [
            {
                "passengerId": "623838773",
                "passengerName": "XXX",
                "passengerType": "1",
                "idType": "1",
                "idCard": "XXXXXXXXXXXXXXXXXX",
                "birthday": "1976-06-13",
                "seatClass": "hardseat",
                "seatClassName": "硬座",
                "seatNo": "07车厢,009号",
                "pTicketNo": "E3450910341070009",
                "ticketStateCode": "F",
                "ticketState": "已出票",
                "ticketPrice": "9.00",
                "insureUnitPrice": "0.00",//可忽略
                "insureState": null,//可忽略
                "insureBillNo": null//可忽略
            }
        ],
        "contactInfo": {
            "person": "1599****577",
            "cellphone": "1599****577",
            "email": ""
        },
        "postalInfo": {//可忽略
            "person": null,
            "cellphone": null,
            "province": null,
            "city": null,
            "district": null,
            "address": null,
            "zip": null
        },
        "juheServiceFee": "8"
    },
    "error_code": 0
}

服务级错误码参照(error_code):

  错误码 说明

系统级错误码参照:

  错误码 说明 旧版本(resultcode)

错误码格式说明(示例:200201):

  2 002 01
  服务级错误(1为系统级错误) 服务模块代码(即数据ID) 具体错误代码

完整教学代码示例:

  语言 标题 提供者 时间

常见问题:

  内容 详细
  常见问题: http://www.juhe.cn/qa/index/1547809968

联系我们

  内容 详细
  接口测试: API测试工具
  技术支持: info@juhe.cn
  联系电话: 400-882-7715
  在线客服QQ: 800076065

现在注册,百款接口免费测试

免费注册