简要描述:

  • 创建订单

请求URL:

  • createorder

请求参数:

参数名 是否必须 类型 说明
productId Integer 门票产品ID
startTime String 出游日期. “YYYY-MM-DD”。请在前台限制,只有价格日历中存在的团期,才能作为出游日期。
bookNumber Integer 预订数量
contact Contact 取票人信息
delivery Delivery 配送信息。drawtype=1时,必填;否则不要填;
cusName String 客人名称
cusTel String 客人电话
saleId int 销售员Id
salePrice int 销售价

入参示例:

  1. {
  2. apiKey : "test1",
  3. apisecret : "78FBB3D68B40A347644619ACF902CED3",
  4. currentTimeStamp : "20171221095633",
  5. sign : "AD6C029C92B1518D2B9EC59E918B071D",
  6. uri : "http://localhost:39450/ticket/createorder",
  7. data :
  8. {
  9. productId : "6442219",
  10. startTime : "2017-12-24",
  11. bookNumber : 1,
  12. contact :
  13. {
  14. contactName : "TEST",
  15. contactTel : "13360763111"
  16. },
  17. delivery :
  18. {
  19. deliveryType : 1
  20. },
  21. cusName : "haha",
  22. cusTel : "135465478",
  23. aleId : 1185,
  24. salePrice : 33
  25. }
  26. }

返回示例:

正确时返回:

  1. {
  2. Code : 0,
  3. Success : true,
  4. Message : null,
  5. Data :
  6. {
  7. "orderId": 35187519,
  8. "isNewFlag": 1
  9. }
  10. }

错误时返回:

  1. {
  2. "Code" : 100002,
  3. "Success" : false,
  4. "Message" : "应用认证错误",
  5. "Data" : ""
  6. }

返回参数说明:

参数名 类型 说明
Code int 代码
Success bool 请求是否成功
Message string 错误信息,成功时返回空
Data string 请求的数据结果

以下结构体为Data字段的内容

参数名 类型 说明
orderId Integer 订单号
isNewFlag Integer 订单号是否新生成,1:是,0:否。sourceOrderId非空时,可防止重复下单。若重复下单,则返回之前对应已生成的orderId,且isNewFlag=0;其它情况isNewFlag=1。

业务参数定义

  1. Contact—取票人信息
参数名 必选 类型 说明
contactName string 取票人姓名
contactEmail string 取票人邮箱admissionVoucherCode=205、302时必传,否则不要传。
contactTel string 取票人手机号码(入园凭证会发送到此手机号码上,请务必保证手机号码真实有效)
psptType Integer 证件类型。custInfoLimit=4、6、7时必传;否则不要传。

选项参照certificateType字段。 |
|psptId|否 |string |证件号码。custInfoLimit=4、6、7时必传;否则不要传。 |

  1. Delivery—递送信息
参数名 必选 类型 说明
deliveryType Integer 1配送2自取
receiverName string 收件人;deliveryType=1时,必填;
telNum string 收件电话;deliveryType=1时,必填;
deliveryEndAddress string 收件地址;deliveryType=1时,必填;
zipCode string 邮编;deliveryType=1时,必填;

备注:

  • 更多返回错误代码请看首页的错误代码描述