达人店后台接口-代发管理(2-发货中心)

1,获取代发订单信息

request

method: GET  
url: /shop/v1/agent/despatch-data/get?orderNumber=123&supplierId=123&status=22&gmtStartTime=time&gmtEndTime=time&page=1&pageSize=10  

参数说明

参数名 类型 必填 描述

orderNumber

string

订单ID

supplierId

string

供应商ID

status

string

状态0-全部,20,交易成功,21-待支付,22-待发货,23-已发货, -2-交易关闭

gmtStartTime

string

开始时间

gmtEndTime

string

结束时间

page

string

页数

pageSize

string

每页的数据量

response

body = {  
  "code": 1,
  "message": "success",
  "data": [
    {
      "branchOrderNumber": "2147853381944576001",
      "status": 22,
      "supplierId": 1,
      "isCancel": false,
      "orderNumber": 2147853381944576,
      "expressId": 0,
      "gmtCreate": 1478533819000,
      "gmtModified": 1478533999000,
      "address": "",
      "remark": "",
      "buyerInfo": "tuwei(714076)",
      "items": [
        {
          "skuId": 112772,
          "supplierId": 1,
          "branchOrderNumber": "2147853381944576001",
          "quantity": 1,
          "itemName": "九朵云气垫BB霜15g",
          "price": 170,
          "status": 22
        }
      ]
    }
  ],
  "pageCount": 451,
  "pageCurrent": "1",
  "isRedirect": 0,
  "redirect": "",
  "login": 0
}

可能出现的状态码及描述

code message

1

success

1000

系统内部错误

1100

请求参数确实或格式不正确

2,导出代发订单信息

request

method: GET  
url: /shop/v1/agent/despatch-data/export

接口参数与 (1,获取代发订单信息接口)相同

response

1,正常返回(浏览器自动下载表格)
Content-Type: application/vnd.openxmlformats
Content-Disposition: attachment; filename=供货商订单.xlsx
body:{
    'code': 1,
    'message': 'success',
    'pageCount': 1,
    'pageCurrent': 1,
    'data': binary,
    'isRedirect': 0,
    'redirect': 'url',
    'login': 0
}

3,获取物流公司信息

request

method: GET  
url: /shop/v1/agent/companys/get  

response

body = {  
  "code": 1,
  "message": "success",
  "data": [
    {
      "backGroundImage": "",
      "company": "顺丰快递",
      "companyId": 511,
      "gmtCreate": 1411353670000,
      "gmtModified": 1426057048000,
      "height": 15.3,
      "id": 102,
      "isDelete": false,
      "offset": 469,
      "width": 23
    },
    {
    }
  ],
  "pageCount": 451,
  "pageCurrent": "1",
  "isRedirect": 0,
  "redirect": "",
  "login": 0
}

可能出现的状态码及描述

code message

1

success

1000

系统内部错误

4,保存订单物流信息

request

method: POST  
url: /shop/v1/agent/order/express

{
companyId: '1234',  
expressCompany: '1234',  
expressNumber: '1234',  
expressId: '1234',  
branchOrderNumber: '1234'  
}

参数说明

参数名 类型 必填 描述

compaynId

string

物流公司ID

expressCompany

string

物流公司名

expressNumber

string

物流单号

expressId

string

物流ID

branchOrderNumber

string

订单号

response

body = {  
  "code": 1,
  "message": "success",
  "data": '1234', //物流单ID
  "pageCount": 451,
  "pageCurrent": "1",
  "isRedirect": 0,
  "redirect": "",
  "login": 0
}

可能出现的状态码及描述

code message

1

success

1000

系统内部错误

5,批量发货

request

method: POST  
url: /shop/v1/agent/goods/sendout

{
    expressIdArr: ['123', '456']
}

response

body = {  
  "code": 1,
  "message": "success",
  "data": null,
  "pageCount": 451,
  "pageCurrent": "1",
  "isRedirect": 0,
  "redirect": "",
  "login": 0
}

可能出现的状态码及描述

code message

1

success

1000

系统内部错误

6,批量发货(excel表格上传方式)

request

method: POST  
url: /shop/v1/agent/goods/batch/sendout  
Content-Type:multipart/form-data

表单提交input.name = 'upfiles'

response

body = {  
  "code": 1,
  "message": "success",
  "data": null,
  "pageCount": 0,
  "pageCurrent": "1",
  "isRedirect": 0,
  "redirect": "",
  "login": 0
}

可能出现的状态码及描述

code message

1

success

1000

系统内部错误

9000

excel解析失败

9001

excel为空

沐风

继续阅读此作者的更多文章