/erp/sc/routing/purchase/purchase_return_order/createPurchaseReturnOrder{
"operation": {
"method": "POST",
"path": "/erp/sc/routing/purchase/purchase_return_order/createPurchaseReturnOrder"
},
"protocol": "HTTPS",
"host": "https://openapi.lingxing.com",
"rateLimit": {
"tokenBucketCapacity": 1,
"text": ""
},
"requestExample": {
"purchase_order_sn": "PO220513032",
"return_method": 1,
"replenish_method": 0,
"fee_part_type": 0,
"shipping_currency": "CNY",
"shipping_price": 1,
"other_currency": "CNY",
"other_fee": 1,
"return_reason": "产品颜色差异大",
"remark": "DP0001退货",
"item_list": [
{
"purchase_order_item_id": 19302,
"return_good_num": 5,
"return_bad_num": 5,
"expect_arrive_time": "",
"deduction_amount": 10,
"remark": "颜色差异"
}
]
}
}| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | purchase_order_sn | 采购单号 | string | — | 必填 | 采购单号 |
| 2 | return_method | 退货方式 | integer | — | 必填 | 退货方式,1:退货扣款 2:退货补货 |
| 3 | replenish_method | 补货方式 | integer | — | 可选 | 补货方式,1:源单补货【退货方式为2时必填】 |
| 4 | fee_part_type | 分摊方式 | integer | — | 必填 | 分摊方式,0:不分摊 1:按金额 2:按数量 |
| 5 | shipping_currency | 退货运费币种 | string | — | 必填 | 退货运费币种,支持CNY、USD,当源单币种为CNY时,运费币种只能为CNY |
| 6 | shipping_price | 退货运费 | number | — | 可选 | 退货运费 |
| 7 | other_currency | 其他费用币种 | string | — | 必填 | 其他费用币种,支持CNY、USD,当源单币种为CNY时,其他费用币种只能为CNY |
| 8 | other_fee | 其他费用 | number | — | 可选 | 其他费用 |
| 9 | return_reason | 退货原因 | string | — | 可选 | 退货原因 |
| 10 | remark | 单据备注 | string | — | 可选 | 单据备注 |
| 11 | item_list | 退货产品 | array<object> | — | 必填 | 退货产品 |
| 11.1 | purchase_order_item_id | 采购单子项id | integer | — | 必填 | 采购单子项id |
| 11.2 | return_good_num | 良品退货量 | integer | — | 可选 | 良品退货量,良品退货量和次品退货量不可同时为空 |
| 11.3 | return_bad_num | 次品退货量 | integer | — | 可选 | 次品退货量,良品退货量和次品退货量不可同时为空 |
| 11.4 | expect_arrive_time | 预计到货时间 | string | — | 可选 | 预计到货时间,退货补货可设置该字段 |
| 11.5 | deduction_amount | 退货金额 | number | — | 可选 | 退货金额,退货方式为退货扣款时必填,填写值不可大于扣款数量*含税单价 |
| 11.6 | remark | 备注 | string | — | 可选 | 备注 |
| 序号 | 字段 | 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| 1 | code | 状态码 | integer | 0 | 必填 | 状态码,0 成功 |
| 2 | message | 消息提示 | string | success | 必填 | 消息提示 |
| 3 | error_details | 错误信息 | string | [] | 必填 | 错误信息 |
| 4 | request_id | 请求链路id | string | C1309FC7-1EC2-9B67-901A-2A0156CC7C25 | 必填 | 请求链路id |
| 5 | response_time | 响应时间 | string | 2022-05-20 11:48:25 | 必填 | 响应时间 |
| 6 | data | 响应数据 | object | — | 必填 | 响应数据 |
| 6.1 | order_sn | 采购退货单号 | string | PR220520003 | 必填 | 采购退货单号 |
领星ERP的接口:创建已完成的采购退货单(/erp/sc/routing/purchase/purchase_return_order/createPurchaseReturnOrder),由轻易云数据集成平台 API 资产管理模块整理收纳,并随领星ERP版本更新同步更新。