简要描述:

  • 订单创建接口

方法名称:

  • createOrder

请求示例:

请求JSON:

{
	"reference_no": "TEST0001",
	"shipping_method": "PK0001",
	"country_code": "PL",
	"order_weight": 0.175,
	"order_pieces": 1,
	"reference_id": "461983",
	"shipment_id": "1235646",
	"POANumber": "64613135",
	"Consignee": {
		"consignee_street": "consignee street1",
		"consignee_street2": "consignee street2",
		"consignee_name": "consignee name",
		"consignee_telephone": "48731271276",
		"consignee_postcode": "32020",
		"consignee_province": "consignee province",
		"consignee_city": "consignee city"
	},
	"Shipper": {
		"shipper_countrycode": "CN",
		"shipper_province": "GuangDong",
		"shipper_city": "ShenZhen",
		"shipper_street": "Kengzi street",
		"shipper_postcode": "518000",
		"shipper_name": "Wang",
		"shipper_telephone": "951218",
		"shipper_mobile": "13800138000"
	},
	"ItemArr": [{
		"invoice_cnname": "甲油胶",
		"invoice_enname": "Nail Gel Polish",
		"invoice_weight": "0.033",
		"invoice_quantity": "1",
		"invoice_unitcharge": "0.59",
		"hs_code": "3506100090",
		"invoice_brand": "服装",
		"sku": "215131101",
		"box_number":"U001"
	}, {
		"invoice_cnname": "甲油胶",
		"invoice_enname": "Nail Gel Polish",
		"invoice_weight": "0.028",
		"invoice_quantity": 5,
		"invoice_unitcharge": "0.54",
		"hs_code": "3506100090",
		"invoice_brand": "电子",
		"sku": "227652501",
		"box_number":"U002"
	}],
	"Volume": [{
		"length": "10",
		"width": "20",
		"height": "30",
		"weight": "1.25",
		"box_number": "U001",
		"child_number": "TEST1234U001"
	},
	{
		"length": "10",
		"width": "20",
		"height": "30",
		"weight": "1.25",
		"box_number": "U002",
		"child_number": "TEST1234U002"
	}]
}

响应示例:

成功JSON:

{
	"ask": "Success",
	"message": "Success",
	"reference_no": "TEST0001",
	"shipping_method_no": "LZ251182095CN",
	"order_code": "EC20188041602884YQ",
	"track_status": 1,
	"sender_info_status": 1,
	"ODA": "",
	"agent_number": "",
	"system_number": "",
	"time_cost(s)": "0.437490940094"
}

失败JSON:

{
	"ask": "Failure",
	"message": "订单数据不合法",
	"reference_no": "TEST0002",
	"Error": {
		"errMessage": "服务异常[EC20188041602885YQ]换号失败。输入验证失败:收货人所在州参数长于最大长度,错误代码:202",
		"errCode": "50048"
	},
	"time_cost(s)": "0.6406359672546"
}

paramsJson参数:

参数名 数据类型 是否必填 说明
is_auto_audit string option 是否预报,Y是(下单后为预报状态),N否(下单后为草稿状态),默认为Y
reference_no string require 客户参考号
shipping_method string require 配送方式/运输方式
country_code string require 收件人国家二字码
extra_service string option 附加服务代码,多个以英文分号“;”隔开
order_weight float require 订单重量,单位KG,最多3位小数
shipping_method_no string option 服务商单号
order_pieces int require 外包装件数
insurance_value float option 投保金额
mail_cargo_type string option 申报类型
1=Gif=礼品
2=Commercial Sample=商品货样
3=Document=文件
4=Other=其他
5=Marketplace Reseller
6=Marketplace
7=Sale B2B
8=Sale B2C
默认为4
is_return int option 是否退回,包裹无人签收时是否退回,1-退回,0-不退回
cargo_type string option 货物类型
B=Box=箱子
C=Pallet=卡板
D=Document=文件
L=Letter=信封
W=Package=包裹
默认为W
sales_amount float option COD金额
sales_currency string option COD金额币种
seller_id string option 卖家ID
buyer_id string option 买家ID
payment_type string option 暂停使用该字段,默认为预付
invoice_fee float option 发票运费
other_fee float option 其他费用,快件录单使用
is_COD string option 是否为COD订单,Y是N否,默认N
reference_id string option FBA reference_id
shipment_id string option FBA shipment_id
POANumber string option FBA POANumber
warehouse_code string option FBA仓库代码
platform string option 平台类型
other
ebay
amazon
aliexpress
wish
paytm
etsy
edis
vova
daraz
clicky
flipkart
snapdeal
shopclues
platform_number string option 平台单号
total_amount float option 订单总金额
total_amount_currency string option 订单总金额币种
independent_station_url string option 独立站URL
shopname string option 店铺名称
facility_code string option fbj的快递单号
ioss string option 欧盟进口税号IOSS
customs_declaration_type string option 报关方式 通过getBasicData接口获取
customs_clearance_type string option 清关方式 通过getBasicData接口获取
Consignee object require 收件人信息
Shipper object option 发件人信息(如果没传取网站设置的发件人信息)
ItemArr object require 海关申报信息
Volume object option 材积信息,快件材积,如果传入多个则为一票多件

