1、網(wǎng)站的業(yè)務(wù)流程可以查看官網(wǎng)的新手幫助
http://ucmap.com.cn/issue
或者聯(lián)系客戶經(jīng)理和客服。
2、添加訂單前,先通過getShipTypes和getRates接口方法了解運(yùn)輸方式相關(guān)信息,
結(jié)合客戶經(jīng)理的推薦,選擇符合你的最佳運(yùn)輸方式。
http://ucmap.com.cn/issue
或者聯(lián)系客戶經(jīng)理和客服。
2、添加訂單前,先通過getShipTypes和getRates接口方法了解運(yùn)輸方式相關(guān)信息,
結(jié)合客戶經(jīng)理的推薦,選擇符合你的最佳運(yùn)輸方式。
分撥中心ID (Division id) |
中文名稱 (Chinese name) |
英文名稱 (English name) |
---|---|---|
1 | 深圳分公司 | Shenzhen |
2 | 廣州分公司 | Guangzhou |
14 | 上海分公司 | Shanghai |
16 | 深圳倉儲 | SZ Warehouse |
17 | 海外銷售組 | Huizhou Warehouse |
22 | 香港分公司 | HongKong |
23 | 東莞倉儲(SFC) | DG Warehouse(SFC) |
30 | FBA | FBA |
31 | 義烏分公司 | Yiwu |
32 | 印度德里倉儲 | IN Warehouse |
33 | 龍崗分公司 | Longgang |
34 | 杭州分公司 | Hangzhou |
35 | 番禺分公司 | PANYU |
36 | 印度孟買倉儲 | MENGMAI |
37 | 義烏倉儲 | Yiwu Warehouse |
40 | S | S |
41 | Y | Y |
42 | E | E |
43 | TZ | TZ |
該參數(shù)是每個接口的必填參數(shù),詳見接口請求示例,全部接口格式一樣(如:
獲取運(yùn)輸方式列表)
HeaderRequest | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
appKey | string | required | SFC 提供給用戶的密 鑰key |
token | string | required | SFC 提供給用戶的密 鑰token |
userId | string | required | 用戶 code |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
divisionId | string | option | 分撥中心ID,查看分撥中心列表,不填則默認(rèn)深圳分公司 |
PHP請求示例
//php示例--獲取運(yùn)輸方式列表 header('content-type:text/html;charset=utf-8'); try{ // 開始請求接口 $client = new SoapClient('http://ucmap.com.cn/ishipsvc/web-service?wsdl'); $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'divisionId' => '1',//分撥中心ID,不填則默認(rèn)等于1 (即:深圳分撥中心的ID) ); //請求接口方法getShipTypes $result = $client->getShipTypes($parameter); // 打印接口返回結(jié)果 print_r($result); echo '
'; echo $result->shiptypes['0']->cn_name;//獲取第一個運(yùn)輸方式的中文名稱 }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
classtypes | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
method_code | string | 運(yùn)輸方式code |
en_name | string | 運(yùn)輸方式英文名稱 |
Cn_name | string | 運(yùn)輸方式中文名稱 |
Deliverytime | string | 遞送時間,單位(工作日)。如‘5-14’工作日 |
iftracking | string | 是否可追蹤 |
is_weight | string | 是否按材積重量計費(fèi) |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
parameter | array | required | json數(shù)據(jù) |
apiName | string | required | getShiptypesByCountry |
parameter | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
HeaderRequest | array | required | 查看頭部參數(shù)(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,查看分撥中心列表 |
請求示例
http://ucmap.com.cn/ishipsvc/http-api?apiName=getShiptypesByCountry¶meter={"HeaderRequest":{"appKey":"","token":"","userId":""},"getShiptypesByCountryRequestInfo":{"country":"US","weight":"0.5","length":"10","width":"10","height":"10","divisionId":"1"}}
返回參數(shù):
字段 | 字段類型 | 字段描述 |
---|---|---|
shiptypecnname | string | 運(yùn)輸方式中文名 |
shiptypecode | string | 運(yùn)輸方式代碼 |
deliverytime | string | 派送時效(工作日) |
isbattery | string | 是否帶電 |
iftracking | string | 是否可跟蹤 |
isweight | string | 是否按材積重量計費(fèi) |
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" }]
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(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默認(rèn) 紙箱 2郵袋 |
priceType | string | required | 價格類型 1默認(rèn) 用戶折扣價格 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://ucmap.com.cn/ishipsvc/web-service?wsdl'); $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'ratesRequestInfo' => Array ( 'weight' => '0.5', 'state' => 'US', 'country' => 'US', 'length' => '10', 'width' => '10', 'height' => '10', 'scanType' => 1, //包裝類型 1默認(rèn) 紙箱 2郵袋 'priceType' => '',//價格類型 1默認(rèn) 用戶折扣價格 2公布價 'divisionId' => '1', 'zipCode' => '12345', 'city' => 'US' ) ); //請求接口方法名 $result = $client->getRates($parameter); ); // 打印接口返回結(jié)果 print_r($result); }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
rates | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
totalfee | string | 總費(fèi)用 |
costfee | string | 基本運(yùn)費(fèi) |
dealfee | string | 處理費(fèi) |
addons | string | 燃油附加費(fèi) |
deliverytime | string | 妥投時效 |
isweight | string | 是否按材積重量計費(fèi) |
iftracking | string | 是否可訂單跟蹤 |
classtype | string | 運(yùn)輸方式分類,平郵,掛號,快遞 |
classtypecode | string | 運(yùn)輸方式分類的code CPS平郵 CRP掛號 CRE快遞 AFE空運(yùn) |
shiptypecode | string | 運(yùn)輸方式 |
shiptypename | string | 運(yùn)輸方式名稱 |
shiptypecnname | string | 運(yùn)輸方式中文名稱 |
isbattery | string | 是否可以帶電 |
note | string | 備注 |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
parameter | array | required | json數(shù)據(jù) |
apiName | string | required | getRatesByShip |
parameter | |||
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
ratesRequestInfo | array | required | 請求信息 |
ratesRequestInfo | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
shiptypescode | array | required | 運(yùn)輸方式 |
scanType | string | option | 包裝類型 1(默認(rèn)) 紙箱 2郵袋 |
country | string | required | 收件國家 |
weight | string | required | 物品重量 KG |
length | string | required | 物品長度 CM |
width | string | required | 物品寬度 CM |
height | string | required | 物品高度 CM |
priceType | string | option | 價格類型 1(默認(rèn)) 用戶折扣價格 2公布價 |
divisionId | string | option | 分撥中心ID,查看分撥中心列表 (默認(rèn) 客戶分撥中心) |
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://ucmap.com.cn/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;
返回參數(shù):
字段 | 字段類型 | 字段描述 |
---|---|---|
code | int | 接口狀態(tài):200成功,500失敗 |
data | array | 渠道價格 |
data | ||
---|---|---|
code | int | 接口狀態(tài):200成功,500失敗 |
totalfee | float | 總費(fèi)用(含附加費(fèi)、VAT) |
costfee | float | 基本運(yùn)費(fèi)(包含按件處理、燃油費(fèi)) |
shiptypecode | string | 運(yùn)輸方式代碼 |
weight | string | 計費(fèi)重量 |
surcharge | string | 其他附加費(fèi) 總額 |
surchargenote | array | 其他附加費(fèi)說明 |
currency | string | 幣種 |
surchargenote | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
name | string | 費(fèi)用名 |
en_name | string | 費(fèi)用名_en |
money | string | 費(fèi)用 |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
addOrderRequestInfo | array | required | 訂單信息 |
注意:以下很多字段,比如:投保價值、收件城市、電話 ...... ;
有的運(yùn)輸方式要求必填,有的運(yùn)輸方式非必填,有的運(yùn)輸方式不能填。具體看當(dāng)前業(yè)務(wù)
addOrderRequestInfo | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
customerOrderNo | string | option | 客戶參考號 |
opDivision | int | required | 操作分撥中心,查看分撥中心列表 |
isFba | int | option | 是否是FBA 0/1 |
warehouseName | string | option | 倉儲分撥中心 'FBA','',(MXFBA墨西哥fba用于傳'其它私人地址') |
orderStatus | string | required | 訂單狀態(tài):confirmed(已確認(rèn))、preprocess(預(yù)處理) |
recipientName | string | required | 收件人 |
recipientCountry | string | required | 收件國家 |
shippingMethod | string | required | 運(yùn)輸方式 |
subShipType | string | option | 運(yùn)輸子方式 |
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 | 是否出口一般貿(mào)易報關(guān) 0/1 |
is_Customs | int | option | 是否單獨(dú)報關(guān) 0/1 |
customeCode | string | option | 報關(guān)單號 |
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稅號清關(guān)) |
taxesNumber | string | option | 稅號 |
mark | string | option | 稅號標(biāo)注 '',A-Z |
salesLink | string | option | 銷售鏈接 |
erp_source | string | option | ERP來源 |
shippingWorth | string | option | 銷售價值 |
dutyforward | int | option | 關(guān)稅預(yù)付 0/1 |
codAmount | string | option | 代收貨款金額 |
goodsDeclareWorth | string | required | 總申報價值 float |
worthCurrency | string | option | 總申報價值幣種(幣種三字簡碼,默認(rèn)USD) |
evaluate | string | option | 總投保價值 float(該字段已作廢,投保價值數(shù)據(jù)不予接收!) |
goodsWeight | string | option | 重量 float KG |
pieceNumber | int | option | 件數(shù)/箱數(shù) int |
goodsQuantity | int | option | 訂單總數(shù)量 int |
goodsLength | string | option | 訂單長度 CM |
goodsWidth | string | option | 訂單寬度 CM |
goodsHeight | string | option | 訂單高度 CM |
goodsDescription | string | required | 訂單描述 |
shipperAddressType | int | required | 取寄件人默認(rèn)地址,固定填1 |
isRemoteConfirm | int | option | 接口是否返回偏遠(yuǎn)收費(fèi)提示 0/1 |
isGetArea | int | option | 接口是否返回分區(qū)區(qū)號(如:RM2R-3的3) 0/1 |
notifyUrl | string | option | SFC對應(yīng)的的url |
ebayIdentify | string | option | SFC對應(yīng)的EBAY帳號ID |
IDCR | string | option | 身份證號/企業(yè)登記號/istore排序號 |
oriGST | string | option | 印度GST/gst編號 |
oriCompany | string | option | 印度接口公司 |
salesPlatform | string | option | 銷售平臺 |
vendor_id | string | option | Vendor(供應(yīng)商)ID |
gst_exemption_code | string | option | GSTexemption Code |
abn | string | option | ABN(進(jìn)口商) |
areaCode | string | option | 分區(qū)打印shipping_desc |
postscript | string | option | 用于區(qū)分義烏兩個倉YW2 |
common | string | option | 公用字段(KREXP/KREXPSEA韓國專線用于傳個人識別編號或出生年月日;JPEXP日本專線用于傳店鋪名;KREXPHX用于個人通關(guān)編碼;TREXPTH用于身份證ID編碼;) |
iossNo | string | option | IOSS號 |
platformOrderNo | string | option | 平臺訂單號 |
invoice | string | option | 發(fā)票號 |
goodsDetails | array | required | 物品詳情,二維數(shù)組,每個子數(shù)組對應(yīng)一個物品,查看下面的goodsDetails |
goodsDetails | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
detailDescription | string | required | 物品描述/英文描述 |
detailDescriptionCN | string | option | 中文描述 |
detailQuantity | string | required | 數(shù)量 int |
detailWorth | string | required | 單個物品申報價 |
detailCustomLabel | string | option | 物品參考號/SKU |
hsCode | string | option | 海關(guān)編碼 |
detailWeight | string | option | 重量 KG |
origin | string | option | 原產(chǎn)地,默認(rèn)‘CN’ |
boxId | int | option | 包裹號 int |
disposition | string | option | 銷售類型 |
enMaterial | string | option | 英文物品材質(zhì) |
cnMaterial | string | option | 中文物品材質(zhì) |
purpose | string | option | 用途 |
PHP請求示例
//php示例 header('content-type:text/html;charset=utf-8'); try{ // 開始請求接口 $client = new SoapClient('http://ucmap.com.cn/ishipsvc/web-service?wsdl'); $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'addOrderRequestInfo' => Array ( 'customerOrderNo' => 'ookk' . date('mdhis'), // 客戶參考號 'opDivision' => 1, // 操作分撥中心 int 'orderStatus' => 'preprocess', // 狀態(tài):已確認(rèn)confirmed/預(yù)處理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, // 是否出口一般貿(mào)易報關(guān) 0/1 'is_Customs' => 1, // 是否單獨(dú)報關(guān) 0/1 'customeCode' => '123ABC', // 報關(guān)單號 'isSignature' => 1, // 是否電子簽名 0/1 'isReturn' => 1, // 是否退件 0/1 'deliveryType' => 2, // 末端派送類型,默認(rèn)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稅號清關(guān)) 'taxesNumber' => 'sui hao', // 稅號 'mark' => 'A', // 稅號標(biāo)注 '',A-Z 'salesLink' => 'www.html_sfc.com', // 銷售鏈接 'erp_source' => '通途ERP', // ERP來源 'shippingWorth' => '88', // 銷售價值 'checkinsurance' => 1, // 是否購買查驗(yàn)保險 0/1 'dutyforward' => 1, // 關(guān)稅預(yù)付 0/1 'codAmount' => '33', // 代收貨款金額 'goodsDeclareWorth' => 8, // 總申報價值 float 'worthCurrency'=>'USD', // 申報價值幣種,幣種三字簡碼 'evaluate' => 8, // 總投保價值 float(該字段已作廢,投保價值數(shù)據(jù)不予接收!) 'goodsWeight' => 1, // 重量 float 'pieceNumber' => 1, // 件數(shù)/箱數(shù) int 'goodsQuantity' => 1, // 訂單總數(shù)量 int 'goodsLength' => 2, // 長 'goodsWidth' => 2, // 寬 'goodsHeight' => 2, // 高 'goodsDescription' => 'the order desc', // 訂單描述 'matchProduct' => 0, // 物品詳情是否匹配產(chǎn)品 0/1 'shipperAddressType' => 0, // 是否取寄件人默認(rèn)地址 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, // 接口是否返回偏遠(yuǎn)收費(fèi)提示 0/1 'isGetArea' => 1, // 接口是否返回分區(qū)區(qū)號(如:RM2R-3的3) 0/1 'IDCR' => '', // 身份證號/企業(yè)登記號/istore排序號 'salesPlatform' => '', // 銷售平臺 'vendor_id' => '', // Vendor(供應(yīng)商)ID 'gst_exemption_code' => '', // GSTexemption Code 'abn' => '', // ABN(進(jìn)口商) 'shippingWorth1' => '', 'goodsDetails' => array ( '0' => Array ( 'detailDescription' => 'en desc', // 物品描述/英文描述 'detailDescriptionCN' => '中文描述', // 中文描述 'detailQuantity' => 2, // 數(shù)量 int 'detailWorth' => 4, // 單個物品申報價 'detailCustomLabel' => 'w1', // 物品參考號/SKU 'hsCode' => '01041010', // 海關(guān)編碼 'detailWeight' => 1, // 重量 'origin' => 'CN', // 原產(chǎn)地 'boxId' => 1, // 包裹號 int 'disposition' => '', // 銷售類型 'enMaterial' => 'en eaterial', // 英文物品材質(zhì) 'cnMaterial' => '中文物品材質(zhì)', // 中文物品材質(zhì) 'purpose' => 'en purpose', // 用途 'shelfLife' => '' ) ) // 保質(zhì)期 ) ); //請求接口方法名 $result = $client->addOrder($parameter); // 打印接口返回結(jié)果 print_r($result); }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
字段 | 字段類型 | 字段描述 |
---|---|---|
orderCode | string | SFC的訂單號 |
customerOrderNo | string | 客戶參考號 |
operatingTime | string | 操作時間 |
orderActionStatus | string | 添加訂單結(jié)果:Y添加成功、N添加失敗(MXEXPFS,MXEXP,MXEXPIP,MXEXPIPB,MXEXPB,MXEXPIE,MXEXPHK客戶參考號存在時返回N,同時有返回SFC單號和跟蹤號則代表添加成功) |
note | string | 添加失敗的原因 |
alert | string | 溫馨訂單提示語 |
area | string | 訂單分區(qū)的區(qū)名 |
trackingNumber | string | SFC訂單的跟蹤號 |
trackingNumberUsps | string | SFC訂單的轉(zhuǎn)單號(運(yùn)輸方式為墨西哥MXEXPB時,優(yōu)先作為跟蹤號) |
ae_code | string | SFC的AE訂單號 |
請求示例:
http://ucmap.com.cn/ishipsvc/http-api?apiName=updateOrderShipType¶meter={ "HeaderRequest":{ "userId":"用戶 code", "appKey":"SFC 提供給用戶的密鑰 key", "token":"SFC 提供給用戶的密鑰 token" }, "orderCode":"AE訂單號", "shipType":"運(yùn)輸方式" }
返回示例:
{ "customerOrderNo": "CTO20211230014632", "status": "1", "msg": "Update sucess.", "orderCode": "SFCAA0029136387YQ", "trackingNumber": "", "trackingNumberUsps": "", "ae_code": "SFCAA0029136387YQ", "time": "2022-12-27 13:23:29" }
?
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
updateOrderVolumeWeight | array | required | 要修改的訂單信息,看下面的updateOrderVolumeWeight |
updateOrderVolumeWeight | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
orderCode | string | required | 要修改的訂單號 |
status | string | required | 狀態(tài)(固定為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"); ?>
返回參數(shù):
字段 | 字段類型 | 字段描述 |
---|---|---|
status | int | 結(jié)果狀態(tài):1成功,0失敗 |
msg | string | 成功提示語或失敗原因 |
orderCode | string | SFC的訂單號 |
time | string | 操作時間 |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
delOrderRequestInfo | string | required | 要刪除的訂單信息,看下面的delOrderRequestInfo |
delOrderRequestInfo | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
orderCode | string | required | 單個訂單號 |
PHP請求示例
//php示例 header('content-type:text/html;charset=utf-8'); try{ /** *開始請求接口, *注意! *這里的url是http://ucmap.com.cn/ishipsvc/web-service?wsdl */ $client = new SoapClient('http://ucmap.com.cn/ishipsvc/web-service?wsdl'); $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'delOrderRequestInfo' => Array ( 'orderCode' =>'QA0200908160..' //訂單號 ) ); //請求接口方法名 $result = $client->deleteOrder($parameter); // 打印接口返回結(jié)果 print_r($result); }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
字段 | 字段類型 | 字段描述 |
---|---|---|
ask | string | 接口請求結(jié)果:Success成功、Error失敗 |
message | string | 成功/失敗描述 |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
orderCode | string | required | 要修改的訂單號 |
updateOrderInfo | array | required | 要修改的訂單信息,看下面的updateOrderInfo |
updateOrderInfo | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
orderStatus | string | required | 修改狀態(tài):preprocess(預(yù)處理)、confirmed(已確認(rèn))、sumbmitted(已交寄)、intercept(已截件) |
authenticate | string | required | 驗(yàn)證字段 : md5(‘訂單號’+‘用戶code’) |
weight | string | option | 修改物品重量 KG |
PHP請求示例
//php示例 header('content-type:text/html;charset=utf-8'); try{ // 開始請求接口 $client = new SoapClient('http://ucmap.com.cn/ishipsvc/web-service?wsdl'); $order_code = 'SFC1W1234567890'; // 訂單號 $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'orderCode' => $order_code, 'updateOrderInfo' => Array ( //'weight' => '', 'orderStatus' => 'confirmed', 'authenticate' => md5($order_code . '用戶 code') ) // 單號+客戶code ); //請求接口方法名 $result = $client->updateOrderStatus($parameter); // 打印接口返回結(jié)果 print_r($result); }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
字段 | 字段類型 | 字段描述 |
---|---|---|
ask | string | 接口請求結(jié)果:Success成功、Error失敗 |
message | string | 成功/失敗描述 |
time | string | 操作時間 |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
orderCode | string | required | 訂單號(或者跟蹤號或者客戶參考號) |
PHP請求示例
//php示例 header('content-type:text/html;charset=utf-8'); try{ // 開始請求接口 $client = new SoapClient('http://ucmap.com.cn/ishipsvc/web-service?wsdl'); $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'orderCode' => 'QA0200003090003',//訂單號(或者跟蹤號或者客戶參考號) ); //請求接口方法名 $result = $client->getFeeByOrderCode($parameter); // 打印接口返回結(jié)果 print_r($result); }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
字段 | 字段類型 | 字段描述 |
---|---|---|
ask | string | 接口請求成功返回‘Success’,請求失敗返回‘Error’ |
sysTime | string | 接口請求時間 |
orderCode | string | 請求訂單號 |
customerOrderNo | string | 客戶參考號 |
msg | string | 請求失敗原因 |
baseFee | string | 基本費(fèi) |
regFee | string | 掛號費(fèi) |
dealFee | string | 處理費(fèi) |
insurance | string | 保險費(fèi) |
totalFee | string | 總運(yùn)費(fèi)費(fèi)用=baseFee+regFee+dealFee+insurance (不包含其他費(fèi)用) |
currencyCode | string | 幣種 |
chargebackTime | string | 扣費(fèi)時間 |
chargebackWorkDay | string | 扣費(fèi)日期(SFC工作日) |
shipTypeCode | string | 運(yùn)輸方式 |
subShipType | string | 運(yùn)輸子方式 |
waybillCode | string | 貨運(yùn)單號 |
discount | string | 折扣 |
originBaseFee | string | 按件處理費(fèi) |
originAddons | string | 燃油附加費(fèi) |
stDealFee | string | 運(yùn)輸方式處理費(fèi) |
stRegFee | string | 運(yùn)輸方式掛號費(fèi) |
feeWeight | string | 計費(fèi)重 |
realWeight | string | 訂單實(shí)重 |
userUploadWeight | string | 客戶預(yù)報重量 |
otherFee | array | 其它費(fèi)和退款賠付費(fèi)用,如果沒費(fèi)用則不返回,如果只有一個則是一維數(shù)組,如果大于一個則是二維數(shù)組,看下面的otherFee |
otherFee | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
title | string | 英文費(fèi)用名稱 |
cnTitle | string | 中文費(fèi)用名稱 |
fee | string | 費(fèi)用 |
reason | string | 退款原因 |
可根據(jù)SFC訂單號打印物流標(biāo)簽
URL如下:
http://ucmap.com.cn/order/print/index/?orderCodeList=SFC單號&printType=打印類型&isPrintDeclare=1&declare=0&ismerge=1&print_type=標(biāo)簽類型&printSize=標(biāo)簽尺寸
參數(shù)說明:
打印類型 0:普通A4 1:熱敏
標(biāo)簽類型 pdf或者h(yuǎn)tml
標(biāo)簽尺寸 1:10*10 3:10*15
標(biāo)簽類型 pdf或者h(yuǎn)tml
標(biāo)簽尺寸 1:10*10 3:10*15
例如:
http://ucmap.com.cn/order/print/index/?orderCodeList=SFC2WA0200909100108&printType=1&isPrintDeclare=1&declare=0&ismerge=1&print_type=pdf&printSize=3
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
searchOrderRequestInfo | array | required | 要搜索的訂單信息,查看searchOrderRequestInfo |
searchOrderRequestInfo | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
orderCode | string | required | 訂單號 |
PHP請求示例
//php示例 header('content-type:text/html;charset=utf-8'); try{ // 開始請求接口 $client = new SoapClient('http://ucmap.com.cn/ishipsvc/web-service?wsdl'); $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'searchOrderRequestInfo' => array('orderCode'=>'WA0200908070006') ); //請求接口方法名 $result = $client->searchOrder($parameter); // 打印接口返回結(jié)果 print_r($result); }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
orderInfo | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
orderCode | string | 訂單號 |
customerOrderNo | string | 客戶參考號 |
shipperName | string | 寄件人 |
shipperEmail | string | 寄件人郵箱 |
shipperAddress | string | 寄件人地址 |
shipperPhone | string | 寄件人電話 |
shipperZipCode | string | 寄件人郵編 |
shipperCompanyName | string | 寄件人公司名 |
shippingMethod | string | 運(yùn)輸方式 |
recipientCountry | string | 收件國家 |
recipientName | string | 收件人 |
recipientState | string | 收件州省 |
recipientCity | string | 收件城市 |
recipientAddress | string | 收件地址 |
recipientZipCode | string | 收件郵編 |
recipientPhone | string | 收件電話 |
recipientEmail | string | 收件郵箱 |
goodsDescription | string | 物品描述 |
goodsQuantity | string | 物品數(shù)量 |
goodsDeclareWorth | string | 物品申報價值 |
goodsWeight | string | 物品重量 KG |
goodsLength | string | 物品長度 CM |
goodsWidth | string | 物品寬度 CM |
goodsHeight | string | 物品高度 CM |
orderStatus | string | 訂單狀態(tài)英文名稱 |
orderStatusCn | string | 訂單狀態(tài)中文名稱 |
addTime | string | 訂單添加時間 |
deliveryTime | string | 訂單付款時間 |
trackNumber | string | 訂單跟蹤號 |
trackNumberUsps | string | 訂單轉(zhuǎn)單號 |
subShipType | string | 訂單運(yùn)輸子方式 |
ae_code | string | AE訂單號 |
goodsDetails | array | 所有物品詳情,每個子數(shù)組為一個物品,看下面的goodsDetails |
goodsDetails | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
detailDescription | string | 物品描述 |
detailQuantity | string | 物品數(shù)量 |
detailCustomLabel | string | 物品參考號 |
detailWorth | string | 物品價格 |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
searchTimeOrderRequestInfo | array | required | 要搜索的訂單信息,查看searchTimeOrderRequestInfo |
searchTimeOrderRequestInfo | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
startTime | string | required | 開始日期Y-m-d |
endTime | string | required | 結(jié)束時間Y-m-d |
packages | string | required | 第幾頁 |
size | string | option | 每頁顯示多小訂單 |
PHP請求示例
//php示例 header('content-type:text/html;charset=utf-8'); try{ // 開始請求接口 $client = new SoapClient('http://ucmap.com.cn/ishipsvc/web-service?wsdl'); $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'searchTimeOrderRequestInfo' => Array ( 'startTime'=>'2019-08-13',//開始日期Y-m-d 'endTime'=>'2019-08-14',//結(jié)束時間Y-m-d 'packages'=>'1', //選填,第幾頁 'size'=>'5', //選填,每頁顯示多小訂單 ) ); //請求接口方法名 $result = $client->searchTimeOrder($parameter); // 打印接口返回結(jié)果 print_r($result); }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
orderInfo | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
orderCode | string | 訂單號 |
customerOrderNo | string | 客戶參考號 |
shipperName | string | 寄件人 |
shipperEmail | string | 寄件人郵箱 |
shipperAddress | string | 寄件人地址 |
shipperPhone | string | 寄件人電話 |
shipperZipCode | string | 寄件人郵編 |
shipperCompanyName | string | 寄件人公司名 |
shippingMethod | string | 運(yùn)輸方式 |
recipientCountry | string | 收件國家 |
recipientName | string | 收件人 |
recipientState | string | 收件州省 |
recipientCity | string | 收件城市 |
recipientAddress | string | 收件地址 |
recipientZipCode | string | 收件郵編 |
recipientPhone | string | 收件電話 |
recipientEmail | string | 收件郵箱 |
goodsDescription | string | 物品描述 |
goodsQuantity | string | 物品數(shù)量 |
goodsDeclareWorth | string | 物品申報價值 |
goodsWeight | string | 物品重量 KG |
goodsLength | string | 物品長度 CM |
goodsWidth | string | 物品寬度 CM |
goodsHeight | string | 物品高度 CM |
orderStatus | string | 訂單狀態(tài)英文名稱 |
orderStatusCn | string | 訂單狀態(tài)中文名稱 |
addTime | string | 訂單添加時間 |
deliveryTime | string | 訂單付款時間 |
trackNumber | string | 訂單跟蹤號 |
trackNumberUsps | string | 訂單轉(zhuǎn)單號 |
subShipType | string | 訂單運(yùn)輸子方式 |
ae_code | string | 訂單號 |
goodsDetails | array | 所有物品詳情,每個子數(shù)組為一個物品,看下面的goodsDetails |
goodsDetails | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
detailDescription | string | 物品描述 |
detailQuantity | string | 物品數(shù)量 |
detailCustomLabel | string | 物品參考號 |
detailWorth | string | 物品價格 |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
startime | string | required | 開始時間Y-m-d H:i:s |
endtime | string | required | 結(jié)束時間Y-m-d H:i:s |
page | string | option | 第幾頁,每頁默認(rèn)500條記錄 |
PHP請求示例
//php示例 header('content-type:text/html;charset=utf-8'); try{ // 開始請求接口 $client = new SoapClient('http://ucmap.com.cn/ishipsvc/web-service?wsdl'); $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'startime'=>'2019-08-01 00:00:00',//開始時間Y-m-d H:i:s 'endtime'=>'2019-08-07 00:00:00',//結(jié)束時間Y-m-d H:i:s 'page'=>'1', //選填 ); //請求接口方法名 $result = $client->getFeeByTime($parameter); // 打印接口返回結(jié)果 print_r($result); }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
字段 | 字段類型 | 字段描述 |
---|---|---|
ask | string | 修改訂單結(jié)果:Success成功、Error失敗 |
sysTime | string | 操作時間 |
msg | string | 成功提示語或失敗原因 |
page | string | 第幾頁 |
count | string | 總記錄 |
data | array | 訂單費(fèi)用明細(xì),查看下面的data |
data | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
uniqueCode | string | |
orderCode | string | 訂單號 |
baseFee | string | 基本費(fèi) |
regFee | string | |
dealFee | string | 處理費(fèi) |
insurance | string | |
totalFee | string | 總運(yùn)費(fèi)費(fèi)用=baseFee+regFee+dealFee+insurance (不包含其他費(fèi)用) |
countWeight | string | 計費(fèi)重 |
realWeight | string | 訂單實(shí)重 |
userUploadWeight | string | 客戶預(yù)報重量 |
currencyCode | string | 幣種 |
chargebackTime | string | |
chargebackWorkDay | string | |
subShipType | string | 運(yùn)輸子方式 |
waybillCode | string | 貨運(yùn)單號 |
discount | string | |
originBaseFee | string | |
originAddons | string | |
stDealFee | string | |
stRegFee | string | |
waybillStatus | string |
?
節(jié)點(diǎn)代碼對照表(點(diǎn)擊下載)
URL:http://tracking.sfcservice.com/tracking/track-api/get-track
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
data | json | required | 訂單跟蹤號組成的數(shù)組,再轉(zhuǎn)成json(參見請求demo) |
PHP請求示例
$curl = curl_init(); $track_num_arr = array('UWQ817779901000930307', 'LO971629672CN'); $data = json_encode($track_num_arr); curl_setopt_array($curl, array( CURLOPT_URL => "http://tracking.sfcservice.com/tracking/track-api/get-track?data=$data", 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; }
返回參數(shù):返回值為josn格式
字段 | 字段類型 | 字段描述 |
---|---|---|
code | int | 0為請求成功,其他為失敗 |
data | array | 跟蹤信息 |
data | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
number | string | 請求單號 |
customer_order_code | string | 客戶單號 |
ship_type | string | 渠道代碼 |
destination | string | 目的地國家 |
status | string | 訂單狀態(tài)(1 運(yùn)輸途中;2 運(yùn)輸過久;3 完成;4 退件返回完成;5 到達(dá)待取;6 等待攬收;7 SFC處理中;) |
track | array | 每個單號的具體信息 |
track | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
change_date | string | 跟蹤時間(備注:當(dāng)?shù)貢r間) |
ti_note | string | 跟蹤信息 |
ti_address | string | 地點(diǎn) |
code | string | 節(jié)點(diǎn)代碼(部分渠道返回) |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(HeaderRequest) |
data | array | required | 查看下面的data |
data | |||
---|---|---|---|
字段 | 字段類型 | 是否必填 | 字段描述 |
company_name | string | required | 快遞公司 |
package_id | string | required | 快遞單號 |
sfc_number | int | required | SFC包裹數(shù)量 |
receipt_number | string | option | 國內(nèi)快遞發(fā)貨件數(shù) |
receipt_weight | string | option | 國內(nèi)快遞發(fā)貨重量 KG |
user_remark | string | option | 備注 |
PHP請求示例
//php示例 header('content-type:text/html;charset=utf-8'); try{ // 開始請求接口 $client = new SoapClient('http://ucmap.com.cn/ishipsvc/web-service?wsdl'); $parameter = array ( //每個接口固定必填參數(shù)HeaderRequest 'HeaderRequest' => array ( 'appKey' => 'SFC 提供給用戶的密鑰 key', 'token' => 'SFC 提供給用戶的密鑰 token', 'userId' => '用戶 code' ), //以下請求參數(shù)的名稱、類型會根據(jù)請求接口不同而不同,并且會有多個請求參數(shù) 'data' => array ( 'company_name' => 'xxx物流有限公司', //快遞公司 'package_id' => '1234567890', //快遞單號 'sfc_number' => '2', //SFC包裹數(shù)量 'receipt_number' => '', //國內(nèi)快遞發(fā)貨件數(shù) 'receipt_weight' => '2.15', //國內(nèi)快遞發(fā)貨重量 'user_remark' => '測試新建國內(nèi)快遞交貨單',//備注 ) ); //請求接口方法名 $result = $client->createExpressWaybill($parameter); // 打印接口返回結(jié)果 print_r($result); }catch(SoapFault $e){ echo $e->getMessage(); }
返回參數(shù):
obj | ||
---|---|---|
字段 | 字段類型 | 字段描述 |
status | int | 接口狀態(tài):0失敗,1成功 |
msg | string | 接口成功描述/失敗原因 |
請求參數(shù):
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
parameter | array | required | json數(shù)據(jù) |
apiName | string | required | getProofDelivery |
字段 | 字段類型 | 是否必填 | 字段描述 |
---|---|---|---|
HeaderRequest | array | required | 查看頭部參數(shù)(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://ucmap.com.cn/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;
返回參數(shù):
字段 | 字段類型 | 字段描述 |
---|---|---|
OrderCode | string | SFC訂單號 |
code | int | 接口狀態(tài):200成功,500失敗 |
ShippingCertificate | string | 發(fā)貨證明,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"},{"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"}]}
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', // 狀態(tài):已確認(rèn)confirmed/預(yù)處理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, // 是否出口一般貿(mào)易報關(guān) 0/1
'is_Customs' => 1, // 是否單獨(dú)報關(guān) 0/1
'customeCode' => '123ABC', // 報關(guān)單號
'isSignature' => 1, // 是否電子簽名 0/1
'isReturn' => 1, // 是否退件 0/1
'deliveryType' => 2, // 末端派送類型,默認(rèn)0 ,1PCP自提,2TRACK卡派
'withBattery' => 1, // 是否帶電池 0/1
'type_of_battery' => 'PI966', // 電池類型'PI966', 'PI967', 'PI969', 'PI970', '無電池', ''
'fbaWarehouseCode' => 'fba code', // 倉儲代碼
'taxType' => '2', // 稅號類型,1(自身稅號),2(用SFC稅號清關(guān))
'taxesNumber' => 'sui hao', // 稅號
'mark' => 'A', // 稅號標(biāo)注 '',A-Z
'salesLink' => '', // 銷售鏈接
'erp_source' => '', // ERP來源
'shippingWorth' => '88', // 銷售價值
'goodsDeclareWorth' => 8, // 總申報價值 float
'worthCurrency'=>'USD', // 申報價值幣種,幣種三字簡碼
'evaluate' => 8, // 總投保價值 float(該字段已作廢,投保價值數(shù)據(jù)不予接收!)
'goodsWeight' => 1, // 重量 float
'pieceNumber' => 1, // 件數(shù)/箱數(shù) int
'goodsQuantity' => 1, // 訂單總數(shù)量 int
'goodsLength' => 2, // 長
'goodsWidth' => 2, // 寬
'goodsHeight' => 2, // 高
'goodsDescription' => 'the order desc', // 訂單描述
'matchProduct' => 0, // 物品詳情是否匹配產(chǎn)品 0/1
'shipperAddressType' => 0, // 是否取寄件人默認(rèn)地址 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, // 接口是否返回偏遠(yuǎn)收費(fèi)提示 0/1
'isGetArea' => 1, // 接口是否返回分區(qū)區(qū)號(如:RM2R-3的3) 0/1
'IDCR' => '', // 身份證號/企業(yè)登記號/istore排序號
'salesPlatform' => '', // 銷售平臺
'goodsDetails' => array (
'0' => Array (
'detailDescription' => 'en desc', // 物品描述/英文描述
'detailDescriptionCN' => '中文描述', // 中文描述
'detailQuantity' => 2, // 數(shù)量 int
'detailWorth' => 4, // 單個物品申報價
'detailCustomLabel' => 'w1', // 物品參考號/SKU
'hsCode' => '01041010', // 海關(guān)編碼
'detailWeight' => 1, // 重量
'origin' => 'CN', // 原產(chǎn)地
'boxId' => 1, // 包裹號 int
'disposition' => '', // 銷售類型
'enMaterial' => 'en eaterial', // 英文物品材質(zhì)
'cnMaterial' => '中文物品材質(zhì)', // 中文物品材質(zhì)
'purpose' => 'en purpose', // 用途
)
)
)
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://ucmap.com.cn/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":"測試新建國內(nèi)快遞交貨單"}}
{"status":"1","msg":"Tracking No. 1234567890 creating is successfully"}