TTWUSA APIV2

出库管理

添加出库单

创建出库订单。

POST
生产环境https://ssl.glitzcloud.com/agent/v1/orders/order/add
测试环境http://gztest.glitzcloud.com/agent/v1/orders/order/add
Content-Typeapplication/json

说明

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

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

鉴权说明

请参阅鉴权签名说明。

请求参数

名称类型必填示例值描述
store_nameString是The Warehouse USA仓库名称
platform_shop_nameString否Amazon平台名称
is_hotInteger否1是否加急
shop_idString否APIStore店铺名称
order_snString是G201608150001平台店铺订单编号
pre_outflow_timeString否2016-08-15~2016-08-20 或 2016-08-15要求出库时间
client_order_idString否XM3K9U034033客户订单编号
remarkString否remark备注
business_typeInteger是1,2,3,5,61:B2B,2:B2C,3:SHOW,5:FBA,6:3rd Party
reference_idString否reference_id参考订单号,如果business_type是FBA 此选项必填
transport_idString是UPS快递公司名称,[物流方式]接口获取
shipmethod_idString是UPS Ground派送方式,[物流方式]接口获取
packagetype_idString是Your Packaging包裹类型,[物流方式]接口获取
declared_cFloat否100.5预报长度
declared_kFloat否100.5预报宽度
declared_gFloat否100.5预报高度
companyString否Glitzhome收件人公司
nameString是Jim收件人
telephoneString是021-5370246电话号码
postcodeString是200000邮编
address_1String是上海浦东新区地址第一行
address_2String否金科路2889号地址第二行
address_3String否长泰广场C栋1002地址第三行
countryString是US国家二字码
provinceString是WA省/州
cityString是New York市
bill_typeInteger是支付方式0:TWUSA平台支付1:第三方平台支付2:到付3:客户自供面单4:客户自有快递账号支付
tp_accntString否支付账号bill_type=1时必填,第三方平台支付账号
bill_nameString否账单名称bill_type=1时必填,第三方平台支付账单名称
bill_phoneString否账单电话bill_type=1时必填,第三方平台支付账单电话
bill_countryString否账单国家bill_type=1时必填,第三方平台支付账单国家
bill_stateString否账单州bill_type=1时必填,第三方平台支付账单州
bill_cityString否账单城市bill_type=1时必填,第三方平台支付账单城市
bill_zipString否账单邮编bill_type=1时必填,第三方平台支付账单邮编
bill_attentionString否账单备注第三方平台支付账单备注
bill_addr1String否账单地址bill_type=1时必填,第三方平台支付账单地址
bill_addr2String否账单地址第三方平台支付账单地址
track_numString否物流跟踪号bill_type=3时必填,否则为非必填
forecast_apply_packageInteger是1建议包装方式 值参考范围: 1、使用自己箱子 2、使用仓库箱子 3、自带包装单件包裹 4、多件包装 5、多件缠绕膜缠绕
allow_edit_package_methodInteger是0是否允许仓库修改包装方式,0:不允许,1:允许
is_do_best_wayInteger否2是否智能换仓,0:智能换仓,2:选定仓库(默认)
is_allow_warehouse_editInteger否0是否允许仓库修改快递公司,0:否,1:是
is_print_packlistInteger是1是否打印PackList 0 否 1 是
is_print_attachmentInteger是1是否打印附件 0 否 1 是
is_routeInteger否0是否需要Route
is_insuranceFloat否0是否投保,0:不投保;1:投保;当transport_id是Ups或Fedex支持投保。
signature_valueInteger否1签名服务,1:直接签名;2:间接签名;3:成人签名。留空表示无需签名服务
statusInteger否0是否预录出库单,0:否;4:是
ship_shortInteger否0,1是否短缺发货 0 否 1 是;仅未生成拣货批次或订单异常时可修改此字段
productsString是[{\"exp_piece_qty\":1,\"product_sn\":\"X003GUP025\"}]产品列表,json字符串
attachment_0Array否{ "name":"0093236573-1619972.pdf", "type":"application\/octet-stream", "tmp_name":"\/tmp\/php4hSSRv", "error":0, "size":200996 }附件(此字段是为了兼容老用户form表单创建出库单而保留,新对接用户请使用[添加出库单附件]接口异步添加附件)

返回字段

参数类型示例值描述
order_idInteger2509出库单ID
outflow_snStringGCO03172100003出库单编号

示例

请求示例
{
    "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",
    "name": "Jim",
    "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": "[{\"exp_piece_qty\":1,\"product_sn\":\"X003GUP025\"}]"
}
返回示例
{
    "status": 200,
    "reqMsg": "ok",
    "result": {
        "order_id": "2509",
        "outflow_sn": "GCO03172100003"
    }
}
示例 3
{
    "status": "2518",
    "reqMsg": "Carrier is compulsory",
    "result": []
}