Consignee参数(必填项以服务商要求为准):

参数名 数据类型 是否必填 说明
consignee_company string option 收件人公司名
consignee_province string option 收件人省
consignee_city string option 收件人城市
consignee_street string option 收件人地址1
consignee_street2 string option 收件人地址2
consignee_street3 string option 收件人地址3
consignee_district string option 收件人县区(一般不填)
consignee_postcode string option 收件人邮编
consignee_name string option 收件人姓名
consignee_telephone string option 收件人电话
consignee_mobile string option 收件人手机
consignee_email string option 收件人邮箱
consignee_certificatetype string option 证件类型
ID:身份证
PP:护照
consignee_certificatecode string option 号码
consignee_credentials_period string option 有效期,
格式:2014-04-15
consignee_passport_address string option 护照签发地)
buyer_id string option 买家ID
consignee_doorplate string option 收件人门牌号
consignee_taxno string option 收件人税号(VAT&GST Number)
consignee_taxno_type string option 收件人税号类型 1=个人 2=公司 3=护照 4=其他
consignee_eori string option 收件人EORI

Shipper参数(必填项以服务商要求为准):

参数名 数据类型 是否必填 说明
shipper_company string option 发件人公司名
shipper_countrycode string option 发件人国家二字码
shipper_province string option 发件人省
shipper_city string option 发件人城市
shipper_street string option 发件人地址
shipper_street2 string option 发件人地址2
shipper_street3 string option 发件人地址3
shipper_postcode string option 发件人邮编
shipper_areacode string option 区域代码
shipper_name string option 发件人姓名
shipper_telephone string option 发件人电话
shipper_mobile string option 发件人手机
shipper_email string option 发件人邮箱
shipper_fax string option 发件人传真
shipper_doorplate string option 发件人门牌号
shipper_tax_number string option 发件人税号
shipper_tax_number_type string option 发件人税号类型 1=个人 2=公司 3=护照 4=其他
shipper_eori string option 发件人EORI
shipper_certificatecode string option 发件人证件号码
shipper_certificatetype string option 发件人证件类型 ID=身份证 PP=护照

ItemArr参数(必填项以服务商要求为准):

参数名 数据类型 是否必填 说明
invoice_enname string option 英文海关申报品名
invoice_cnname string option 中文海关申报品名
invoice_weight float option 申报重量,单位KG,最多三位小数
invoice_quantity int option 申报数量
unit_code string option 单位:
MTR=米
PCE=件
SET=套
默认为PCE
invoice_unitcharge float option 申报单价
invoice_currencycode string option 申报币种,默认为USD(美元)
hs_code string option 海关协制编号
invoice_note string option 配货信息
invoice_url string option 销售地址
sku string option 产品SKU编码
box_number string option 箱子号,长度最多50
与材积信息的箱号对应,不填默认为U001
material string option 中文材质
material_enture string option 英文材质
product_id string option 产品ID
transaction_id string option 交易ID
use string option 用途
invoice_brand string option 品牌
invoice_brand_type string option 品牌类型
invoice_category string option 品类
invoice_model string option 型号
is_magnetoelectric string option 是否带磁带电
否 N
带电 E
带磁 M
带磁带电 Y
note string option 备注1
note2 string option 备注2
deal_price float option 成交价
deal_currencycode string option 成交价币种,默认为USD
country_of_origin string option 原产国
shop_sku string option FBJ的shop sku

