[关闭]
@fuyb1986 2016-07-05T10:14:03.000000Z 字数 2421 阅读 639

订单相关文档

欣略


1. 购买产品

Description

购买产品,生成订单。

Method and URL Structure

Method Resource URL
PATCH /maret/product/purchase/${pk}

Response

  1. {
  2. "profile": {
  3. "pk": 1,
  4. "owner": "18516271364",
  5. "nickname": "我的昵称",
  6. "avatar_url": "http://example.com/test_avatar_url.jpg",
  7. "website": "http://example.com/website/"
  8. },
  9. "product": {
  10. "pk": 1,
  11. "category": "申请高新技术补助第一",
  12. "name": "外资企业申请第一",
  13. "price": "90.00",
  14. "bargain_enable": false,
  15. "work_intro": {
  16. "step": "这里是流程",
  17. "material": "这里是材料",
  18. "attention": "这里是条件",
  19. "condition": "这里是条件"
  20. },
  21. "create_time": "2016-06-28T11:09:17.787358Z"
  22. },
  23. "order_number": "22305636746595874149751680002",
  24. "amount": "0.00",
  25. "channel": "alipay",
  26. "status": 0,
  27. "channel_display": "支付宝",
  28. "status_display": "待付款",
  29. "evaluation": null,
  30. "create_time": "2016-07-02T09:07:28.119521Z"
  31. }

2. 用户订单列表

Description

用户订单列表

Method and URL Structure

Method Resource URL
GET /market/orders/

Request Paramaters

Name Description Required Default
page 分页 No 1

Response

  1. {
  2. "count": 23,
  3. "next": "http://localhost:8300/market/orders/?page=2",
  4. "previous": null,
  5. "results": [
  6. {
  7. "profile": {
  8. "pk": 1,
  9. "owner": "18516271364",
  10. "nickname": "我的昵称",
  11. "avatar_url": "http://example.com/test_avatar_url.jpg",
  12. "website": "http://example.com/website/"
  13. },
  14. "product": {
  15. "pk": 1,
  16. "category": "申请高新技术补助第一",
  17. "name": "外资企业申请第一",
  18. "price": "90.00",
  19. "bargain_enable": false,
  20. "work_intro": {
  21. "step": "这里是流程",
  22. "material": "这里是材料",
  23. "attention": "这里是条件",
  24. "condition": "这里是条件"
  25. },
  26. "create_time": "2016-06-28T11:09:17.787358Z"
  27. },
  28. "order_number": "22305636746595874149751680002",
  29. "amount": "0.00",
  30. "channel": "alipay",
  31. "status": 0,
  32. "channel_display": "支付宝",
  33. "status_display": "待付款",
  34. "evaluation": null,
  35. "create_time": "2016-07-02T09:07:28.119521Z"
  36. },
  37. ....
  38. ]
  39. }

3. 订单详情

Description

订单详情

Method and URL Structure

Method Resource URL
GET /market/order/${order_number}/

Response

  1. {
  2. "profile": {
  3. "pk": 1,
  4. "owner": "18516271364",
  5. "nickname": "我的昵称",
  6. "avatar_url": "http://example.com/test_avatar_url.jpg",
  7. "website": "http://example.com/website/"
  8. },
  9. "product": {
  10. "pk": 1,
  11. "category": "申请高新技术补助第一",
  12. "name": "外资企业申请第一",
  13. "price": "90.00",
  14. "bargain_enable": false,
  15. "work_intro": {
  16. "step": "这里是流程",
  17. "material": "这里是材料",
  18. "attention": "这里是条件",
  19. "condition": "这里是条件"
  20. },
  21. "create_time": "2016-06-28T11:09:17.787358Z"
  22. },
  23. "order_number": "22305636746595874149751680002",
  24. "amount": "0.00",
  25. "channel": "alipay",
  26. "status": 0,
  27. "channel_display": "支付宝",
  28. "status_display": "待付款",
  29. "evaluation": null,
  30. "create_time": "2016-07-02T09:07:28.119521Z"
  31. }

4. 订单支付

Description

订单支付

Method and URL Structure

Method Resource URL
PATCH /market/order/payment/${order_number}/

Request Data

  1. {"channel":"alipay"}

Response Data

  1. {
  2. "status":0,
  3. "message":"",
  4. "charge": {
  5. # pingpp charge
  6. }
  7. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注