添加出库单

1、功能名称:添加出库单

2、功能描述:添加出库单

3、请求地址:https://ssl.glitzcloud.com/agent/v1/orders/order/add

      测试地址:http://gztest.glitzcloud.com/agent/v1/orders/order/add

4、请求方式:POST

5、请求参数

名称 类型 必填 示例值 描述
store_name String The Warehouse USA 仓库名称
platform_shop_name String Amazon 平台名称
is_hot Integer 1 是否HOT
shop_id String APIStore 店铺名称
order_sn String G201608150001 平台店铺订单编号
pre_outflow_time String 2016-08-15~2016-08-20 或 2016-08-15 要求出库时间
client_order_id String XM3K9U034033 客户订单编号
remark Text remark 备注
business_type Integer 1,2,3,5,6 1:B2B,2:B2C,3:SHOW,5:FBA,6:3rd Party
reference_id String 如果business_type是FBA 此选项必填 reference_id 参考订单号
transport_id String UPS 快递公司名称
shipmethod_id String UPS Ground 派送方式
packagetype_id String Your Packaging 包裹类型
declared_c Float 100.5 预报长度
declared_k Float 100.5 预报宽度
declared_g Float 100.5 预报高度
company String Glitzhome 收件人公司
name String Jim 收件人
telephone String 021-5370246 电话号码
postcode String 200000 邮编
address_1 Text 上海浦东新区 地址第一行
address_2 Text 金科路2889号 地址第二行
address_3 Text 长泰广场C栋1002 地址第三行
country String US 国家二字码
province String WA 省/州
city String New York
bill_type Integer 支付方式 0:TWUSA平台支付
1:第三方平台支付
2:到付
3:客户自供面单
4:客户自有快递账号支付
tp_accnt String 支付账号 第三方平台支付账号
bill_name String 账单名称 第三方平台支付账单名称
bill_phone String 账单电话 第三方平台支付账单电话
bill_country String 账单国家 第三方平台支付账单国家
bill_state String 账单州 第三方平台支付账单州
bill_city String 账单城市 第三方平台支付账单城市
bill_zip String 账单邮编 第三方平台支付账单邮编
bill_attention String 账单备注 第三方平台支付账单备注
bill_addr1 String 账单地址 第三方平台支付账单地址
bill_addr2 String 账单地址 第三方平台支付账单地址
track_num String 如果支付方式是客户自供面单必填,否则为非必填 物流跟踪号
forecast_apply_package Integer 1 建议包装方式 值参考范围:
1、使用自己箱子
2、使用仓库箱子
3、自带包装单件包裹
4、多件包装
5、多件缠绕膜缠绕
allow_edit_package_method Integer 0 是否允许仓库修改包装方式,0:不允许,1:允许
is_do_best_way Integer 2 是否智能换仓,0:智能换仓,2:选定仓库(默认)
is_allow_warehouse_edit Integer 0 是否允许仓库修改快递公司,0:否,1:是
is_print_packlist Integer 1 是否打印PackList 0 否 1 是
is_route Integer 0 是否需要Route
is_insurance Float 0 是否投保,0:不投保;1:投保;当transport_id是Ups或Fedex支持投保。
signature_value Integer 1 签名服务,1:直接签名;2:间接签名;3:成人签名。留空表示无需签名服务
status Integer 0 是否预录出库单,0:否;4:是
ship_short Integer 0,1 是否短缺发货 0 否 1 是;仅未生成拣货批次或订单异常时可修改此字段
products json [{"product_sn":"SKU001",
"exp_piece_qty":"4",
"product_id":"1000"},
{"product_sn":"SKU002",
"exp_piece_qty":"6",
"product_id":"1001"}]
产品列表,数组json格式
file file 附件

6、请求示例

           array(
                    'format'=>'json',
                    'apikey'=>'85082f5f62a811e684f500163e06045f',
                    'randoms'=>1234,
                    'sign'=>'656d6fbe6b7dec6c2e77ffe27f04bd6d',
                    'store_name' => 'The Warehouse USA',
                    'platform_shop_name' => 'Amazon',
                    'is_hot' => 1,
                    'shop_id' => 'APIStore',
                    'order_sn' => 'G201608150001',
                    'pre_outflow_time' => '2016-08-15',
                    'remark' => 'remark',
                    'business_type' => '1'
                    'transport_id' => 'UPS',
                    'shipmethod_id' => 'UPS Ground',
                    'packagetype_id' => 'Your Packaging',
                    'declared_c' => 100.5,
                    'declared_k' => 100.5,
                    'declared_g' => 100.5,
                    'company' => 'glitzhome',
                    'telephone' => '021-5370246',
                    'postcode' => '200000',
                    'address_1' => '上海浦东新区',
                    'address_2' => '金科路2889号',
                    'address_3' => '长泰广场C栋1002',
                    'country' => 'US',
                    'province' => 'WA',
                    'city' => 'New York',
                    'bill_type' => 1,
                    'forecast_apply_package' => 1,
                    'allow_edit_package_method' => 1,
                    'is_do_best_way' => 1,
                    'status' => 0,
                    'products' => '[{"product_sn":"Amy001","exp_piece_qty":"4","product_id":"1000"},{"product_sn":"AMY002","exp_piece_qty":"6","product_id":"1001"}]'
                    'file' => '文件流'
             );
        

7、返回格式:JSON

8、返回示例:

正确时的返回JSON数据包如下:

{"status":200,"reqMsg":"ok","result":{"order_id":"2509","outflow_sn":"GCO03172100003"}}

错误时的返回JSON数据包如下:

{"status":"2518","reqMsg":"Carrier is compulsory","result":[]}

9、返回参数说明:

参数 类型 示例值 描述
order_id Integer 2509 出库单ID
outflow_sn string GCO03172100003 出库单编号

全局返回码说明