Volume参数(小包订单可不传此部分参数,销售产品业务类型为快件和FBA传此部分参数。详情咨询业务人员获取对应产品业务类型):

参数名 数据类型 是否必填 说明
length float option 长,单位CM
width float option 宽,单位CM
height float option 高,单位CM
weight float option 箱子重量,单位KG
child_number string option 子单号,由字母和数字组成,长度最多50
子单号在系统不能重复
box_number string option 箱号,由字母和数字组成,长度最多50
同一订单箱号不能重复
与申报信息里的箱号对应,如果没有材积信息,则默认为U001
refer_number string option 箱号,等同box_number
reference_id string option FBA reference ID
shipment_id string option FBA单号

response参数:

参数名 数据类型 说明
ask string
参考response公共参数
message string
参考response公共参数
order_code string 系统生成的运单号
refrence_no string 客户参考号
shipping_method_no string 服务商单号
track_status int 1-已产生跟踪号,2-等待后续更新跟踪号(需要异步调用getTrackNumber接口),3-不需要跟踪号
sender_info_status int 0-不需要分配地址,1-需要分配地址
agent_number string 代理单号—转单号
system_number string 第三方系统单号
tracking_number_list Object 子单跟踪号
Error object
参考Error格式

完整请求参考报文:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns1="http://www.example.org/Ec/">
    <SOAP-ENV:Body>
        <ns1:callService>
            <paramsJson>{
                "reference_no": "TEST0001",
                "shipping_method": "PK0001",
                "country_code": "PL",
                "order_weight": 0.175,
                "order_pieces": 1,
                "reference_id": "461983",
                "shipment_id": "1235646",
                "POANumber": "64613135",
                "Consignee": {
                    "consignee_street": "consignee street1",
                    "consignee_street2": "consignee street2",
                    "consignee_name": "consignee name",
                    "consignee_telephone": "48731271276",
                    "consignee_postcode": "32020",
                    "consignee_province": "consignee province",
                    "consignee_city": "consignee city"
                },
                "Shipper": {
                    "shipper_countrycode": "CN",
                    "shipper_province": "GuangDong",
                    "shipper_city": "ShenZhen",
                    "shipper_street": "Kengzi street",
                    "shipper_postcode": "518000",
                    "shipper_name": "Wang",
                    "shipper_telephone": "951218",
                    "shipper_mobile": "13800138000"
                },
                "ItemArr": [{
                    "invoice_cnname": "甲油胶",
                    "invoice_enname": "Nail Gel Polish",
                    "invoice_weight": "0.033",
                    "invoice_quantity": "1",
                    "invoice_unitcharge": "0.59",
                    "hs_code": "3506100090",
                    "invoice_brand": "服装",
                    "sku": "215131101",
                    "box_number":"U001"
                }, {
                    "invoice_cnname": "甲油胶",
                    "invoice_enname": "Nail Gel Polish",
                    "invoice_weight": "0.028",
                    "invoice_quantity": 5,
                    "invoice_unitcharge": "0.54",
                    "hs_code": "3506100090",
                    "invoice_brand": "电子",
                    "sku": "227652501",
                    "box_number":"U002"
                }],
                "Volume": [{
                    "length": "10",
                    "width": "20",
                    "height": "30",
                    "weight": "1.25",
                    "box_number": "U001",
                    "child_number": "TEST1234U001"
                },
                {
                    "length": "10",
                    "width": "20",
                    "height": "30",
                    "weight": "1.25",
                    "box_number": "U002",
                    "child_number": "TEST1234U002"
                }]
           }</paramsJson>
            <appToken>填自己的appToken</appToken>
            <appKey>填自己的appKey</appKey>
            <service>createOrder</service>
        </ns1:callService>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>