5-2. 批量创建退货订单
获取退货服务ID
地址: http://test.birdsystem.com/client/return-consignment-action
字段 | 注释 | 类型 |
---|---|---|
id | 系统ID | INT(10) |
name | 名称 | VARCHAR |
price | 价格 | DECIMAL(10,2) |
type | 退货服务类型 | ENUM('CONTAINER','SELLER','DISPOSE','CHECK','TRANSFER') CONTAINER 退货上架, SELLER 退货等待回国, DISPOSE 退货销毁 CHECK 退货查验 TRANSFER 退货转运 |
status | 状态 |
返回
{ "total": 1, "data": [ { "id": 92, "company_id": 36, "name": "退货上架", "cost": "0.000", "weight_unit_price": "0.000", "volume_unit_price": "0.000", "sku_unit_price": "0.000", "product_unit_price": "0.000", "type": "CONTAINER", "return_consignment_type": "SINGLE", "status": "ACTIVE", "primary_keys": [ "id" ] } ], "success": true, "moduleName": "client" }
创建订单
将上一步获得的服务 id 填入 return_consignment_action-id 参数
url | http://test.birdsystem.com/client/Consignment/Post-Pending-Consignment-With-Products-Json | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
method | post | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
body | [ { "contact": "Norman Drury", "business_name": null, "address_line1": "3, Northam Close", "address_line2": "Marshside", "address_line3": null, "city": "Southport", "county": "Merseyside", "post_code": "PR9 9GA", "country_iso": "GB", "telephone": "01704 226830", "email": null, "return_consignment_action-id": "92", "sales_reference": "2", "sales_order_id": "110222319566-0", "special_instruction": null, "type": "RETURN", "products":[ {"client_sku":"983-494721","quantity":1}, {"id":214598,"quantity":1} ] } ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
返回 | { "success": true, "data": [ { "id": 1612120020000011, "company_id": 2, "client_id": 1, "consignment_product_quantity": 9, "consignment_product_reference": "1,2", "delivery_service_id": 1471, "delivery_service_id_internal": 1471, "delivery_package_size_id": 432, "delivery_package_size_id_internal": 432, "total_price": "0.00", "total_cost": "0.00", "...": "...", "contact": "Norman Drury", "business_name": null, "address_line1": "3, Northam Close", "address_line2": "Marshside", "address_line3": null, "city": "Southport", "county": "Merseyside", "post_code": "PR9 9GA", "country_iso": "GB", "telephone": "01704 226830", "email": null, "sales_reference": "2" } ] } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
参数 |
|
此种方式需在POST前确保所有数据都正确,数据不正确的,将报错 不能创建订单。 附上相关用例文件: 创建订单用例.postman_collection.json