一. Related API Requests
For those pre-required fields, only Client-Dispatch-Freight ID varies daily, others remain stable
1.1 Get Active Warehouse
/client/Warehouse/Client-Use-Warehouse
1.2 Get Warehouse Dispatch Freight
/client/Warehouse-Dispatch-Freight/Get-Closest-Freight
1.3 Get Client-Dispatch-Delivery-Type
/client/Client-Dispatch-Delivery-Type
1.4 Get Client-Dispatch-Container-Type
/client/Client-Dispatch-Container-Type
1.5 Get Client-Dispatch-Vat (Optional)
/client/Client-Dispatch-Vat-Number
1.6 Get Address-Book (Optional)
二. All-in-one API Request to create Client-Dispatch
URL | http://test.birdsystem.com/client/Client-Dispatch-Upload/Client-Dispatch-Json | ||||||||||||||||||
Method | POST | ||||||||||||||||||
Payload | [{ "warehouse_id_origination": "22", "warehouse_id_destination": "1", "final_freight_method": "SEA", "warehouse_dispatch_freight_id": "221", "delivery_time": "2015-07-31", "is_use_whole_warehouse_dispatch_freight": "0", "client_dispatch_delivery_type_code": "01", "client_vat_number_id": "1", "reference": "", "delivery_reference": "", "type": "NORMAL", "client_dispatch_final_address_contact": "howard", "client_dispatch_final_address_business_name": "Birdsystem", "final_address_line1": "320 Regent Street", "final_address_line2": "", "final_address_line3": "", "client_dispatch_final_address_city": "London", "client_dispatch_final_address_county": "", "client_dispatch_final_address_post_code": "W1B 3BB", "client_dispatch_final_address_country_iso": "GB", "client_dispatch_final_address_telephone": "6666 6666 666", "client_dispatch_final_address_email": "", "note": "", "client_dispatch_container_product_list": [{ "client_dispatch_container_reference": "1", "client_dispatch_container_type_code": "BIG", "client_dispatch_container_weight": "3000", "product_id": "175035", "quantity": "10" }, { "client_dispatch_container_reference": "1", "client_dispatch_container_type_code": "BIG", "client_dispatch_container_weight": "3000", "product_id": "175036", "quantity": "10" }, { "client_dispatch_container_reference": "2", "client_dispatch_container_type_code": "BIG", "client_dispatch_container_weight": "3000", "product_id": "175036", "quantity": "10" }] }] | ||||||||||||||||||
Response | {"success":true,"message":null,"data":["8288","8289"]} | ||||||||||||||||||
Parameters |
|
三. Update the Status of Client-Dispatch
params: CLIENT_DISPATCHED
post 地址: http://test.birdsystem.com/client/Client-Dispatch/Update-Status
批量修改客户发货单状态
参数
ids | 客户发货单ID, 用'_'隔开 | * | 1_2_3 |
status | 状态 | 'CLIENT_DISPATCHED', 'PREPARING', 'DELETED' | |
confirmed | 是否接受系统自动优化 | 默认为0, 0是询问, 见本文 后面的 “关于发货模式和物流计划优化” 1是接受系统自动优化 2是不需要系统自动优化 详细解释见末尾的 发货模式优化 |
大部分情况下, 修改成功会返回
{"success":true,"refresh":false,"moduleName":"admin"}
在confirmed参数为0或者不传的情况下, 假如碰到有可优化的物流计划, 会返回如下错误信息:
{"success":true,"need_confirm":1,"message":"You can use the better price frieght, would you use it?","moduleName":"admin"}
这是因为系统会根据发货单下各产品的海关属性, 以及所选的发货模式 (是否带电),到货时间,物流计划 做一轮检查 , 如果有更适合的物流计划, 会提示是否要允许自动优化
(这种情况通常出现在: 选了带电的发货模式和物流计划,但产品并没有带电的情况下 )
出现这种情况 ,需要在修改发货单状态的请求中加上comfirmed参数,值为1或者2 (见表格中的描述) , 以便系统作出正确的响应。
Finished