保存工单
1、功能名称:保存工单
2、功能描述:保存工单
3、请求地址:https://ssl.glitzcloud.com/agent/v1/orders/special/save
测试地址:http://gztest.glitzcloud.com/agent/v1/orders/special/save
4、请求方式:POST 表单提交
5、请求参数
| 名称 | 必填 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| store_name | 是 | string | The Warehouse USA | 仓库名称 |
| id | 否 | int | 1013 | 工单ID,修改时必传。 |
| submit_check | 是 | int | 1 | 是否提交审核 1是 0否 |
| order_type | 是 | int | 10 | 10:装配, 20:多种处理, 30:组合, 40:贴标, 50:拍照, 60:捐赠, 70:清理, 80:检查, 90:包装, 100:其他 |
| product_status | 是 | int | 2 | 产品状态(1:有缺陷;2:无缺陷;3:疑似有缺陷;4:其他,见备注) |
| reference_no | 否 | string | W-520-1014-0516 | 参考订单 |
| description | 是 | string | 描述xx | 描述 |
| products | 否 | string | [ { "product_sn":"23811", "is_bad":"1", "num":"1" }, { "product_sn":"23811", "is_bad":"0", "num":"2" } ] |
order_type是捐赠、清理时必填。 product_sn:产品SKU is_bad:0 不良品 1 良品 num:数量 |
| attachment_0 | 否 | file | { "name":"0093236573-1619972.pdf", "type":"application\/octet-stream", "tmp_name":"\/tmp\/php4hSSRv", "error":0, "size":200996 } | 限5M以内。表单提交。多个附件时attachment_0、attachment_1、attachment_2 以此类推 |
6、请求示例
{
"store_name": "TWUSA01",
"format": "json",
"apikey": "85082f5f62a811e684f500163e06045f",
"secretkey": "85082f5f62a8e684f500163e0605f",
"randoms": 1931,
"sign": "470c59856a790dc36594044c89151f40",
"submit_check": 0,
"order_type": 60,
"product_status": 1,
"reference_no": "123123123123123",
"description": "desc",
"products": "[{\"product_sn\":\"23811\",\"is_bad\":\"1\",\"num\":\"1\"},{\"product_sn\":\"23811\",\"is_bad\":\"0\",\"num\":\"2\"},{\"product_sn\":\"23810\",\"is_bad\":\"1\",\"num\":\"3\"},{\"product_sn\":\"23810\",\"is_bad\":\"0\",\"num\":\"4\"}]",
"attachment_0":{
"name":"0093236573-1619972.pdf",
"type":"application\/octet-stream",
"tmp_name":"\/tmp\/php4hSSRv",
"error":0,
"size":200996
},
"attachment_1":{
"name":"09576990-1619982.pdf",
"type":"application\/octet-stream",
"tmp_name":"\/tmp\/phpbjAt7q",
"error":0,
"size":52744
}
}
7、返回格式:JSON
8、返回示例:
正确时的返回JSON数据包如下:
{
"status": 200,
"reqMsg": "ok",
"result": {
"order_id": "1014", // 工单ID
"order_sn": "WOO22052000001", // 工单单号
"attach_ids": [
{
"0093236573-1619972.pdf": 11102 // 附件名称:附件ID
},
{
"09576990-1619982.pdf": 11103
}
]
}
}
错误时的返回JSON数据包如下:
{
"status": 11110,
"reqMsg": "sasha022144442产品不存在",
"result": []
}
