Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Steps to create and manage Client-Dispatch

  1. Get warehouse list
  2. 存储[起始仓]和[目的仓], [发货日期], [发货方式]
  3. Get Warehouse Dispatch Freight 根据 起始仓, 目的仓, 发货日期, 发货方式获取物流计划
  4. Get Client-Dispatch-Delivery-Type 获取到仓调度类型, 存储[到仓调度类型], 判断是否需要填写[vat],[收货人地址]
  5. Get 获取发货方式, 存储[发货方式], 存储该[发货方式的的必填项]
  6. Post Client-Dispatch Request提交
  7. Post Request to add Client-Dispatch-Container 添加客户发货箱
  8. Post Request to add Client-Dispatch-Contaienr-Product添加客户发货箱产品
  9. Post Request to update the status of Client-Dispatch 更改状态

...这样做太累了, 所以我们提供了一次请求, 批量创建的接口.

一. Related API Request 获取预置信息

Pre-required fields, only Client-Dispatch-Freight vary daily, others remain stable

预置信息中, 只有发货批次ID是每天变动的, 其他基本不变, 不用每次都获取.

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)

/client/Address-Book

二. Create Client-Dispatch API all-in-one 批量创建客户发货单

url

http://test.birdsystem.com/client/Client-Dispatch-Upload/Client-Dispatch-Json

method

post

body

[
    {
        "warehouse_id_origination": "80",
        "warehouse_id_destination": "1",
        "final_freight_method": "AIR",
        "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": "505",
        "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": "",
        "shipping_agent_id": "1",
        "shipping_agent_delivery_reference": "aabb",
        "shipping_agent_note": "aabb",
        "note": "",
        "client_dispatch_container_product_list": [
            {
                "client_dispatch_container_reference": "1",
                "client_dispatch_container_type_code": "BIG",
                "client_dispatch_container_weight": "3000",
                "product_id": "499235",
                "quantity": "10"
            },
            {
                "client_dispatch_container_reference": "1",
                "client_dispatch_container_type_code": "BIG",
                "client_dispatch_container_weight": "3000",
                "product_id": "499235",
                "quantity": "10"
            },
            {
                "client_dispatch_container_reference": "2",
                "client_dispatch_container_type_code": "BIG",
                "client_dispatch_container_weight": "3000",
                "product_id": "499235",
                "quantity": "10"
            }
        ]
    }
]

返回

{"success":true,"message":null,"data":["8288","8289"]}

参数

FieldComment
warehouse_id_origination起始仓id, 通过/client/Warehouse/Client-Use-Warehouse获取  
(当type为DIRECT的时候时,这个字段不用填,始终跟warehouse_id_destination一致,当type为SPONTANEOUS和WAREHOUSE_TRANSFER时,选填,不填则跟warehouse_id_destination一致,其余情况必填)
warehouse_id_destination目的仓id, 同上
is_use_whole_warehouse_dispatch_freight是否包柜
warehouse_dispatch_freight_id

发货批次, 通过/client/Warehouse-Dispatch-Freight/Get-Closest-Freight获取

[参数:delivery_time, final_freight_method, warehouse_id_origination, warehouse_id_destination,is_use_whole_freight,type]

上面几个参数的解释: 货到头程仓时间, 最终运输方式, 起始仓,目的仓,是否包柜,发货单类型

(当发货单的类型type为'SPONTANEOUS','CLIENT_TRANSFER','DIRECT','WAREHOUSE_TRANSFER'时,这个字段为空, 其余情况必填)

client_dispatch_delivery_type_code

到仓调度类型, code值请看/client/Client-Dispatch-Delivery-Type 
如果到仓调度类型的列is_delivery_to_warehouse为0, 则发货单需要填写最终发货地址的联系人, 国家.  

client_vat_number_id客户vat账号id, 通过/client/Client-Dispatch-Vat-Number获取 
client_dispatch_container_type_code客户发货箱类型, code值请看 /client/Client-Dispatch-Container-Type
final_address_*如果有预存的地址薄可以通过/client/Address-Book获取[参数:type], 也可以通过这个地址维护地址薄
shipping_agent_id

客户发货到仓库的方式, 可以通过/client/Shipping-Agent/列表来获取

目前shipping_agent_id取值可以为1,2,3,4四个数字,且不同数字时有不同的附加字段.如下:
1:快递发货
附加参数: 
shipping_agent_property_1: 快递公司, 选填 
shipping_agent_property_2: 体积(m3), 选填
shipping_agent_property_3: 重量(kg), 选填
shipping_agent_property_35: 发货时间(yyyy-mm-dd hh:ii:ss), 选填

2:飞鸟提货
附加参数: 
shipping_agent_property_4: 发货人及电话, 必填 
shipping_agent_property_5: 提货时间(yyyy-mm-dd hh:ii:ss), 必填
shipping_agent_property_6: 体积(m3), 必填
shipping_agent_property_37: 提货时间段, 必填 
shipping_agent_property_38: 重量(kg), 必填

3: 客户自送
附加参数: 
shipping_agent_property_7: 发货人及电话, 必填 
shipping_agent_property_8: 车牌号, 选填
shipping_agent_property_9: 发货时间(yyyy-mm-dd hh:ii:ss), 选填
shipping_agent_property_10: 体积(m3), 选填

4: 物流发货
附加参数: 
shipping_agent_property_11: 物流公司, 选填 
shipping_agent_property_12: 体积(m3), 选填
shipping_agent_property_13: 重量(kg), 选填
shipping_agent_property_36: 发货时间(yyyy-mm-dd hh:ii:ss), 选填

shipping_agent_delivery_reference客户发货到仓库时, 用于参考的跟踪号信息
shipping_agent_note客户发货到仓库时的备注信息
type'NORMAL','TRANSFER','SPONTANEOUS','CLIENT_TRANSFER','DIRECT','WAREHOUSE_TRANSFER'其中之一
confirmed

是否同意系统自动切换物流计划, 默认为0,还可取值 1, 2

0是表示系统直接返回提示: 是否更换物流计划

1是表示允许系统自动更换

2是表示不允许系统自动更换.

三. Update the status of Client-Dispatch 修改发货单状态

params: CLIENT_DISPATCHED

Unable to render {include} The included page could not be found.

Finished

  • No labels