查询订单(单条)

  • 接口说明: 查询订单(单条)
  • 接口地址: /orders/{order_sn}
  • 请求方式: GET

请求参数

字段名变量名必填类型描述
订单编号order_snstring订单唯一编号

返回说明

  • 返回当前创建成功数据, http 状态码: 200

返回结果

字段名变量名必填类型描述
data.attributesobjectobject数据属性
订单编号attributes.order_snstring订单唯一编号
订单金额attributes.amountfloat订单付款金额
付款状态attributes.statusint付款状态,0 待付款,1 已付款 ,2取消订单,3支付失败,4 订单已过期
订单类型attributes.typeint1:注册,2:打赏,3:付费主题,4:付费用户组,5:问答提问支付,6:问答围观付费, 7: 付费主题
主题 IDattributes.thread_idint打赏的主题
用户组 IDattributes.group_idint付费用户组id
更新时间attributes.updated_atdatetime更新时间
创建时间attributes.created_atdatetime创建时间
data.relationshipsobjectobject关联关系
includedobjectobject关联数据(包含 user,thread,thread.firstPost,group)

返回示例

  1. {
  2. "data": {
  3. "type": "orders",
  4. "id": "4",
  5. "attributes": {
  6. "order_sn": "2019112113520654485453",
  7. "amount": "2.50",
  8. "status": 0,
  9. "type": 2,
  10. "thread_id": 2,
  11. "updated_at": "2019-11-21T13:52:06+08:00",
  12. "created_at": "2019-11-21T13:52:06+08:00"
  13. },
  14. "relationships": {
  15. "user": {
  16. "data": {
  17. "type": "users",
  18. "id": "1"
  19. }
  20. },
  21. "thread": {
  22. "data": {
  23. "type": "threads",
  24. "id": "2"
  25. }
  26. }
  27. }
  28. },
  29. "relationships": {
  30. "user": {
  31. "data": {
  32. "type": "users",
  33. "id": "1"
  34. }
  35. },
  36. "thread": {
  37. "data": {
  38. "type": "threads",
  39. "id": "2"
  40. }
  41. }
  42. },
  43. "included": [
  44. {
  45. "type": "users",
  46. "id": "1",
  47. "attributes": {
  48. "username": "username",
  49. "nickname": "",
  50. "mobile": "mobile",
  51. "unionId": null,
  52. "lastLoginIp": "",
  53. "createdAt": "2019-11-16T12:47:45+08:00",
  54. "updatedAt": "2019-11-16T12:47:45+08:00"
  55. }
  56. },
  57. {
  58. "type": "threads",
  59. "id": "2",
  60. "attributes": {
  61. "title": "frgregre",
  62. "price": "0.50",
  63. "viewCount": 0,
  64. "postCount": 0,
  65. "likeCount": 0,
  66. "createdAt": null,
  67. "updatedAt": null,
  68. "isApproved": true,
  69. "isSticky": false,
  70. "isEssence": false
  71. }
  72. }
  73. ]
  74. }