1、网站的业务流程可以查看官网的新手帮助
http://www.sfcservice.com/issue
或者联系客户经理和客服。
2、添加订单前,先通过getShipTypes和getRates接口方法了解运输方式相关信息,
结合客户经理的推荐,选择符合你的最佳运输方式。
http://www.sfcservice.com/issue
或者联系客户经理和客服。
2、添加订单前,先通过getShipTypes和getRates接口方法了解运输方式相关信息,
结合客户经理的推荐,选择符合你的最佳运输方式。
| 分拨中心ID (Division id) |
中文名称 (Chinese name) |
英文名称 (English name) |
|---|---|---|
| 1 | 深圳分公司 | Shenzhen |
| 2 | 广州分公司 | Guangzhou |
| 14 | 上海分公司 | Shanghai |
| 17 | 海外销售组 | Huizhou Warehouse |
| 31 | 义乌分公司 | Yiwu |
| 34 | 杭州分公司 | Hangzhou |
| 37 | 义乌仓储 | Yiwu Warehouse |
| 41 | Y | Y |
该参数是每个接口的必填参数,详见接口请求示例,全部接口格式一样(如:
获取运输方式列表)
| HeaderRequest | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| appKey | string | required | SFC 提供给用户的密 钥key |
| token | string | required | SFC 提供给用户的密 钥token |
| userId | string | required | 用户 code |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| divisionId | string | option | 分拨中心ID,查看分拨中心列表,不填则默认深圳分公司 |
PHP请求示例
//php示例--获取运输方式列表
header('content-type:text/html;charset=utf-8');
try{
// 开始请求接口
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'divisionId' => '1',//分拨中心ID,不填则默认等于1 (即:深圳分拨中心的ID)
);
//请求接口方法getShipTypes
$result = $client->getShipTypes($parameter);
// 打印接口返回结果
print_r($result);
echo '
';
echo $result->shiptypes['0']->cn_name;//获取第一个运输方式的中文名称
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| classtypes | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| method_code | string | 运输方式code |
| en_name | string | 运输方式英文名称 |
| Cn_name | string | 运输方式中文名称 |
| Deliverytime | string | 递送时间,单位(工作日)。如‘5-14’工作日 |
| iftracking | string | 是否可追踪 |
| is_weight | string | 是否按材积重量计费 |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| parameter | array | required | json数据 |
| apiName | string | required | getShiptypesByCountry |
| parameter | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| getShiptypesByCountryRequestInfo | string | required | 要搜索的订单信息,查看getShiptypesByCountryRequestInfo |
| getShiptypesByCountryRequestInfo | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| country | string | required | 收件国家 |
| weight | string | option | 物品重量 KG |
| length | string | option | 物品长度 CM |
| width | string | option | 物品宽度 CM |
| height | string | option | 物品高度 CM |
| divisionId | string | option | 分拨中心ID,查看分拨中心列表 |
请求示例
https://www.sfcservice.com/ishipsvc/http-api?apiName=getShiptypesByCountry¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"getShiptypesByCountryRequestInfo":{"country":"US","weight":"0.5","length":"10","width":"10","height":"10","divisionId":"1"}}
返回参数:
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| shiptypecnname | string | 运输方式中文名 |
| shiptypecode | string | 运输方式代码 |
| deliverytime | string | 派送时效(工作日) |
| isbattery | string | 是否带电 |
| iftracking | string | 是否可跟踪 |
| isweight | string | 是否按材积重量计费 |
| maximumweight | string | 重量上限 KG |
| maximumlength | string | 长度上限CM |
| maximumwidth | string | 宽度上限CM |
| maximumheight | string | 高度上限CM |
| upperlimitformula | string | 上限公式 CM |
| weightlimit | string | 重量下限 KG |
| lengthlimit | string | 长度下限CM |
| widthlimit | string | 宽度下限CM |
| heightlowerlimit | string | 高度下限CM |
返回示例:
[{"shiptypecnname": "香港邮政小包(挂号)","shiptypecode": "HKBRAM","deliverytime": "7.0-20.0","isbattery": "NO","iftracking": "YES","isweight": "NO","maximumweight": "150.0","maximumlength": "150.00","maximumwidth": "150.00","maximumheight": "150.00","upperlimitformula": "L*(W+H)*2>=295","weightlimit": "0.0","lengthlimit": "0.00","widthlimit": "0.00","heightlowerlimit": "0.00" }]
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| ratesRequestInfo | array | required | 请求信息 |
| ratesRequestInfo | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| weight | string | required | 物品重量 KG |
| state | string | required | 收件州 |
| country | string | required | 收件国家 |
| length | string | required | 物品长度 CM |
| width | string | required | 物品宽度 CM |
| height | string | required | 物品高度 CM |
| scanType | string | required | 包装类型 1默认 纸箱 2邮袋 |
| priceType | string | required | 价格类型 1默认 用户折扣价格 2公布价 |
| divisionId | string | required | 分拨中心ID,查看分拨中心列表 |
| zipCode | string | required | 邮政编码 |
| city | string | option | 城市 |
PHP请求示例
//php示例
header('content-type:text/html;charset=utf-8');
try{
// 开始请求接口
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'ratesRequestInfo' => Array (
'weight' => '0.5',
'state' => 'US',
'country' => 'US',
'length' => '10',
'width' => '10',
'height' => '10',
'scanType' => 1, //包装类型 1默认 纸箱 2邮袋
'priceType' => '',//价格类型 1默认 用户折扣价格 2公布价
'divisionId' => '1',
'zipCode' => '12345',
'city' => 'US' )
);
//请求接口方法名
$result = $client->getRates($parameter);
);
// 打印接口返回结果
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| rates | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| totalfee | string | 总费用 |
| costfee | string | 基本运费 |
| dealfee | string | 处理费 |
| addons | string | 燃油附加费 |
| deliverytime | string | 妥投时效 |
| isweight | string | 是否按材积重量计费 |
| iftracking | string | 是否可订单跟踪 |
| classtype | string | 运输方式分类,平邮,挂号,快递 |
| classtypecode | string | 运输方式分类的code CPS平邮 CRP挂号 CRE快递 AFE空运 |
| shiptypecode | string | 运输方式 |
| shiptypename | string | 运输方式名称 |
| shiptypecnname | string | 运输方式中文名称 |
| isbattery | string | 是否可以带电 |
| note | string | 备注 |
| is_VAT | string | 是否收取增值税(VAT) |
| is_Duty | string | 是否收取关税(Duty) |
| is_IOSS | string | 是否收取IOSS费 |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| parameter | array | required | json数据 |
| apiName | string | required | getRatesByShip |
| parameter | |||
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| ratesRequestInfo | array | required | 请求信息 |
| ratesRequestInfo | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| shiptypescode | array | required | 运输方式 |
| scanType | string | option | 包装类型 1(默认) 纸箱 2邮袋 |
| country | string | required | 收件国家 |
| weight | string | required | 物品重量 KG |
| length | string | required | 物品长度 CM |
| width | string | required | 物品宽度 CM |
| height | string | required | 物品高度 CM |
| priceType | string | option | 价格类型 1(默认) 用户折扣价格 2公布价 |
| divisionId | string | option | 分拨中心ID,查看分拨中心列表 (默认 客户分拨中心) |
| worth | string | required | 订单申报价值 |
| zip_code | string | option | 邮政编码 |
| state | string | option | 收件州 |
| city | string | option | 城市 |
PHP请求示例
$data = array(
'apiName' => 'getRatesByShip', // 这里替换为你的 apiName
'parameter' => json_encode(array(
'HeaderRequest'=>array(
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
'ratesRequestInfo'=>array(
"shiptypescode"=> array
"ACS"
),
"scanType" => "1",
"country" => "FR",
"weight" => "1",
"length" => "1",
"width" => "1",
"height" => "1",
"priceType" => "",
"divisionId" => "1",
"worth" => "44",
"zip_code" => "12345",
"state" => "US",
"city" => "US",
),
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://www.sfcservice.com/ishipsvc/http-api',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
返回参数:
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| code | int | 接口状态:200成功,500失败 |
| data | array | 渠道价格 |
| data | ||
|---|---|---|
| code | int | 接口状态:200成功,500失败 |
| totalfee | float | 总费用(含附加费、VAT) |
| costfee | float | 基本运费(包含按件处理、燃油费) |
| shiptypecode | string | 运输方式代码 |
| weight | string | 计费重量 |
| surcharge | string | 其他附加费 总额 |
| surchargenote | array | 其他附加费说明 |
| currency | string | 币种 |
| is_VAT | string | 是否收取增值税(VAT) |
| is_Duty | string | 是否收取关税(Duty) |
| is_IOSS | string | 是否收取IOSS费 |
| surchargenote | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| name | string | 费用名 |
| en_name | string | 费用名_en |
| money | string | 费用 |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| addOrderRequestInfo | array | required | 订单信息 |
注意:以下很多字段,比如:投保价值、收件城市、电话 ...... ;
有的运输方式要求必填,有的运输方式非必填,有的运输方式不能填。具体看当前业务
| addOrderRequestInfo | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| customerOrderNo | string | option | 客户参考号 |
| opDivision | int | required | 操作分拨中心,查看分拨中心列表 |
| isFba | int | option | 是否是FBA 0/1 |
| warehouseName | string | option | 仓储分拨中心 'FBA','',(MXFBA墨西哥fba用于传'其它私人地址') |
| orderStatus | string | required | 订单状态:confirmed(已确认)、preprocess(预处理) |
| recipientName | string | required | 收件人 |
| recipientCountry | string | required | 收件国家 |
| shippingMethod | string | required | 运输方式 |
| subShipType | string | option | 运输子方式 |
| trackingNumber1 | string | option | 跟踪号 |
| recipientState | string | option | 收件州省 |
| recipientCity | string | option | 收件城市 |
| recipientAddress | string | required | 收件地址 |
| doorplate | string | option | 门牌号 门牌号信息请和地址信息一起推送到“recipientAddress”字段;【门牌号字段可用渠道:EUEXPIE,EUEXPIEB,EUEXP4,EUEXP6】 |
| smallLangAddress | string | option | 小语种地址 |
| recipientZipCode | string | option | 收件邮编 |
| recipientPhone | string | option | 收件电话 |
| recipientEmail | string | option | 收件邮箱 |
| recipientOrganization | string | option | 收件公司 |
| exportDeclaration | int | option | 是否出口一般贸易报关 0/1 |
| is_Customs | int | option | 是否单独报关 0/1 |
| customeCode | string | option | 报关单号 |
| isSignature | int | option | 是否电子签名 0/1 |
| isReturn | int | option | 是否退件 0/1 |
| withBattery | int | option | 是否带电池 0/1 |
| type_of_battery | string | option | 电池类型'PI966', 'PI967', 'PI969', 'PI970', '无电池', '' |
| fbaNumber | string | option | 仓储号/FBA号 |
| fbaWarehouseCode | string | option | 仓储代码 |
| taxType | string | option | 税号类型,1(自身税号),2(用SFC税号清关) |
| taxesNumber | string | option | 税号 |
| mark | string | option | 税号标注 '',A-Z |
| salesLink | string | option | 销售链接 |
| erp_source | string | option | ERP来源 |
| shippingWorth | string | option | 销售价值 |
| dutyforward | int | option | 关税预付 0/1 |
| codAmount | string | option | 代收货款金额 |
| goodsDeclareWorth | string | required | 总申报价值 float |
| totalExportDeclare | string | option | 合计出口申报价值 float(15/17号文件新增字段) |
| worthCurrency | string | option | 总申报价值币种(币种三字简码,默认USD) |
| evaluate | string | option | 总投保价值 float(该字段已作废,投保价值数据不予接收!) |
| goodsWeight | string | option | 重量 float KG |
| pieceNumber | int | option | 件数/箱数 int |
| goodsQuantity | int | option | 订单总数量 int |
| goodsLength | string | option | 订单长度 CM |
| goodsWidth | string | option | 订单宽度 CM |
| goodsHeight | string | option | 订单高度 CM |
| goodsDescription | string | required | 订单描述 |
| shipperAddressType | int | required | 取寄件人默认地址,固定填1 |
| isRemoteConfirm | int | option | 接口是否返回偏远收费提示 0/1 |
| isGetArea | int | option | 接口是否返回分区区号(如:RM2R-3的3) 0/1 |
| notifyUrl | string | option | SFC对应的的url |
| ebayIdentify | string | option | SFC对应的EBAY帐号ID |
| IDCR | string | option | 身份证号/企业登记号/istore排序号 |
| oriGST | string | option | 印度GST/gst编号 |
| oriCompany | string | option | 印度接口公司 |
| salesPlatform | string | option | 销售平台 |
| senderTaxId | string | option | 发件人税号 |
| sellerPlatformId | string | option | 发件人平台ID |
| originCountry | string | option | 销售平台原产国 |
| salesUnit | string | option | 生产销售单位(15/17号文件新增字段) |
| creditCode | string | option | 统一社会信用代码(15/17号文件新增字段) |
| vendor_id | string | option | Vendor(供应商)ID |
| gst_exemption_code | string | option | GSTexemption Code |
| abn | string | option | ABN(进口商) |
| areaCode | string | option | 分区打印shipping_desc |
| postscript | string | option | 用于区分义乌两个仓YW2 |
| common | string | option | 公用字段(KREXP/KREXPSEA韩国专线用于传个人识别编号或出生年月日;JPEXP日本专线用于传店铺名;KREXPHX用于个人通关编码;TREXPTH用于身份证ID编码;) |
| iossNo | string | option | IOSS号 |
| platformOrderNo | string | option | 平台订单号 |
| invoice | string | option | 发票号 |
| goodsDetails | array | required | 物品详情,二维数组,每个子数组对应一个物品,查看下面的goodsDetails |
| goodsDetails | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| detailDescription | string | required | 物品描述/英文描述 |
| detailDescriptionCN | string | option | 中文描述 |
| detailQuantity | string | required | 数量 int |
| detailWorth | string | required | 单个物品申报价 |
| detailCustomLabel | string | option | 物品参考号/SKU |
| hsCode | string | option | 海关编码 |
| detailWeight | string | option | 重量 KG |
| origin | string | option | 原产地,默认‘CN’ |
| boxId | int | option | 包裹号 int |
| disposition | string | option | 销售类型 |
| enMaterial | string | option | 英文物品材质 |
| cnMaterial | string | option | 中文物品材质 |
| purpose | string | option | 用途 |
| exportDeclarePrice | string | option | 出口申报单价(15/17号文件新增字段) |
PHP请求示例
//php示例
header('content-type:text/html;charset=utf-8');
try{
// 开始请求接口
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'addOrderRequestInfo' => Array (
'customerOrderNo' => 'ookk' . date('mdhis'), // 客户参考号
'opDivision' => 1, // 操作分拨中心 int
'orderStatus' => 'preprocess', // 状态:已确认confirmed/预处理preprocess/已交寄3
'recipientName' => 'tom', // 收件人
'recipientCountry' => 'GB', // 国家
'shippingMethod' => 'TESTEXP', // 主方式
'trackingNumber1' => '', // 跟踪号
'recipientState' => 'zhou', // 州省
'recipientCity' => 'city', // 城市
'recipientAddress' => 'xx addr', // 地址
'doorplate' => '', // 门牌号
'smallLangAddress' => 'small addr', // 小语种地址
'recipientZipCode' => 'W1S 3PR', // 邮编
'recipientPhone' => '1234567890', // 电话
'recipientEmail' => 'qq@qq.com', // 邮箱
'recipientOrganization' => 'company ', // 公司
'exportDeclaration' => 1, // 是否出口一般贸易报关 0/1
'is_Customs' => 1, // 是否单独报关 0/1
'customeCode' => '123ABC', // 报关单号
'isSignature' => 1, // 是否电子签名 0/1
'isReturn' => 1, // 是否退件 0/1
'deliveryType' => 2, // 末端派送类型,默认0 ,1PCP自提,2TRACK卡派
'withBattery' => 1, // 是否带电池 0/1
'type_of_battery' => 'PI966', // 电池类型'PI966', 'PI967', 'PI969', 'PI970', '无电池', ''
'fbaNumber' => 'fba no', // 仓储号/FBA号
'fbaWarehouseCode' => 'fba code', // 仓储代码
'taxType' => '2', // 税号类型,1(自身税号),2(用SFC税号清关)
'taxesNumber' => 'sui hao', // 税号
'mark' => 'A', // 税号标注 '',A-Z
'salesLink' => 'www.html_sfc.com', // 销售链接
'erp_source' => '通途ERP', // ERP来源
'shippingWorth' => '88', // 销售价值
'checkinsurance' => 1, // 是否购买查验保险 0/1
'dutyforward' => 1, // 关税预付 0/1
'codAmount' => '33', // 代收货款金额
'goodsDeclareWorth' => 8, // 总申报价值 float
'worthCurrency'=>'USD', // 申报价值币种,币种三字简码
'evaluate' => 8, // 总投保价值 float(该字段已作废,投保价值数据不予接收!)
'goodsWeight' => 1, // 重量 float
'pieceNumber' => 1, // 件数/箱数 int
'goodsQuantity' => 1, // 订单总数量 int
'goodsLength' => 2, // 长
'goodsWidth' => 2, // 宽
'goodsHeight' => 2, // 高
'goodsDescription' => 'the order desc', // 订单描述
'matchProduct' => 0, // 物品详情是否匹配产品 0/1
'shipperAddressType' => 0, // 是否取寄件人默认地址 0/1
'shipperState' => 'GD', // 寄件人省份
'shipperCity' => 'shenzhen', // 寄件人城市
'shipperCompanyName' => 'send company', // 寄件人公司
'shipperName' => 'tom', // 寄件人
'shipperEmail' => 'ww@ww.com', // 寄件人mail
'shipperAddress' => 'xxx addr', // 寄件人addr
'shipperPhone' => '1234567890', // 寄件人phone
'shipperZipCode' => '12345', // 寄件人邮编
'isRemoteConfirm' => 1, // 接口是否返回偏远收费提示 0/1
'isGetArea' => 1, // 接口是否返回分区区号(如:RM2R-3的3) 0/1
'IDCR' => '', // 身份证号/企业登记号/istore排序号
'salesPlatform' => '', // 销售平台
'senderTaxId' => '', // 发件人税号
'sellerPlatformId' => '', // 发件人平台ID
'originCountry' => '', // 销售平台原产国
'salesUnit' => '', // 生产销售单位
'creditCode' => '', // 统一社会信用代码
'vendor_id' => '', // Vendor(供应商)ID
'gst_exemption_code' => '', // GSTexemption Code
'abn' => '', // ABN(进口商)
'shippingWorth1' => '',
'totalExportDeclare' => '', //合计出口申报价值
'goodsDetails' => array (
'0' => Array (
'detailDescription' => 'en desc', // 物品描述/英文描述
'detailDescriptionCN' => '中文描述', // 中文描述
'detailQuantity' => 2, // 数量 int
'detailWorth' => 4, // 单个物品申报价
'detailCustomLabel' => 'w1', // 物品参考号/SKU
'hsCode' => '01041010', // 海关编码
'detailWeight' => 1, // 重量
'origin' => 'CN', // 原产地
'boxId' => 1, // 包裹号 int
'disposition' => '', // 销售类型
'enMaterial' => 'en eaterial', // 英文物品材质
'cnMaterial' => '中文物品材质', // 中文物品材质
'purpose' => 'en purpose', // 用途
'shelfLife' => ''
'exportDeclarePrice' => '' //出口申报单价
) ) // 保质期
)
);
//请求接口方法名
$result = $client->addOrder($parameter);
// 打印接口返回结果
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| orderCode | string | SFC的订单号 |
| customerOrderNo | string | 客户参考号 |
| operatingTime | string | 操作时间 |
| orderActionStatus | string | 添加订单结果:Y添加成功、N添加失败(MXEXPFS,MXEXP,MXEXPIP,MXEXPIPB,MXEXPB,MXEXPIE,MXEXPHK客户参考号存在时返回N,同时有返回SFC单号和跟踪号则代表添加成功) |
| note | string | 添加失败的原因 |
| alert | string | 温馨订单提示语 |
| area | string | 订单分区的区名 |
| trackingNumber | string | SFC订单的跟踪号 |
| trackingNumberUsps | string | SFC订单的转单号(运输方式为墨西哥MXEXPB时,优先作为跟踪号) |
| ae_code | string | SFC的AE订单号 |
请求示例:
https://www.sfcservice.com/ishipsvc/http-api?apiName=updateOrderShipType¶meter={
"HeaderRequest":{
"userId":"用户 code",
"appKey":"SFC 提供给用户的密钥 key",
"token":"SFC 提供给用户的密钥 token"
},
"orderCode":"AE订单号",
"shipType":"运输方式"
}
返回示例:
{
"customerOrderNo": "CTO20211230014632",
"status": "1",
"msg": "Update sucess.",
"orderCode": "SFCAA0029136387YQ",
"trackingNumber": "",
"trackingNumberUsps": "",
"ae_code": "SFCAA0029136387YQ",
"time": "2022-12-27 13:23:29"
}
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| updateOrderVolumeWeight | array | required | 要修改的订单信息,看下面的updateOrderVolumeWeight |
| updateOrderVolumeWeight | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| orderCode | string | required | 要修改的订单号 |
| status | string | required | 状态(固定为3) |
| volumeWeightList | array | required | 要修改订单的重量和长宽高,看下面的volumeWeightList |
| volumeWeightList | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| weight | string | option | 修改物品重量 KG |
| length | string | option | 修改物品长度 CM |
| width | string | option | 修改物品宽度 CM |
| height | string | option | 修改物品高度 CM |
PHP请求示例
'11','length'=>'22','width'=>'33','height'=>'44');
try{
$parameter = array(
'HeaderRequest' => array(
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
'updateOrderVolumeWeight' => Array
(
'orderCode'=>'QA0200701190001',
'status'=>3,
'volumeWeightList'=>$obj
)
);
$result=$client->updateOrderVolumeWeight($parameter);
//遍历对象集
echo "";
print_r($result);
}catch(SoapFault $e){
print"Sorry an error was caught executing yourrequest:{$e->getMessage()}";
}
echo "
";
die("over");
?>
返回参数:
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| status | int | 结果状态:1成功,0失败 |
| msg | string | 成功提示语或失败原因 |
| orderCode | string | SFC的订单号 |
| time | string | 操作时间 |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| delOrderRequestInfo | string | required | 要删除的订单信息,看下面的delOrderRequestInfo |
| delOrderRequestInfo | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| orderCode | string | required | 单个订单号 |
PHP请求示例
//php示例
header('content-type:text/html;charset=utf-8');
try{
/**
*开始请求接口,
*注意!
*这里的url是http://www.sfcservice.com/ishipsvc/web-service?wsdl
*/
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'delOrderRequestInfo' => Array (
'orderCode' =>'QA0200908160..' //订单号
)
);
//请求接口方法名
$result = $client->deleteOrder($parameter);
// 打印接口返回结果
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| ask | string | 接口请求结果:Success成功、Error失败 |
| message | string | 成功/失败描述 |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| orderCode | string | required | 要修改的订单号 |
| updateOrderInfo | array | required | 要修改的订单信息,看下面的updateOrderInfo |
| updateOrderInfo | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| orderStatus | string | required | 修改状态:preprocess(预处理)、confirmed(已确认)、sumbmitted(已交寄)、intercept(已截件) |
| authenticate | string | required | 验证字段 : md5(‘订单号’+‘用户code’) |
| weight | string | option | 修改物品重量 KG |
PHP请求示例
//php示例
header('content-type:text/html;charset=utf-8');
try{
// 开始请求接口
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$order_code = 'SFC1W1234567890'; // 订单号
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'orderCode' => $order_code,
'updateOrderInfo' => Array (
//'weight' => '',
'orderStatus' => 'confirmed',
'authenticate' => md5($order_code . '用户 code') ) // 单号+客户code
);
//请求接口方法名
$result = $client->updateOrderStatus($parameter);
// 打印接口返回结果
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| ask | string | 接口请求结果:Success成功、Error失败 |
| message | string | 成功/失败描述 |
| time | string | 操作时间 |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| orderCode | string | required | 订单号(或者跟踪号或者客户参考号) |
PHP请求示例
//php示例
header('content-type:text/html;charset=utf-8');
try{
// 开始请求接口
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'orderCode' => 'QA0200003090003',//订单号(或者跟踪号或者客户参考号)
);
//请求接口方法名
$result = $client->getFeeByOrderCode($parameter);
// 打印接口返回结果
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| ask | string | 接口请求成功返回‘Success’,请求失败返回‘Error’ |
| sysTime | string | 接口请求时间 |
| orderCode | string | 请求订单号 |
| customerOrderNo | string | 客户参考号 |
| msg | string | 请求失败原因 |
| baseFee | string | 基本费 |
| regFee | string | 挂号费 |
| dealFee | string | 处理费 |
| insurance | string | 保险费 |
| totalFee | string | 总运费费用=baseFee+regFee+dealFee+insurance (不包含其他费用) |
| currencyCode | string | 币种 |
| chargebackTime | string | 扣费时间 |
| chargebackWorkDay | string | 扣费日期(SFC工作日) |
| shipTypeCode | string | 运输方式 |
| subShipType | string | 运输子方式 |
| waybillCode | string | 货运单号 |
| discount | string | 折扣 |
| originBaseFee | string | 按件处理费 |
| originAddons | string | 燃油附加费 |
| stDealFee | string | 运输方式处理费 |
| stRegFee | string | 运输方式挂号费 |
| feeWeight | string | 计费重 |
| realWeight | string | 订单实重 |
| userUploadWeight | string | 客户预报重量 |
| otherFee | array | 其它费和退款赔付费用,如果没费用则不返回,如果只有一个则是一维数组,如果大于一个则是二维数组,看下面的otherFee |
| otherFee | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| title | string | 英文费用名称 |
| cnTitle | string | 中文费用名称 |
| fee | string | 费用 |
| reason | string | 退款原因 |
可根据SFC订单号打印物流标签
URL如下:
http://www.sfcservice.com/order/print/index/?orderCodeList=SFC单号&printType=打印类型&isPrintDeclare=1&declare=0&ismerge=1&print_type=标签类型&printSize=标签尺寸
参数说明:
打印类型 0:普通A4 1:热敏
标签类型 pdf或者html
标签尺寸 1:10*10 3:10*15
标签类型 pdf或者html
标签尺寸 1:10*10 3:10*15
例如:
http://www.sfcservice.com/order/print/index/?orderCodeList=SFC2WA0200909100108&printType=1&isPrintDeclare=1&declare=0&ismerge=1&print_type=pdf&printSize=3
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| searchOrderRequestInfo | array | required | 要搜索的订单信息,查看searchOrderRequestInfo |
| searchOrderRequestInfo | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| orderCode | string | required | 订单号 |
PHP请求示例
//php示例
header('content-type:text/html;charset=utf-8');
try{
// 开始请求接口
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'searchOrderRequestInfo' => array('orderCode'=>'WA0200908070006')
);
//请求接口方法名
$result = $client->searchOrder($parameter);
// 打印接口返回结果
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| orderInfo | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| orderCode | string | 订单号 |
| customerOrderNo | string | 客户参考号 |
| shipperName | string | 寄件人 |
| shipperEmail | string | 寄件人邮箱 |
| shipperAddress | string | 寄件人地址 |
| shipperPhone | string | 寄件人电话 |
| shipperZipCode | string | 寄件人邮编 |
| shipperCompanyName | string | 寄件人公司名 |
| shippingMethod | string | 运输方式 |
| recipientCountry | string | 收件国家 |
| recipientName | string | 收件人 |
| recipientState | string | 收件州省 |
| recipientCity | string | 收件城市 |
| recipientAddress | string | 收件地址 |
| recipientZipCode | string | 收件邮编 |
| recipientPhone | string | 收件电话 |
| recipientEmail | string | 收件邮箱 |
| goodsDescription | string | 物品描述 |
| goodsQuantity | string | 物品数量 |
| goodsDeclareWorth | string | 物品申报价值 |
| goodsWeight | string | 物品重量 KG |
| goodsLength | string | 物品长度 CM |
| goodsWidth | string | 物品宽度 CM |
| goodsHeight | string | 物品高度 CM |
| orderStatus | string | 订单状态英文名称 |
| orderStatusCn | string | 订单状态中文名称 |
| addTime | string | 订单添加时间 |
| deliveryTime | string | 订单付款时间 |
| trackNumber | string | 订单跟踪号 |
| trackNumberUsps | string | 订单转单号 |
| subShipType | string | 订单运输子方式 |
| ae_code | string | AE订单号 |
| goodsDetails | array | 所有物品详情,每个子数组为一个物品,看下面的goodsDetails |
| goodsDetails | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| detailDescription | string | 物品描述 |
| detailQuantity | string | 物品数量 |
| detailCustomLabel | string | 物品参考号 |
| detailWorth | string | 物品价格 |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| searchTimeOrderRequestInfo | array | required | 要搜索的订单信息,查看searchTimeOrderRequestInfo |
| searchTimeOrderRequestInfo | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| startTime | string | required | 开始日期Y-m-d |
| endTime | string | required | 结束时间Y-m-d |
| packages | string | required | 第几页 |
| size | string | option | 每页显示多小订单 |
PHP请求示例
//php示例
header('content-type:text/html;charset=utf-8');
try{
// 开始请求接口
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'searchTimeOrderRequestInfo' => Array
(
'startTime'=>'2019-08-13',//开始日期Y-m-d
'endTime'=>'2019-08-14',//结束时间Y-m-d
'packages'=>'1', //选填,第几页
'size'=>'5', //选填,每页显示多小订单
)
);
//请求接口方法名
$result = $client->searchTimeOrder($parameter);
// 打印接口返回结果
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| orderInfo | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| orderCode | string | 订单号 |
| customerOrderNo | string | 客户参考号 |
| shipperName | string | 寄件人 |
| shipperEmail | string | 寄件人邮箱 |
| shipperAddress | string | 寄件人地址 |
| shipperPhone | string | 寄件人电话 |
| shipperZipCode | string | 寄件人邮编 |
| shipperCompanyName | string | 寄件人公司名 |
| shippingMethod | string | 运输方式 |
| recipientCountry | string | 收件国家 |
| recipientName | string | 收件人 |
| recipientState | string | 收件州省 |
| recipientCity | string | 收件城市 |
| recipientAddress | string | 收件地址 |
| recipientZipCode | string | 收件邮编 |
| recipientPhone | string | 收件电话 |
| recipientEmail | string | 收件邮箱 |
| goodsDescription | string | 物品描述 |
| goodsQuantity | string | 物品数量 |
| goodsDeclareWorth | string | 物品申报价值 |
| goodsWeight | string | 物品重量 KG |
| goodsLength | string | 物品长度 CM |
| goodsWidth | string | 物品宽度 CM |
| goodsHeight | string | 物品高度 CM |
| orderStatus | string | 订单状态英文名称 |
| orderStatusCn | string | 订单状态中文名称 |
| addTime | string | 订单添加时间 |
| deliveryTime | string | 订单付款时间 |
| trackNumber | string | 订单跟踪号 |
| trackNumberUsps | string | 订单转单号 |
| subShipType | string | 订单运输子方式 |
| ae_code | string | 订单号 |
| goodsDetails | array | 所有物品详情,每个子数组为一个物品,看下面的goodsDetails |
| goodsDetails | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| detailDescription | string | 物品描述 |
| detailQuantity | string | 物品数量 |
| detailCustomLabel | string | 物品参考号 |
| detailWorth | string | 物品价格 |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| startime | string | required | 开始时间Y-m-d H:i:s |
| endtime | string | required | 结束时间Y-m-d H:i:s |
| page | string | option | 第几页,每页默认500条记录 |
PHP请求示例
//php示例
header('content-type:text/html;charset=utf-8');
try{
// 开始请求接口
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'startime'=>'2019-08-01 00:00:00',//开始时间Y-m-d H:i:s
'endtime'=>'2019-08-07 00:00:00',//结束时间Y-m-d H:i:s
'page'=>'1', //选填
);
//请求接口方法名
$result = $client->getFeeByTime($parameter);
// 打印接口返回结果
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| ask | string | 修改订单结果:Success成功、Error失败 |
| sysTime | string | 操作时间 |
| msg | string | 成功提示语或失败原因 |
| page | string | 第几页 |
| count | string | 总记录 |
| data | array | 订单费用明细,查看下面的data |
| data | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| uniqueCode | string | |
| orderCode | string | 订单号 |
| baseFee | string | 基本费 |
| regFee | string | |
| dealFee | string | 处理费 |
| insurance | string | |
| totalFee | string | 总运费费用=baseFee+regFee+dealFee+insurance (不包含其他费用) |
| countWeight | string | 计费重 |
| realWeight | string | 订单实重 |
| userUploadWeight | string | 客户预报重量 |
| currencyCode | string | 币种 |
| chargebackTime | string | |
| chargebackWorkDay | string | |
| subShipType | string | 运输子方式 |
| waybillCode | string | 货运单号 |
| discount | string | |
| originBaseFee | string | |
| originAddons | string | |
| stDealFee | string | |
| stRegFee | string | |
| waybillStatus | string | |
节点代码对照表(点击下载)
URL:http://tracking.sfcservice.com/tracking/track-api/get-track
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| data | json | required | 订单跟踪号组成的数组,再转成json(参见请求demo,每次请求上限40单) |
| client | string | option | 客户平台 |
PHP请求示例
$curl = curl_init();
$track_num_arr = array('UWQ817779901000930307', 'LO971629672CN');
$data = json_encode($track_num_arr);
$client = 'sfc';
curl_setopt_array($curl, array(
CURLOPT_URL => "http://tracking.sfcservice.com/tracking/track-api/get-track?data=$data&client=$client",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
返回参数:返回值为json格式
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| code | int | 0为请求成功,其他为失败 |
| data | array | 跟踪信息 |
| data | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| number | string | 请求单号 |
| customer_order_code | string | 客户单号 |
| ship_type | string | 渠道代码 |
| destination | string | 目的地国家 |
| status | string | 订单状态(1 运输途中;2 运输过久;3 完成;4 退件返回完成;5 到达待取;6 等待揽收;7 SFC处理中;) |
| track | array | 每个单号的具体信息 |
| track | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| change_date | string | 跟踪时间(备注:当地时间) |
| ti_note | string | 跟踪信息 |
| ti_address | string | 地点 |
| code | string | 节点代码(部分渠道返回) |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| data | array | required | 查看下面的data |
| data | |||
|---|---|---|---|
| 字段 | 字段类型 | 是否必填 | 字段描述 |
| company_name | string | required | 快递公司 |
| package_id | string | required | 快递单号 |
| sfc_number | int | required | SFC包裹数量 |
| receipt_number | string | option | 国内快递发货件数 |
| receipt_weight | string | option | 国内快递发货重量 KG |
| user_remark | string | option | 备注 |
PHP请求示例
//php示例
header('content-type:text/html;charset=utf-8');
try{
// 开始请求接口
$client = new SoapClient('http://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//每个接口固定必填参数HeaderRequest
'HeaderRequest' => array (
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
//以下请求参数的名称、类型会根据请求接口不同而不同,并且会有多个请求参数
'data' => array (
'company_name' => 'xxx物流有限公司', //快递公司
'package_id' => '1234567890', //快递单号
'sfc_number' => '2', //SFC包裹数量
'receipt_number' => '', //国内快递发货件数
'receipt_weight' => '2.15', //国内快递发货重量
'user_remark' => '测试新建国内快递交货单',//备注
)
);
//请求接口方法名
$result = $client->createExpressWaybill($parameter);
// 打印接口返回结果
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
返回参数:
| obj | ||
|---|---|---|
| 字段 | 字段类型 | 字段描述 |
| status | int | 接口状态:0失败,1成功 |
| msg | string | 接口成功描述/失败原因 |
请求参数:
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| parameter | array | required | json数据 |
| apiName | string | required | getProofDelivery |
| 字段 | 字段类型 | 是否必填 | 字段描述 |
|---|---|---|---|
| HeaderRequest | array | required | 查看头部参数(HeaderRequest) |
| orderCode | string | required | SFC的订单号 |
PHP请求示例
$data = array(
'apiName' => 'getProofDelivery', // 这里替换为你的 apiName
'parameter' => json_encode(array(
'HeaderRequest'=>array(
'appKey' => 'SFC 提供给用户的密钥 key',
'token' => 'SFC 提供给用户的密钥 token',
'userId' => '用户 code'
),
'orderCode'=>'SFC的订单号'
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://www.sfcservice.com/ishipsvc/http-api',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
返回参数:
| 字段 | 字段类型 | 字段描述 |
|---|---|---|
| OrderCode | string | SFC订单号 |
| code | int | 接口状态:200成功,500失败 |
| ShippingCertificate | string | 发货证明,PDF |
| Signature | string | 电子签名/签收图片,图片 |
apiName=getShipTypes¶meter={"HeaderRequest":{"userId":"","appKey":"","token":""},"divisionId":"2"}
[{"method_code":"TESTEXP","en_name":"TESTEXP","cn_name":"测试专用渠道","deliverytime":"7.0-10.0","iftracking":"YES","is_weight":"NO"}]
apiName=getRates¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"ratesRequestInfo":{"weight":"0.5","state":"US","country":"US","length":"10","width":"10","height":"10","priceType":"","divisionId":"1","zip_code":"12345"}}
{"rates":[{"totalfee":"0.010000","costfee":"0.000000","dealfee":"0.000000","regfee":"0.000000","addons":"0.000000","deliverytime":"7-10","isweight":"NO","iftracking":"YES","classtype":"China Express Mail","classtypecode":"CRE","shiptypecode":"TESTEXP","shiptypename":"TESTEXP","shiptypecnname":"测试专用渠道","isbattery":"NO","currency":"RMB","note":"","is_VAT":"N","is_Duty":"N","is_IOSS":"Y"},{"totalfee":"1.000000","costfee":"0.000000","dealfee":"0.000000","regfee":"0.000000","addons":"0.000000","deliverytime":"7-10","isweight":"YES","iftracking":"YES","classtype":"","classtypecode":"AFE","shiptypecode":"USEXP","shiptypename":"USEXP","shiptypecnname":"美国专线大货","isbattery":"YES","currency":"RMB","note":"","is_VAT":"N","is_Duty":"N","is_IOSS":"Y"}]}
apiName=updateOrderVolumeWeight¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"updateOrderVolumeWeight":{"orderCode":"QXXXX010160039","status":3,"volumeWeightList":{"weight":"11","length":"22","width":"33","height":"44"}}}
{"status":1,"msg":"Update success","orderCode":"QXXXX010160039","time":"2020-12-29 15:44:19"}
POST请求方式
$data = array(
'apiName' => 'addOrder', // 这里替换为你的 apiName
'parameter' => json_encode(array(
'HeaderRequest' => array(
'appKey' => 'AAA0',
'token' => 'AAA0',
'userId' => 'A0200'
),
'addOrderRequestInfo' => array (
'customerOrderNo' => 'ookk' . date('mdhis'), // 客户参考号
'opDivision' => 1, // 操作分拨中心 int
'orderStatus' => 'preprocess', // 状态:已确认confirmed/预处理preprocess/已交寄3
'recipientName' => 'tom', // 收件人
'recipientCountry' => 'GB', // 国家
'shippingMethod' => 'TESTEXP', // 主方式
'trackingNumber1' => '', // 跟踪号
'recipientState' => 'zhou', // 州省
'recipientCity' => 'city', // 城市
'recipientAddress' => 'xx addr', // 地址
'doorplate' => '', // 门牌号
'recipientZipCode' => 'W1S 3PR', // 邮编
'recipientPhone' => '1234567890', // 电话
'recipientEmail' => 'qq@qq.com', // 邮箱
'recipientOrganization' => 'company ', // 公司
'exportDeclaration' => 1, // 是否出口一般贸易报关 0/1
'is_Customs' => 1, // 是否单独报关 0/1
'customeCode' => '123ABC', // 报关单号
'isSignature' => 1, // 是否电子签名 0/1
'isReturn' => 1, // 是否退件 0/1
'deliveryType' => 2, // 末端派送类型,默认0 ,1PCP自提,2TRACK卡派
'withBattery' => 1, // 是否带电池 0/1
'type_of_battery' => 'PI966', // 电池类型'PI966', 'PI967', 'PI969', 'PI970', '无电池', ''
'fbaWarehouseCode' => 'fba code', // 仓储代码
'taxType' => '2', // 税号类型,1(自身税号),2(用SFC税号清关)
'taxesNumber' => 'sui hao', // 税号
'mark' => 'A', // 税号标注 '',A-Z
'salesLink' => '', // 销售链接
'erp_source' => '', // ERP来源
'shippingWorth' => '88', // 销售价值
'goodsDeclareWorth' => 8, // 总申报价值 float
'worthCurrency'=>'USD', // 申报价值币种,币种三字简码
'evaluate' => 8, // 总投保价值 float(该字段已作废,投保价值数据不予接收!)
'goodsWeight' => 1, // 重量 float
'pieceNumber' => 1, // 件数/箱数 int
'goodsQuantity' => 1, // 订单总数量 int
'goodsLength' => 2, // 长
'goodsWidth' => 2, // 宽
'goodsHeight' => 2, // 高
'goodsDescription' => 'the order desc', // 订单描述
'matchProduct' => 0, // 物品详情是否匹配产品 0/1
'shipperAddressType' => 0, // 是否取寄件人默认地址 0/1
'shipperState' => 'GD', // 寄件人省份
'shipperCity' => 'shenzhen', // 寄件人城市
'shipperCompanyName' => 'send company', // 寄件人公司
'shipperName' => 'tom', // 寄件人
'shipperEmail' => 'ww@ww.com', // 寄件人mail
'shipperAddress' => 'xxx addr', // 寄件人addr
'shipperPhone' => '1234567890', // 寄件人phone
'shipperZipCode' => '12345', // 寄件人邮编
'isRemoteConfirm' => 1, // 接口是否返回偏远收费提示 0/1
'isGetArea' => 1, // 接口是否返回分区区号(如:RM2R-3的3) 0/1
'IDCR' => '', // 身份证号/企业登记号/istore排序号
'salesPlatform' => '', // 销售平台
'senderTaxId' => '', // 发件人税号
'sellerPlatformId' => '', // 发件人平台ID
'originCountry' => '', // 销售平台原产国
'salesUnit' => '', // 生产销售单位
'creditCode' => '', // 统一社会信用代码
'totalExportDeclare' => '', //合计出口申报价值
'goodsDetails' => array (
'0' => Array (
'detailDescription' => 'en desc', // 物品描述/英文描述
'detailDescriptionCN' => '中文描述', // 中文描述
'detailQuantity' => 2, // 数量 int
'detailWorth' => 4, // 单个物品申报价
'detailCustomLabel' => 'w1', // 物品参考号/SKU
'hsCode' => '01041010', // 海关编码
'detailWeight' => 1, // 重量
'origin' => 'CN', // 原产地
'boxId' => 1, // 包裹号 int
'disposition' => '', // 销售类型
'enMaterial' => 'en eaterial', // 英文物品材质
'cnMaterial' => '中文物品材质', // 中文物品材质
'purpose' => 'en purpose', // 用途
'exportDeclarePrice' => '' //出口申报单价
)
)
)
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://www.sfcservice.com/ishipsvc/http-api',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{"orderCode":"SFC1WXXXX012290004","customerOrderNo":"C23O20201229074731","operatingTime":"2020-12-29 15:47:35","orderActionStatus":"Y","note":"","alert":"","trackingNumber":"VR389128587YP","ae_code":"SFC1WXXXX012290004"}
apiName=deleteOrder¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"delOrderRequestInfo":{"orderCode":"QXXXX010160039"}}
{"ask":"Error","message":"Order does not exist"}
apiName=updateOrderStatus¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"orderCode":"QXXXX010160039","updateOrderInfo":{"orderStatus":"confirmed","authenticate":"49b75953d80380f63cef23c0c5cd27a6"}}
{"ask":"Error","message":"update orders status is incorrect","time":"2020-12-29 16:14:42"}
apiName=getFeeByOrderCode¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"orderCode":"QXXXX009250020"}
{"ask":"Error","sysTime":"2020-12-29 16:21:57","orderCode":"QXXXX009250020","msg":"can not find order fee."}
apiName=searchOrder¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"searchOrderRequestInfo":{"orderCode":"WXXXX010090004"}}
{"orderInfo":{"orderCode":"WXXXX010090004","customerOrderNo":"CTO20201009111243","shippingMethod":"STEXPMPD","shipperName":"fajianrenxm","shipperEmail":"564565464@123.com","shipperAddress":"yuangzhengdaxia","shipperPhone":"1234567899","shipperZipCode":"123456","shipperCompanyName":"","recipientCountry":"Germany","recipientName":"Prowo e.V.","recipientState":"Berlin","recipientCity":"Berlin","recipientAddress":"Niedrigschwelliger Wohnverbund Scharnweber Str. 29","recipientZipCode":"10247","recipientPhone":"01781443904","recipientEmail":"sfctracking@suntekcorps.com","goodsDescription":",Soap Dispenser","goodsQuantity":"5","goodsDeclareWorth":"15.00","goodsWeight":"0.000","goodsLength":"0.00","goodsWidth":"0.00","goodsHeight":"0.00","trackNumber":"","trackNumberUsps":"","addTime":"2020-09-14 23:59:59","deliveryTime":"0000-00-00 00:00:00","sendTime":"0000-00-00","orderStatus":"Confirmed","orderStatusCn":"\u5df2\u786e\u8ba4","subShipType":"","goodsDetails":[{"detailDescription":"Soap Dispenser","detailQuantity":"5","detailCustomLabel":"YXY200603002[B07C96-61]","detailWorth":"3.00"}],"area":"5","ae_code":"SFC3WXXXX010090004"}}
apiName=searchTimeOrder¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"searchTimeOrderRequestInfo":{"startTime":"2020-09-7","endTime":"2020-09-7","package":"1","size":"100"}}
{"orderInfo":[{"orderCode":"QXXXX012300008","customerOrderNo":"","shippingMethod":"CHEXP","shipperName":"fajianrenxm","shipperEmail":"564565464@123.com","shipperAddress":"yuangzhengdaxia","shipperPhone":"1234567899","shipperZipCode":"123456","shipperCompanyName":"gongsi","recipientCountry":"Chile","recipientName":"FASDFA","recipientState":"Arica y Parinacota","recipientCity":"ARICA","recipientAddress":"ASDFASD ","recipientZipCode":"","recipientPhone":"86076922251394","recipientEmail":"","goodsDescription":"ASDFAS","goodsQuantity":"1","goodsDeclareWorth":"31.00","goodsWeight":"1.000","goodsLength":"1.00","goodsWidth":"1.00","goodsHeight":"1.00","trackNumber":"","trackNumberUsps":"","addTime":"2020-12-30 14:31:02","deliveryTime":"2020-12-30 14:36:59","sendTime":null,"orderStatus":"Received","orderStatusCn":"已收货","subShipType":"","goodsDetails":[{"detailDescription":"ASDFAS","detailQuantity":"1","detailCustomLabel":"ASDFAS","detailWorth":"31.00"}],"area":"","ae_code":"SFC1QXXXX012300008"},{"orderCode":"QXXXX012300007","customerOrderNo":"","shippingMethod":"CHEXP","shipperName":"fajianrenxm","shipperEmail":"564565464@123.com","shipperAddress":"yuangzhengdaxia","shipperPhone":"1234567899","shipperZipCode":"123456","shipperCompanyName":"gongsi","recipientCountry":"Chile","recipientName":"FASDFA","recipientState":"Arica y Parinacota","recipientCity":"ARICA","recipientAddress":"ASDFASD ","recipientZipCode":"","recipientPhone":"86076922251394","recipientEmail":"","goodsDescription":"ASDFAS","goodsQuantity":"1","goodsDeclareWorth":"30.00","goodsWeight":"1.000","goodsLength":"1.00","goodsWidth":"1.00","goodsHeight":"1.00","trackNumber":"","trackNumberUsps":"","addTime":"2020-12-30 14:30:20","deliveryTime":"2020-12-30 14:36:48","sendTime":null,"orderStatus":"Received","orderStatusCn":"已收货","subShipType":"","goodsDetails":[{"detailDescription":"ASDFAS","detailQuantity":"1","detailCustomLabel":"ASDFAS","detailWorth":"30.00"}],"area":"","ae_code":"SFC1QXXXX012300007"}]}
apiName=getFeeByTime¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"startime":"2020-08-01 00:00:00","endtime":"2020-08-06 00:00:00","page":"1"}
{"ask":"Success","sysTime":"2020-12-30 10:17:35","page":"1","count":"4","msg":"Success","data":[{"uniqueCode":"SFC1QXXXX007290010-AXXXX2020080301","orderCode":"SFC1QXXXX007290010","baseFee":"1010.00","regFee":"0.00","dealFee":"20.00","insurance":"0.00","totalFee":"1030.00","countWeight":"1.000","currencyCode":"RMB","chargebackTime":"2020-08-03 13:44:58","chargebackWorkDay":"2020-08-03","shipTypeCode":"EUEXP5DH","subShipType":"EUEXP5DH-DPD","waybillCode":"AXXXX2020080301","discount":"1.0000","stDealFee":"0.00","stRegFee":"0.00","originBaseFee":"1000.00","originAddons":"0.00","feeWeight":"1.000","vat":null,"tariff":null,"waybillStatus":"1","customerOrderNo":"","otherFees":[]},{"uniqueCode":"SFC1QXXXX007290002-AXXXX2020080302","orderCode":"SFC1QXXXX007290002","baseFee":"1400.00","regFee":"0.00","dealFee":"20.00","insurance":"0.00","totalFee":"1420.00","countWeight":"40.000","currencyCode":"RMB","chargebackTime":"2020-08-03 14:26:32","chargebackWorkDay":"2020-08-03","shipTypeCode":"EUEXP5","subShipType":"EUEXP5-DPD","waybillCode":"AXXXX2020080302","discount":"1.0000","stDealFee":"0.00","stRegFee":"0.00","originBaseFee":"1000.00","originAddons":"0.00","feeWeight":"40.000","vat":null,"tariff":null,"waybillStatus":"1","customerOrderNo":"","otherFees":[]}]}
apiName=createExpressWaybill¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"data":{"company_name":"xxx物流有限公司","package_id":"1234567890","sfc_number":"2","receipt_number":"","receipt_weight":"2.15","user_remark":"测试新建国内快递交货单"}}
{"status":"1","msg":"Tracking No. 1234567890 creating is successfully"}
销售部:
0755-2639 3003 转分机2
投诉&举报






