文档
测试

采购单详情

POST
请求地址/router

系统相关界面

"界面路径:【采购】----【采购单管理】----【查询】"

请求地址

|环境|服务地址(HTTP/HTTPS)| |-|-| |V2正式环境| https://gw.superboss.cc/router| **2022年4月1日**以后申请的APP Key,统一使用V2正式环境的请求地址:**https://gw.superboss.cc/router**

公共参数

调用任何一个API都必须传入的参数,目前支持的公共参数有: | 参数名称 | 参数类型 | 是否必须 | 参数描述 | | --- | --- | --- | --- | | method | string | 是 | API接口名称 | | appKey | string | 是 | 分配给应用的AppKey | | timestamp | string | 是 | 时间戳,时区为GMT+8,例如:2020-09-21 16:58:00。API服务端允许客户端请求最大时间误差为10分钟 | | format | string | 否 | 响应格式。默认为json格式,可选值:json | | version | string | 是 | API协议版本 可选值:1.0 | | sign\_method | string | 否 | 签名的摘要算法(默认 hmac),可选值为:hmac,md5,hmac-sha256。 | | sign | string | 是 | 签名 | | session | string | 是 | 授权会话信息 (即access_token,由系统分配) |

请求头

参数名
类型
描述
必填
Content-Type
string
multipart/form-data
必填

API接口地址

参数名
类型
描述
必填
method
string
purchase.order.get
必填

请求参数

参数名
类型
描述
必填
id
string
示例:采购单id
可选
ptOrderId
string
示例:平台订单号
可选

请求示例

```json { "id": "long", "ptOrderId": "1122334455" } ````

响应参数

参数名
类型
描述
total
string
总数
list
object
列表
supplierName
string
供应商名称
amount
BigDecimal
不带修正的采购金额(单位:分),采购金额=数量*单价
supplierId
string
供应商id
code
string
单据编号
purchaseOrderId
long
采购单ID
sysItemId
string
系统商品Id
sysSkuId
string
系统规格id
outerId
string
商家编码
ptSkuId
string
平台sku ID
count
string
数量
remark
string
备注
caigouUrl
string
采购外链
supplierCode
string
供应商代码
price
string
单价(单位:分)
itemOuterId
string
主商品编码
deliveryDate
string
交货日期
ptOrderId
string
平台订单号
ptShopId
string
平台店铺ID
outSid
string
快递单号
templateName
string
物流公司名称
totalFee
BigDecimal
带修正的采购金额(单位:分)
amendAmount
BigDecimal
修正金额totalFee-amount计算出来的(单位:分)

响应示例

{ "traceId": "1879873565469747141", "list": [ { "code": "CG3941403339276288", "ptSkuId": "MN-milk", "sysItemId": 466267301308928, "remark": "备注信息", "price": 100.000, "itemOuterId": "MN-milk", "ptOrderId": "1122334455", "deliveryDate": 1662541137000, "caigouUrl": "采购链接", "amount": 100.000, "quantity": 1, "count": 1, "outSid": "88889999", "sysSkuId": 0, "ptShopId": 12345, "purchaseOrderId": 3941403339276289, "outerId": "MN-milk" } ], "total": 1, "success": true }

异常示例

```` { "code": "25", "msg": "服务方法(purchase.order.get:1.0)的签名无效", "success": false, "trace_id": "3553483395423660" } ````

错误码解释

| 错误码 |错误信息|解决方案| |-|-|-| |25|服务方法(purchase.order.get:1.0)的签名无效|签名参数错误|