华磊科技
名称 |
---|
接口地址 | ||
---|---|---|
创建订单 | URL1 | http://118.25.228.118:8082 |
打印标签 | URL2 | http://118.25.228.118:8089 |
(请注意,这里是测试环境url,正式环境url请联系货代)
...
(请注意,这里是测试环境url,正式环境url请联系货代)
1身份认证 (红色的是账号和密码)
URL1/selectAuth.htm?username=TEST&password=123456
...
ack=true则代表认证成功,customer_id和customer_userid用于新建订单
2.渠道列表
URL1/getProductList.htm
...
[{"product_id":"***","product_shortname":"***小包"}]
3添加订单(UTF-8)
URL1/createOrderApi.htm?param=
{
"battery_typebuyerid": "电池类型",
"cargoorder_typepiece": "P件数,小包默认1,快递需真实填写",
"consignee_addressmobile": "收件地址街道,必填手机号,选填。为方便派送最好填写",
"consigneeorder_cityreturnsign": "城市退回标志,默认N表示不退回,Y标表示退回。中邮可以忽略该属性",
"consigneetrade_companynametype": "收件公司ZYXT",
"consigneeduty_doornotype":"收件门牌号DDU或DDP",
"consigneebattery_emailtype":"收件邮箱电池类型代码,联系货代提供",
"consignee_faxname": "收件传真收件人,必填",
"consignee_mobilecompanyname": "收件手机收件公司名,如有最好填写",
"consignee_nameaddress": "收件人,必填收件地址街道,必填",
"consignee_passportnotelephone": "收件护照号收件电话,必填",
"consignee_postcodecountry": "邮编收件国家二字代码,必填",
"consignee_state": "州/省",
"consignee_streetnocity": "收件街道号城市",
"consignee_suburb": "收件区收件区,选填",
"consignee_taxnopostcode": "收件税号邮编,有邮编的国家必填",
"consignee_telephonepassportno": "收件电话,必填收件护照号,选填",
"country": "收件国家二字代码,必填",
"customer_idconsignee_email": "客户ID,必填邮箱,选填",
"customerconsignee_useridtaxno": "登录人ID,必填收件人税号",
"dutyconsignee_typetaxnotype": "关税类型收件人税号类型",
"fbaconsignee_shipment_idtaxnocountry": "收件人税号国家",
"isconsignee_fbastreetno": "街道号",
"orderInvoiceParam": [{
"api_skuconsignee_doorno": "门牌号",
"boxshipper_notaxnotype":"箱号",
"hs_code": "",
"invoice_amount": "申报价值,必填",
"invoice_attribute1": "",
"invoice_attribute2": "",
"invoice_currency": "",
"invoice_pcs": "件数,必填",
"invoice_title": "品名,必填",
"invoice_unitprice": "",
"invoice_weight": "单件重",
"item_id": "",
"item_transactionid": "",
"origin_country": "原产地国家二字代码",
"sku": "中文品名",
"sku_code": "sku代码",
"invoiceunit_code":"申报单位",
"invoice_imgurl":"图片地址",
"invoice_brand":"品牌",
"transaction_url":"销售地址",
"invoice_rule":"规格",
"invoice_currency":"申报币种",
"invoice_taxno":"税则号",
"origin_country":"原产国",
"invoice_material":"材质",
"invoice_purpose":"用途"
}, {
"api_sku": "",
"box_no": "箱号",//FBA必填
"hs_code": "",
"invoice_amount": "申报价值,必填",
"invoice_attribute1": "",
"invoice_attribute2": "",
"invoice_currency": "",
"invoice_税号类型,邮政产品可选值:IOSS,NO-IOSS,OTHER;DHL可选值:SDT、VAT、FTZ、DAN、EOR、CNP、EIN等(类型说明参照文档底部“DHL发件人税号类型”)","shipper_taxno":"发件人税号","shipper_taxnocountry":"发件人税号国家,用国家二字码",
"customer_id": "客户ID,必填",
"customer_userid": "登录人ID,必填",
"order_customerinvoicecode": "原单号,必填",
"product_id": "运输方式ID,必填",
"weight": "总重,选填,如果sku上有单重可不填该项",
"product_imagepath": "图片地址,多图片地址用分号隔开",
"order_transactionurl": "产品销售地址",
"order_cargoamount": "选填;用于DHL/FEDEX运费;或用于白关申报(订单实际金额,特殊渠道使用);或其他用途",
"order_insurance": "保险金额",
"cargo_type": "包裹类型,P代表包裹,D代表文件,B代表PAK袋",
"order_customnote": "自定义信息",
"orderInvoiceParam": [
{
"invoice_amount": "申报总价值,必填",
"invoice_pcs": "件数,必填",
"invoice_title": "品名,必填英文品名,必填",
"invoice_unitprice": "",
"invoice_weight": "单件重",
"item_idsku": "中文品名",
"itemsku_transactionidcode": "配货信息",
"originhs_countrycode": "原产地国家二字代码海关编码",
"skuimport_hs_code": "中文品名进口海关编码",
"skutransaction_codeurl": "sku代码销售地址",
"invoiceunit_code": "申报单位",
"invoice_imgurl": "图片地址",
"transaction_url":"销售地址",
"invoice_brand": "品牌",
"invoice_rule": "规格",
"invoice_currency": "申报币种",
"invoice_taxno": "税则号",
"origin_country": "原产国",
"invoice_material": "材质",
"invoice_purpose": "用途"
}
],
"orderVolumeParam": [{
"box_no": "箱号", //FBA必填
"child_no": "子单号,选填",
"has_battery": "是否带电",
"order_id": "",
"选填
"volume_height": "高,单位CM",
"volume_length": "长,单位CM",
"volume_volweightwidth": "体积重宽,单位CM",
"volume_weight": "实重",
"volume_width": "宽,单位CM"
}],
"order_callbackurl": "",
"order_cargoamount": "",
"order_codamount": "COD金额",
"order_codcurrency": "COD币种",
"order_consigneesign": "N",
"order_customerinvoicecode": "原单号,必填",
"order_customnote": "自定义信息",
"order_id": "",
"order_insurance": "保险",
"order_note1": "",
"order_note2": "",
"order_note3": "",
"order_note4": "",
"order_note5": "",
"order_piece": "1",
"order_privatecode": "内部单号",
"order_referencecode": "专线单号",
"order_remark": "备注",
"order_returnsign": "N",
"order_salerecordnumber": "",
"order_serveinvoicecode": "转单号",
"order_status": "状态",
"order_transactionurl": "销售地址",
"packing_url": "",
"poa_number": "",
"product_id": "运输方式ID,必填",
"product_imagepath": "",
"product_name": "",
"reference_id": "",
"shipper_address1": "发件人地址1",
"shipper_address2": "发件人地址2",
"shipper_address3": "发件人地址3",
"shipper_city": "发件人城市",
"shipper_companyname": "发件人公司名称",
"shipper_country": "发件人国家",
"shipper_doorno": "发件人门牌号",
"shipper_name": "发件人名称",
"shipper_passportno": "发件人护照号",
"shipper_postcode": "发件人邮编",
"shipper_state": "发件人州省",
"shipper_suburb": "发件人区",
"shipper_telephone": "发件人电话",
"trade_type": "",
"w_code": "仓库代码",
"w_id": "仓库ID",
"weight": "总重,选填,如果sku上有单重可不填该项"
}
以上请求以post方式提交
返回值
{"ack":"true","childList":[{"child_number":"子单号"}],"delay_type":"","is_changenumbers":"","is_delay":"是否延迟获取单号,Y代表需要延迟获取单号","is_remote":"N是否偏远,N为不偏远,Y为偏远,A为fedex偏远A级,B为fedex偏远B级, C为fedex偏远C级","is_residential":"是否住宅,Y表示住宅地址","message":"如果未获取到转单号,则该列存放失败原因(该内容请urldecode后查看)","order_id":"xxxxxxx,id需要保存,用于打印标签","order_privatecode":"","order_transfercode":"特殊情况下使用,默认不用理会","post_customername":"","product_tracknoapitype":"值为3时需要调用获取跟踪号接口来更新单号","reference_number":"参考号","return_address":"","tracking_number":"跟踪号"}
FBA报文请参考
如有添加订单不需要系统自动分配单号,请按如下方式进行对接
...
{
"buyerid": "",
"order_piece": "件数,小包默认1,快递需真实填写",
"consignee_mobile": "手机号,选填。为方便派送最好填写",
"order_returnsign": "退回标志,默认N表示不退回,Y标表示退回。中邮可以忽略该属性",
"trade_type": "ZYXT","duty_type":"DDU或DDP","battery_type":"电池类型代码,联系货代提供",
"consignee_name": "收件人,必填",
"consignee_companyname": "收件公司名,如有最好填写",
"consignee_address": "收件地址街道,必填",
"consignee_telephone": "收件电话,必填",
"country": "收件国家二字代码,必填",
"consignee_state": "州/省",
"consignee_city": "城市",
"consignee_suburb": "收件区,选填",
"consignee_postcode": "邮编,有邮编的国家必填",
"consignee_passportno": "收件护照号,选填",
"consignee_email": "邮箱,选填",
"consignee_taxno": "收件人税号","consignee_taxnotype": "收件人税号类型",
"consignee_streetno": "街道号",
"consignee_doorno": "门牌号",
"shipper_taxnotype":"税号类型,邮政产品可选值:IOSS,NO-IOSS,OTHER;DHL可选值:SDT、VAT、FTZ、DAN、EOR、CNP、EIN等(类型说明参照文档底部“DHL发件人税号类型”)","shipper_taxno":"发件人税号","shipper_taxnocountry":"发件人税号国家,用国家二字码",
"customer_id": "客户ID,必填",
"customer_userid": "登录人ID,必填",
"order_customerinvoicecode": "原单号,必填",
"product_id": "运输方式ID,必填",
"weight": "总重,选填,如果sku上有单重可不填该项",
"product_imagepath": "图片地址,多图片地址用分号隔开",
"order_transactionurl": "产品销售地址",
"order_cargoamount": "选填;用于DHL/FEDEX运费;或用于白关申报(订单实际金额,特殊渠道使用);或其他用途",
"order_insurance": "保险金额",
"cargo_type": "包裹类型,P代表包裹,D代表文件,B代表PAK袋",
"order_customnote": "自定义信息",
"orderInvoiceParam": [
{
"invoice_amount": "申报总价值,必填",
"invoice_pcs": "件数,必填",
"invoice_title": "英文品名,必填",
"invoice_weight": "单件重",
"sku": "中文品名",
"sku_code": "配货信息",
"hs_code": "海关编码",
"transaction_url": "销售地址",
"invoiceunit_code": "申报单位",
"invoice_imgurl": "图片地址",
"invoice_brand": "品牌",
"invoice_rule": "规格",
"invoice_currency": "申报币种",
"invoice_taxno": "税则号",
"origin_country": "原产国",
"invoice_material": "材质",
"invoice_purpose": "用途"
}
],
"orderVolumeParam": [{//选填
"volume_height": "高,单位CM",
"volume_length": "长,单位CM",
"volume_width": "宽,单位CM",
"volume_weight": "实重"
}]
}
...
{"ack":"true","childList":[{"child_number":"子单号"}],"delay_type":"","is_changenumbers":"","is_delay":"是否延迟获取单号,Y代表需要延迟获取单号","is_remote":"N是否偏远,N为不偏远,Y为偏远,A为fedex偏远A级,B为fedex偏远B级, C为fedex偏远C级","is_residential":"是否住宅,Y表示住宅地址","message":"如果未获取到转单号,则该列存放失败原因(该内容请urldecode后查看)","order_id":"xxxxxxx,id需要保存,用于打印标签","order_privatecode":"","order_transfercode":"特殊情况下使用,默认不用理会","post_customername":"","product_tracknoapitype":"值为3时需要调用获取跟踪号接口来更新单号","reference_number":"参考号","return_address":"","tracking_number":"跟踪号"}
message进行了urlencode,请编程人员进行urldecode查看原始内容
含发件人
URL1/createOrderApi.htm?param=
{
"buyerid": "",
"order_piece": "件数,小包默认1,快递需真实填写",
"consignee_mobile": "手机号,选填。为方便派送最好填写",
"order_returnsign": "退回标志,默认N表示不退回,Y标表示退回。中邮可以忽略该属性",
"trade_type": "ZYXT","duty_type":"DDU或DDP","battery_type":"电池类型代码,联系货代提供",
"consignee_name": "收件人,必填",
"consignee_companyname": "收件公司名,如有最好填写",
"consignee_address": "收件地址街道,必填",
"consignee_telephone": "收件电话,必填",
"country": "收件国家二字代码,必填",
"consignee_state": "州/省",
"consignee_city": "城市",
"consignee_suburb": "收件区,选填",
"consignee_postcode": "邮编,有邮编的国家必填",
"consignee_passportno": "收件护照号,选填",
"consignee_email": "邮箱,选填",
"consignee_taxno": "收件人税号",
"consignee_streetno": "街道号",
"consignee_doorno": "门牌号",
"customer_id": "客户ID,必填",
"customer_userid": "登录人ID,必填",
"order_customerinvoicecode": "原单号,必填",
"product_id": "运输方式ID,必填",
"weight": "总重,选填,如果sku上有单重可不填该项",
"product_imagepath": "图片地址,多图片地址用分号隔开",
"shipper_name": "发件人姓名,选填",
"shipper_companyname": "发件人公司名,选填",
"shipper_address1": "发件人地址1,选填",
"shipper_address2": "发件人地址2,选填",
"shipper_address3": "发件人地址3,选填",
"shipper_city": "发件人城市,选填",
"shipper_state": "发件人州,选填",
"shipper_postcode": "发件人邮编,选填",
"shipper_country": "发件人国家,选填",
"shipper_telephone": "发件人电话,选填",
"shipper_suburb": "发件人区,选填",
"orderVolumeParam": [{//选填
"volume_height": "高,单位CM",
"volume_length": "长,单位CM",
"volume_width": "宽,单位CM",
"volume_weight": "实重"
}]
}
代收货款业务
URL1/createOrderApi.htm?param=
...
批量下单接口
URL1/createOrderBatchApi.htm?param=[{"buyerid":"","consignee_address":"收件地址街道,必填","order_piece":"件数,小包默认1,快递需真实填写","consignee_city":"城市","consignee_mobile":"手机号,选填。为方便派送最好填写","order_returnsign":"退回标志,默认N表示不退回,Y标表示退回。中邮可以忽略该属性","consignee_name":"收件人,必填","trade_type":"ZYXT","consignee_postcode":"邮编,有邮编的国家必填","consignee_state":"州/省","consignee_telephone":"收件电话,必填","country":"收件国家二字代码,必填","customer_id":"客户ID,必填","customer_userid":"登录人ID,必填","orderInvoiceParam":[{"invoice_amount":"申报总价值,必填","invoice_pcs":"件数,必填","invoice_title":"英文品名,必填","invoice_weight":"单件重","item_id":"","item_transactionid":"","sku":"中文品名","sku_code":"配货信息","hs_code":"海关编码"}],"order_customerinvoicecode":"原单号,必填","product_id":"运输方式ID,必填","weight":"总重,选填,如果sku上有单重可不填该项","product_imagepath":"图片地址,多图片地址用分号隔开","shipper_name":"发件人姓名,选填","shipper_companyname":"发件人公司名,选填","shipper_address1":"发件人地址1,选填",
...
{
"data": [
{
"ack": "true", //下单成功或失败的标准,成功返回true,失败返回false
"message": "", //下单失败时返回原因,urldecode解码
"order_id": "35864", //订单id,请持久化保存,用于打印面单
"order_transfercode": "", //特殊情况下使用,默认不用理会
"reference_number": "SF701708290061B", //客户的原始单号,参考号
"tracking_number": "RF000000204DEL" //转单号/跟踪号,,"product_tracknoapitype":"值为3时需要调用获取跟踪号接口来更新单号"
}
],
"message": "", 返回json不合法或未传param参数
"resultCode": "true" //仅当json不合法以及未传递param参数时该状态返回false,其他情况下返回true
}
Trade_type可选值,请对号入座
SUMAI 速脉ERP
...
SUMOOL 速猫ERP
GLBPAY 上海九赢
DXM 店小秘
TEMU拼多多推单
ZYXT 客户自用系统/其他不在列表中的均使用该代码
4.标记发货
URL1/postOrderApi.htm?customer_id=**&order_customerinvoicecode=**
5.客户自选标签模版 打印标签
URL2/order/FastRpt/PDF_NEW.aspx
...
参考URL: URL2/order/FastRpt/PDF_NEW.aspx?Format=A4_EMS_BGD.frx&PrintType=1&order_id=308897
示例:
参数format | 参数PrintType | 标签格式 |
A4_EMS_BGD.frx | 1 | A4中邮+报关单8*9 |
请注意,打印的接口地址和其他地址不同
通过接口获取所有系统支持的打印类型
URL1/selectLabelType.htm
小语种打印,支持希伯来语,泰语等 URL2/order/FastRpt/PDF_NEW.aspx?Format=A4_EMS_BGD.frx&PrintType=1&order_id=308897&Print=1
如需支持小语种,请货代设置标签的时候注意选择字体,最好是微软雅黑
更新预报重量
URL1/updateOrderWeightByApi.htm?customerId=客户id&orderNo=订单号&weight=重量
通过接口获取所有系统支持的打印类型
URL1/selectLabelType.htm
6. 一键打印10*10标签(需要货代在系统设置各渠道的10*10标签)
...
URL2/order/FastRpt/PDF_NEW.aspx?PrintType=A4&order_id=订单ID,多个用逗号分割。
一键打印加打配货单标签(需要货代在系统设置配货单标签)
URL2/order/FastRpt/PDF_NEW.aspx?PrintType=lab10_10&PrintGoods=1&order_id=订单ID,多个用逗号分割。
更新预报重量
URL1/updateOrderWeightByApi.htm?customerId=客户id&orderNo=订单号&weight=重量
7.轨迹查询
URL1/selectTrack.htm?documentCode=**********
(跟踪号可传多个,用逗号隔开)用逗号隔开)建议批量请求,请求限制一秒最多请求五次
返回
[
{
"ack": "true",
"data": [
{
"consigneeCountry": "收件国家代码 country code",
"productKindName": "物流方式 express type ",
"referenceNumber": "参考号 ref number",
"trackContent": "末条轨迹内容 the last track content",
"trackDate": "末条轨迹时间 the last track date",
"trackLocation": "上海 the last track location",
"trackSignperson": "签收人 sign person,if no sign it's empty",
"trackingNumber": "跟踪号 tracking number",
"trackDetails": [
{
"track_content": "轨迹内容track conent",
"track_date": "轨迹时间 track date",
"track_location": "上海 track location",
"track_signdate": "签收时间 sign date,if no sign it's empty",
"track_signperson": "签收人 sign person,if no sign it's empty"
}
]
}
]
}
]
获取跟踪号
批量获取跟踪号
URL1/getOrderTrackingNumberBatch.htm?documentCode=订单号,多个用逗号分割
URL1/getOrderTrackingNumberBatch.htm?order_id=订单id,多个用逗号分割
URL1/modifyInsurance.htm?customerId=客户ID&documentCode=订单号&insuranceValue=保险金额
订单号可传多个,用逗号隔开
返回
{"msg":"修改保险金额成功!","status":true}
{"msg":"失败信息!","status":false}
点击下载java对接demo 点击下载 C# Demo 点击下载PHP示例 下载 Python Demo DHL发件人税号类型.txt