添加入库单
1、功能名称:添加入库单
2、功能描述:添加入库单
3、请求地址:https://ssl.glitzcloud.com/agent/v1/asn/storage/add
测试地址:http://gztest.glitzcloud.com/agent/v1/asn/storage/add
4、请求方式:POST
5、请求参数
必填说明
1.如果 source_type == NORMAL ASN 且 入库类型 是(20GP, 40GP, 40HQ, 45HQ, LCL) container_no,seal_no 必填
2.如果 source_type == NORMAL ASN 且 入库类型 是(Pallet, carton) track_num 必填 container_no,seal_no非必填
3.如果 source_type == FBA TRANSFER或者OTHER 且 入库类型 是(20GP, 40GP, 40HQ, 45HQ, LCL) container_no,seal_no 必填
4.如果 source_type == FBA TRANSFER或者OTHER 且 入库类型 是(Pallet, carton) track_num 必填 container_no,seal_no, etd_time, eta_time非必填
| 名称 | 必填 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|
| store_name | 是 | String | The Warehouse USA | 仓库名称 |
| declared_value | 否 | Float | 122.63 | 申报价值 |
| weight | 否 | Float | 0.08 | 申报重量(kg) |
| length | 否 | Float | 2.13 | 申报长(cm) |
| width | 否 | Float | 3.12 | 申报宽(cm) |
| height | 否 | Float | 1.32 | 申报高(cm) |
| container_no | 否 | String | C156415621 | 箱子编号,商家自行定义 |
| seal_no | 是 | String | C56145621 | 封号,商家根据实际箱封号如实填写 |
| reference_no | 否 | String | 5645621 | 引用编号,商家自行定义,不能和以往的订单有重复 |
| track_num | 否 | String | 5645621 | tracking #,如果source_type为FBA TRANSFER,必填,并且不能和以往的订单有重复 |
| remark | 否 | String | 备注 | 备注 |
| shipping_time | 是 | date | 2016-08-15 | 发货时间 |
| schedule_time | 是 | date | 2016-08-15 | 预计到达时间 |
| etd_time | 是 | date | 2016-08-15 | 预计离港时间 |
| eta_time | 是 | date | 2016-08-15 | 预计到港时间,如果填写必须 小于等于schedule_time |
| 20GP | 否 | Integer | 1 | 海运整柜入库时必填,四种集装箱型根据实际情况选一个填写,且值仅能为1 |
| 40GP | 否 | Integer | 1 | |
| 40HQ | 否 | Integer | 1 | |
| 45HQ | 否 | Integer | 1 | |
| pallet | 否 | Integer | 2 | 托盘入库时必填 |
| carton | 否 | Integer | 8 | 包裹入库时必填 |
| lcl | 否 | Integer | 1 | 海运拼箱入库时必填 |
| source_type | 是 | String | NORMAL ASN | 入库来源类型,有三个值NORMAL ASN、FBA TRANSFER、OTHER |
| carrier | 否 | String | UPS,USPS,FEDEX | 承运商,物流公司 |
| products | 是 | json | [ { "product_sn":"string", "exp_carton_qty": 0, "exp_piece_qty": 0, "container_max_qty": 0 } ] | 产品列表,json字符串 product_sn: 产品SKU exp_carton_qty: 箱子总数 exp_piece_qty: 预报数量 container_max_qty:箱入数 |
| delivery_type | 是 | int | 1 | 入库派送方式 1:海运整柜 2:海运拼箱 3:零担卡车 4:快递派送 |
| split_box | 否 | int | 0 | 是否需要拆箱(0 否 1 是) |
| head_transport_type | 否 | int | 0 | 是否使用TWUSA头程服务(0 否 1 是) |
6、请求示例
array(
'format'=>'json',
'apikey'=>'85082f5f62a811e684f500163e06045f',
'randoms'=>1234,
'sign'=>'656d6fbe6b7dec6c2e77ffe27f04bd6d',
'store_name' => 'The Warehouse USA',
'declared_value' => 111,
'length' => 2.54,
'width' => 2.54,
'height' => 2.54,
'weight' => 0.02,
'container_no' => 'C123456',
'seal_no' => 'S123456',
'remark' => '备注',
'schedule_time' => '2016-08-15',
'etd_time' => '2016-08-15',
'eta_time' => '2016-08-15',
'reference_no' => 'R123456',
'20GP' => 1,
'source_type' => 'NORMAL ASN',
'carrier' => 'UPS',
'products' => '
[
{
"product_sn": "Amy001",
"exp_carton_qty": "1",
"exp_piece_qty": "4",
"container_max_qty": 4
},
{
"product_sn": "AMY002",
"exp_carton_qty": "2",
"exp_piece_qty": "6",
"container_max_qty": 3
}
]
',
'delivery_type' => 1
);
7、返回格式:JSON
8、返回示例:
正确时的返回JSON数据包如下:
{"status":200,"reqMsg":"ok","result":{"asn_no":"20170703001","storage_sn":"GCI17070300001"}}
错误时的返回JSON数据包如下:
{"status":"2030","reqMsg":"No skus, please create sku at first","result":[]}
9、返回参数说明:
| 参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| asn_no | String | 20170703001 | 参考订单号,如果存在就是入库单号 |
| storage_sn | String | GCI17070300001 | 入库单号 |
