https://www.sfcservice.com/issue
If you have any questions, please contact your account manager or customer serivce, thanks!
2、Please choose a suitable shipping method before you add orders.
You can learn more informations of our shipping methods by “getShipTypes”and “getRates”, thanks!
3、Please prioritize integrating with HTTPS.
| 分拨中心ID (Division id) |
中文名称 (Chinese name) |
英文名称 (English name) |
|---|---|---|
| 1 | 深圳分公司 | Shenzhen |
| 2 | 广州分公司 | Guangzhou |
| 14 | 上海分公司 | Shanghai |
| 17 | 海外销售组 | Huizhou Warehouse |
| 21 | 东莞仓储 | DGWarehouse |
| 30 | FBA | FBA |
| 31 | 义乌分公司 | Yiwu |
| 34 | 杭州分公司 | Hangzhou |
| 37 | 义乌仓储 | Yiwu Warehouse |
| 41 | Y | Y |
| HeaderRequest | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| appKey | string | required | It is the key which SFC provided to the user. (When requesting in “http” mode, this parameter needs to be escaped through the “url_encode” method) |
| token | string | required | It is the token which SFC provided to the user. (When requesting in “http” mode, this parameter needs to be escaped through the “url_encode” method) |
| userId | string | required | User Code |
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| divisionId | string | option | See Division_list, the default is “Shenzhen”. |
//php example--Get a list of shipping method
header('content-type:text/html;charset=utf-8');
try{
// Start the request interface
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//Fixed required parameters for each interface HeaderRequest
'HeaderRequest' => array (
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
//The names and types of the following request parameters will vary according to the request interface, and there will be multiple request parameters
'divisionId' => '1',//Distribution center ID, if not filled, the default is 1 (1 stands for the Shenzhen distribution center ID)
);
// Request getShipTypes
$result = $client->getShipTypes($parameter);
// Print returned result
print_r($result);
echo '
';
echo $result->shiptypes['0']->cn_name;//Gets the Chinese name of the first shipping method
}catch(SoapFault $e){
echo $e->getMessage();
}
| classtypes | ||
|---|---|---|
| Field | Field type | Field description |
| method_code | string | Shipping method code |
| en_name | string | The English name of shipping method |
| Cn_name | string | The Chinese name of shipping method |
| Deliverytime | string | Delivery time frame(working days), such as “5-14 wroking days” |
| iftracking | string | Can be tracking or not |
| is_weight | string | Be charged the shipping fee according to the volume weight or not |
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| ratesRequestInfo | array | required | Request information |
| ratesRequestInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| weight KG | string | required | Weight |
| state | string | required | Recipient State |
| country | string | required | Recipient Country |
| length | string | required | Length CM |
| width | string | required | Width CM |
| height | string | required | Height CM |
| priceType | string | required | Price type 1 Default user discount price 2 Published price |
| divisionId | string | required | Distribution Center ID, see Division_list |
| zipCode | string | required | Postal Code |
//php example
header('content-type:text/html;charset=utf-8');
try{
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//Fixed Required parameter for each interface: HeaderRequest
'HeaderRequest' => array (
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
//The names and types of the following request parameters will vary according to the request interface, and there will be multiple request parameters
'ratesRequestInfo' => Array (
'weight' => '0.5',
'state' => 'US',
'country' => 'US',
'length' => '10',
'width' => '10',
'height' => '10',
'priceType' => '',
'divisionId' => '1',
'zipCode' => '12345' )
);
//Request interface method name
$result = $client->getRates($parameter);
);
// Print returned result
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
| rates | ||
|---|---|---|
| Field | Field Type | Field description |
| totalfee | string | total cost |
| costfee | string | basic cost |
| dealfee | string | handling cost |
| addons | string | |
| deliverytime | string | |
| isweight | string | Charged by volume weight or not |
| iftracking | string | Traceable or not |
| classtype | string | Traceable or not |
| classtypecode | string | Traceable or not |
| shiptypecode | string | Shipping method |
| shiptypename | string | Shipping method name |
| shiptypecnname | string | Shipping method Chinese name |
| isbattery | string | |
| note | string | Remark |
| is_VAT | string | Whether to charge value-added tax (VAT) |
| is_Duty | string | Whether to charge tariffs(Duty) |
| is_IOSS | string | Is there an IOSS fee charged |
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| addOrderRequestInfo | array | required | Order information |
| addOrderRequestInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| customerOrderNo | string | option | Customer reference No |
| opDivision | int | required | Operation Distribution Center,see Division_list |
| isFba | int | option | Is it FBA 0/1 |
| warehouseName | string | option | Warehouse distribution center FBA,MXFBA Mexico fba for convey other private address. |
| orderStatus | string | required | order status, enum: confirmed、preprocess |
| recipientName | string | required | Recipient |
| recipientCountry | string | required | Recipient Country |
| shippingMethod | string | required | Shipping method |
| subShipType | string | option | Sub shipping method |
| trackingNumber1 | string | option | Tracking number |
| recipientState | string | option | Recipient State |
| recipientCity | string | option | Recipient City |
| recipientAddress | string | required | Recipient Address |
| doorplate | string | option | Recipient Doorplate. Please put the “doorplate” information together with the address information to the "recipient address" field; [available channels for the doorplate field: EUEXPIE, EUEXPIEB, EUEXP4, EUEXP6] |
| smallLangAddress | string | option | Minor language address |
| recipientZipCode | string | option | Recipient Zip code |
| recipientPhone | string | option | Recipient Phone number |
| recipientEmail | string | option | Recipient Email |
| recipientOrganization | string | option | Recipient Company |
| recipientAddressShortCode | string | option | Recipient Address Short Code |
| exportDeclaration | int | option | 0/1 Export general trade declaration or not |
| is_Customs | int | option | 0/1 Declare separately or not |
| customeCode | string | option | Customs declaration number |
| isSignature | int | option | 0/1 Electronic signature or not |
| isReturn | int | option | 0/1 Return or not |
| withBattery | int | option | 0/1 With battery or not |
| type_of_battery | string | option | Pattern of battery,PI966', 'PI967', 'PI969', 'PI970', 'Without battery |
| batteryTypeStr | int | option | Battery type: default 0/built-in battery is 1/matching battery is 2/pure battery is 3 |
| fbaNumber | string | option | Warehouse No./FBA number |
| fbaWarehouseCode | string | option | Warehouse code |
| taxType | string | option | Tax Number Type:1. Own tax number;2. Customs clearance with SFC tax number |
| taxesNumber | string | option | Tax No. |
| mark | string | option | '',A-Z Mark of Tax No. |
| salesLink | string | option | Sales link |
| erp_source | string | option | Source of ERP |
| shippingWorth | string | option | Worth |
| dutyforward | int | option | 0/1Customs duty prepayment |
| codAmount | string | option | Amount of payment received |
| goodsDeclareWorth | string | required | float Total declare value |
| worthCurrency | string | option | Currency of total declared value (three-word simple code of currency, default USD) |
| evaluate | string | option | float Total insured value |
| goodsWeight | string | option | float KG Weight |
| pieceNumber | int | option | int Piece/carton |
| goodsQuantity | int | option | int Total order QTY |
| goodsLength | string | option | CM Length |
| goodsWidth | string | option | CM Width |
| goodsHeight | string | option | CM Height |
| goodsDescription | string | required | Description |
| shipperAddressType | int | required | Retrieve the default address of the sender, with a fixed 1 filled in |
| isRemoteConfirm | int | option | 0/1 Interface returns a remote charge prompt or not |
| isGetArea | int | option | 0/1 Interface returns the area code or not |
| platformCode | string | option | SFC corresponding platform order number |
| notifyUrl | string | option | SFC corresponding URL |
| ebayIdentify | string | option | SFC corresponding EBAY account number ID |
| IDCR | string | option | ID number/Business registration number/istore sort number ID |
| oriGST | string | option | India GST/gst number |
| oriCompany | string | option | Indian Interface Company |
| salesPlatform | string | option | Sales platform |
| senderTaxId | string | option | Sender Tax ID |
| sellerPlatformId | string | option | Seller Platform ID |
| originCountry | string | option | Country of origin of the e-commerce platform |
| salesUnit | string | option | sales unit |
| creditCode | string | option | credit code |
| tradeOrderNo | string | option | Trade Order No |
| ecommerceCode | string | option | E-commerce Enterprise Code |
| ecommerceName | string | option | E-commerce Enterprise Name |
| productionSalesCode | string | option | Production/Sales Unit Code |
| vendor_id | string | option | Vendor(供应商)ID |
| gst_exemption_code | string | option | GSTexemption Code |
| abn | string | option | ABN(进口商) |
| areaCode | string | option | Zone printing shipping_desc |
| postscript | string | option | Used to distinguish 2 warehouses in Yiwu YW2 |
| common | string | option | Common fields (KREXP/KREXPSEA Korean dedicated line is used to transmit personal identification number or birth date; JPEXP Japanese dedicated line is used to transmit store name) |
| iossNo | string | option | IOSS No |
| platformOrderNo | string | option | Platform order No |
| goodsDetails | array | required | Item details, a two-dimensional array, each sub-array corresponds to an item, see goodsDetails below |
| goodsDetails | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| detailDescription | string | required | Item description/English description |
| detailDescriptionCN | string | option | Chinese description |
| detailQuantity | string | required | Quantity int |
| detailWorth | string | required | Single item declare value |
| detailCustomLabel | string | option | Item reference number/SKU |
| hsCode | string | option | Customs code |
| detailWeight | string | option | Weight KG |
| origin | string | option | country of origin |
| boxId | int | option | Parcel number int |
| disposition | string | option | Type of sales |
| enMaterial | string | option | English item material |
| cnMaterial | string | option | Chinese item material |
| purpose | string | option | Purpose |
| detailEbayLineId | string | option | eBay transaction bank ID |
| detailEbayTxnId | string | option | eBay transaction ID |
| detailEbayItemId | string | option | eBay item number |
| detailEbayUserId | string | option | eBay user buyer ID |
| detailEbayPayDate | string | option | Ebay payment time |
| detailEbaySoldDate | string | option | Ebay sell date |
| ecommerce_id | string | option | Amazon product code |
| priceTag | string | option | Tag price/MRP value |
| shelfLife | string | option | expiration date |
| ASIN | string | option | ASIN |
| certifierId | string | option | Certifier ID |
| productId | string | option | Product ID |
| versionId | string | option | Version ID |
| MPID | string | option | Merchant Product ID |
| NSPID | string | option | Non-standardized Manufacturer Product ID |
| SPID | string | option | Standardized Manufacturer Product ID |
header('content-type:text/html;charset=utf-8');
try{
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
'HeaderRequest' => array (
'appKey' => 'key SFC provided to user',
'token' => 'Token SFC provided to user',
'userId' => 'User code'
),
'addOrderRequestInfo' => Array (
'customerOrderNo' => 'ookk' . date('mdhis'),
'opDivision' => 1,
'isFba' => 0,
'warehouseName' => '',
'orderStatus' => 'preprocess',
'recipientName' => 'tom',
'recipientCountry' => 'GB',
'shippingMethod' => 'TESTEXP',
'subShipType' => '',
'trackingNumber1' => '',
'recipientState' => 'zhou',
'recipientCity' => 'city',
'recipientAddress' => 'xx addr',
'doorplate' => '',
'smallLangAddress' => 'small addr',
'recipientZipCode' => 'W1S 3PR',
'recipientPhone' => '1234567890',
'recipientEmail' => 'qq@qq.com',
'recipientOrganization' => 'company ',
'recipientAddressShortCode' => 'ABCD1234 ',
'exportDeclaration' => 1,
'is_Customs' => 1,
'customeCode' => '123ABC',
'isSignature' => 1,
'isReturn' => 1,
'deliveryType' => 2,
'withBattery' => 1,
'type_of_battery' => 'PI966',
'batteryTypeStr' => 0,
'fbaNumber' => 'fba no',
'fbaWarehouseCode' => 'fba code',
'taxType' => '2',
'taxesNumber' => 'sui hao',
'mark' => 'A',
'salesLink' => 'www.html_sfc.com',
'erp_source' => '通途ERP',
'shippingWorth' => '88',
'checkinsurance' => 1,
'dutyforward' => 1,
'codAmount' => '33',
'goodsDeclareWorth' => 8,
'worthCurrency'=>'USD',
'evaluate' => 8,
'goodsWeight' => 1,
'pieceNumber' => 1,
'goodsQuantity' => 1,
'goodsLength' => 2,
'goodsWidth' => 2,
'goodsHeight' => 2,
'goodsDescription' => 'the order desc',
'matchProduct' => 0,
'shipperAddressType' => 0,
'shipperState' => 'GD',
'shipperCity' => 'shenzhen',
'shipperCompanyName' => 'send company',
'shipperName' => 'tom',
'shipperEmail' => 'ww@ww.com',
'shipperAddress' => 'xxx addr',
'shipperPhone' => '1234567890',
'isRemoteConfirm' => 1,
'isGetArea' => 1,
'platformCode' => '',
'notifyUrl' => '',
'ebayIdentify' => '',
'IDCR' => '',
'oriGST' => '',
'oriCompany' => '',
'salesPlatform' => '',
'senderTaxId' => '',
'sellerPlatformId' => '',
'originCountry' => '',
'salesUnit' => '',
'creditCode' => '',
'tradeOrderNo' => '',
'ecommerceCode' => '',
'ecommerceName' => '',
'productionSalesCode' => '',
'vendor_id' => '',
'gst_exemption_code' => '',
'abn' => '',
'areaCode' => '',
'postscript' => '',
'shippingWorth1' => '',
'goodsDetails' => array (
'0' => Array (
'detailDescription' => 'en desc',
'detailDescriptionCN' => '中文描述',
'detailQuantity' => 2,
'detailWorth' => 4,
'detailCustomLabel' => 'w1',
'hsCode' => '01041010',
'detailWeight' => 1,
'origin' => 'CN',
'boxId' => 1,
'disposition' => '',
'enMaterial' => 'en eaterial',
'cnMaterial' => '中文物品材质',
'purpose' => 'en purpose',
'detailEbayLineId' => '',
'detailEbayTxnId' => 0,
'detailEbayItemId' => '',
'detailEbayUserId' => '',
'detailEbayPayDate' => '',
'detailEbaySoldDate' => '',
'ecommerce_id' => '',
'priceTag' => '',
'shelfLife' => ''
'ASIN' => '') )
'certifierId' => ''
'productId' => ''
'versionId' => ''
'MPID' => ''
'NSPID' => ''
'SPID' => ''
)
);
$result = $client->addOrder($parameter);
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
| Field | Field Type | Field description |
|---|---|---|
| orderCode | string | SFC order number |
| customerOrderNo | string | Customer reference No |
| operatingTime | string | Operating time |
| orderActionStatus | string | Add order result: Y added successfully, N failed to add |
| note | string | Reason for failure to add |
| alert | string | Order reminder |
| area | string | The district name of the order district |
| trackingNumber | string | SFC order tracking number |
| trackingNumberUsps | string | The transfer number of the SFC order (when the shipping method is Mexico MXEXPB, it will be given priority as the tracking number) |
| ae_code | string | SFC order number |
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| updateOrderVolumeWeight | array | required | The order information to be changed. See updateOrderVolumeWeight below |
| updateOrderVolumeWeight | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| orderCode | string | required | The order code to be changed |
| status | string | required | Status. Must be 3 |
| volumeWeightList | array | required | Weight,length,width and height of the order to be changed. See updateOrderVolumeWeight below |
| volumeWeightList | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| weight | string | option | weight KG |
| length | string | option | length CM |
| width | string | option | width CM |
| height | string | option | height CM |
'11','length'=>'22','width'=>'33','height'=>'44');
try{
$parameter = array(
'HeaderRequest' => array (
'appKey' => 'key SFC provided to user',
'token' => 'Token SFC provided to user',
'userId' => 'User code'
),
'updateOrderVolumeWeight' => Array
(
'orderCode'=>'QXXXX701190001',
'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");
?>
| Field | Field Type | Field description |
|---|---|---|
| status | int | Result status: 1 success, 0 failure |
| msg | string | Prompt for success or reason for failure |
| orderCode | string | SFC order number |
| time | string | Operating time |
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| delOrderRequestInfo | string | required | The order information to be deleted. See delOrderRequestInfo below |
| delOrderRequestInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| orderCode | string | required | Single order number |
//php示例
header('content-type:text/html;charset=utf-8');
try{
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
'HeaderRequest' => array (
'appKey' => 'key SFC provided to user',
'token' => 'Token SFC provided to user',
'userId' => 'User code'
),
// The names and types of the following request parameters will vary according to the request interface, and there will be multiple request parameters
'delOrderRequestInfo' => Array (
'orderCode' =>'QA0200908160..' //订单号
)
);
// Request interface method name
$result = $client->deleteOrder($parameter);
// Print returned result
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
| Field | Field Type | Field description |
|---|---|---|
| ask | string | Interface request result: Success succeeds, Error fails |
| message | string | Success/failure description |
Only the addOrder API ignores export fields. API clients maintain independent export details with addOrderExportDetail. Order creation pages, ordinary edits and batch imports support export data and channel validation. Export rows are independent of ordinary item rows.
This method replaces all export rows for an existing order atomically. It does not create an order. Use orderCode or AEorderCode; orders belonging to other users, deleted or missing orders return Error. Repeated pushes overwrite all previous rows. Export data sent to addOrder is no longer stored.
| Field | Type | Required | Description |
|---|---|---|---|
| parameter | array | required | JSON data |
| apiName | string | required | addOrderExportDetail |
| Field | Type | Required | Description |
|---|---|---|---|
| HeaderRequest | object | required | See authentication header |
| addOrderExportDetailRequestInfo | object | required | Order and export rows |
| orderCode | string | optional | Logistics order number; alternatively use AEorderCode |
| AEorderCode | string | optional | AE order number |
| exportDetails | object[] | required | At least one non-empty export row. Fields are validated against channel configuration. |
| sort | int | optional | Unique positive row sequence; omitted values use input order |
| exportReferenceNo | string | optional | 出口物品参考号 / Export item reference |
| exportDescriptionCn | string | optional | 出口中文描述 / Chinese description |
| exportDescriptionEn | string | optional | 出口英文描述 / English description |
| exportHsCode | string | optional | 出口海关编码 / HS code |
| exportQuantity | int | optional | 出口数量,非负整数 / Quantity, non-negative integer |
| exportUnitWeight | decimal | optional | 出口单品重量,最多3位小数 / Unit weight, up to 3 decimal places |
| exportDeclarePrice | decimal | optional | 出口申报单价,最多2位小数 / Unit price, up to 2 decimal places |
| declareElements | string | optional | 申报要素 / Declaration elements |
The order total is recalculated as Σ(quantity × unit price). An omitted quantity is not replaced with goods quantity.
$data = array(
'apiName' => 'addOrderExportDetail',
'parameter' => json_encode(array(
'HeaderRequest' => array('userId' => 'USER_CODE', 'token' => 'TOKEN', 'appKey' => 'APP_KEY'),
'addOrderExportDetailRequestInfo' => array(
'orderCode' => 'QA0200000000000',
'exportDetails' => array(
array('sort' => 1, 'exportReferenceNo' => 'SKU-1', 'exportDescriptionCn' => '衣服', 'exportDescriptionEn' => 'Clothing', 'exportHsCode' => '6109100000', 'exportQuantity' => 2, 'exportUnitWeight' => '0.250', 'exportDeclarePrice' => '12.50', 'declareElements' => '品牌|享惠'),
array('sort' => 2, 'exportReferenceNo' => 'SKU-2', 'exportDescriptionCn' => '帽子', 'exportDescriptionEn' => 'Hat', 'exportHsCode' => '6505009900', 'exportQuantity' => 1, 'exportUnitWeight' => '0.100', 'exportDeclarePrice' => '5.00', 'declareElements' => '')
)
)
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.sfcservice.com/ishipsvc/http-api',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array('Content-Type: application/x-www-form-urlencoded'),
CURLOPT_RETURNTRANSFER => true
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;| Field | Description |
|---|---|
| ask | Success / Error |
| message | Success / error description |
| orderCode | Logistics order code |
| aeCode | AE order code |
| count | Stored export row count |
{"ask":"Success","message":"Success","orderCode":"QA0200000000000","aeCode":"SFCAA...","count":2} | Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| orderCode | string | required | The order number that needs modifying |
| updateOrderInfo | array | required | Order information that needs modifying,see updateOrderInfo below |
| updateOrderInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| orderStatus | string | required | Status Modifying: Pending、Confirmed、Submitted、Send、deleted |
| authenticate | string | required | Field validation: MD5 (‘order number '+‘user code') |
| weight | string | option | weight KG |
//php example
header('content-type:text/html;charset=utf-8');
try{
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$order_code = 'SFC1W1234567890'; // order number
$parameter = array (
//Fixed Required parameter for each interface: HeaderRequest
'HeaderRequest' => array (
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
//The name and type of the following request parameters will varies according to the request interface, and there will be multiple request parameters
'orderCode' => $order_code,
'updateOrderInfo' => Array (
//'weight' => '',
'orderStatus' => 'confirmed',
'authenticate' => md5($order_code . 'user code') ) // Order number + User code
);
//Request interface method name
$result = $client->updateOrderStatus($parameter);
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
| Field | Field type | Field description |
| ask | string | Interface Request Result:Success成功、Error失败 |
| message | string | Success/Failure Description |
| time | string | TIME |
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| orderCode | string | required | Order number (or tracking number or reference number) |
//php示例
header('content-type:text/html;charset=utf-8');
try{
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//Fixed Required parameter for each interface: HeaderRequest
'HeaderRequest' => array (
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
//The name and type of the following request parameters will varies according to the request interface, and there will be multiple request parameters
'orderCode' => 'QA0200003090003',// Order number (or tracking number or reference number)
);
//Request interface method name
$result = $client->getFeeByOrderCode($parameter);
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
| Field | Field Type | Field description |
|---|---|---|
| ask | string | "Success" is returned when the interface request succeeds, and "error" is returned when fails |
| sysTime | string | request time |
| orderCode | string | Order number requested |
| customerOrderNo | string | Reference number |
| msg | string | Failed reason |
| baseFee | string | Basic cost |
| regFee | string | Registration fee |
| dealFee | string | Handling fee |
| insurance | string | Insurance |
| totalFee | string | Total fee |
| currencyCode | string | Currency |
| chargebackTime | string | Deduction time |
| chargebackWorkDay | string | Deduction date (SFC working day) |
| shipTypeCode | string | Shipping method |
| subShipType | string | Sub shipping method |
| waybillCode | string | Waybill number |
| discount | string | Discount |
| originBaseFee | string | Standard freight (base freight before discount) |
| originAddons | string | Fuel surcharge |
| stDealFee | string | Shipping method handling fee |
| stRegFee | string | Shipping method registration fee |
| feeWeight | string | Billable weight |
| realWeight | string | Real Weight |
| userUploadWeight | string | User Upload Weight |
| otherFee | array | Other fee. If there is no other fee, it will not be returned. If there is only one kind of fee, it will be an one-dimensional array. If there is more than one, it will be a two-dimensional array. See other fee below |
| otherFee | ||
|---|---|---|
| Field | Field Type | Field description |
| title | string | Expense title in English |
| cnTitle | string | Expense title in Chinese |
| fee | string | Fee |
| reason | string | Refund reason |
Label type pdf or html
Label size 1:10*10 3:10*15
https://www.sfcservice.com/order/print/index/?orderCodeList=SFC2WA0200909100108&printType=1&isPrintDeclare=1&declare=0&ismerge=1&print_type=pdf&printSize=3
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| searchOrderRequestInfo | array | required | Information of the order to be searched,see searchOrderRequestInfo below |
| searchOrderRequestInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| orderCode | string | required | order number |
//php example
header('content-type:text/html;charset=utf-8');
try{
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//Fixed required parameters for each interface HeaderRequest
'HeaderRequest' => array (
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
//The names and types of the following request parameters will vary according to the request interface, and there will be multiple request parameters
'searchOrderRequestInfo' => array('orderCode'=>'WA0200908070006')
);
//The method name of request interface
$result = $client->searchOrder($parameter);
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
| orderInfo | ||
|---|---|---|
| Field | Field type | Field description |
| orderCode | string | order number |
| customerOrderNo | string | Customer Reference Number |
| shipperName | string | sender |
| shipperEmail | string | Sender Email |
| shipperAddress | string | Sender address |
| shipperPhone | string | Sender phone |
| shipperZipCode | string | Sender zip code |
| shipperCompanyName | string | Sender's company name |
| shippingMethod | string | Shipping method |
| recipientCountry | string | Recipient country |
| recipientName | string | Recipient Name |
| recipientState | string | Recipient State |
| recipientCity | string | Recipient City |
| recipientAddress | string | Recipient Adress |
| recipientZipCode | string | RecipientZipCode |
| recipientPhone | string | RecipientPhone |
| recipientEmail | string | Recipient Email |
| goodsDescription | string | Goods Description |
| goodsQuantity | string | Goods Quantity |
| goodsDeclareWorth | string | Goods Declare Value |
| goodsWeight | string | KG Weight kg |
| goodsLength | string | CM Length CM |
| goodsWidth | string | CM Width CM |
| goodsHeight | string | CM Height CM |
| orderStatus | string | English description of order status |
| orderStatusCn | string | Chinese description of order status |
| addTime | string | Order adding time |
| deliveryTime | string | Payment deduction time |
| trackNumber | string | Order Tracking Number |
| trackNumberUsps | string | Updated Order Tracking Number |
| subShipType | string | Sub Shipping Method |
| ae_code | string | Order Number |
| goodsDetails | array | please check below for all item details, each sub-array regarding as one item: goodsDetails |
| totalExportDeclare | string (SOAP: float) | Total export declaration value: sum of export quantity multiplied by export unit price |
| exportDetails | array | Independent export declaration rows ordered by sort; not matched to goodsDetails by position. Empty when no rows exist; SOAP may omit this field. |
Export fields are read only from the independent export declaration tables, without falling back to ordinary item details. goodsDetails no longer returns declareElements, exportReferenceNo, exportDescriptionCn, exportDescriptionEn, exportHsCode, exportQuantity or exportUnitWeight. Their optional legacy WSDL definitions remain for protocol compatibility; read orderInfo.exportDetails instead.
| exportDetails (one export declaration row per element) | ||
|---|---|---|
| Field | Field type | Description |
| sort | int | Export row sequence number |
| exportReferenceNo | string | Export item reference number |
| exportDescriptionCn | string | Chinese export description |
| exportDescriptionEn | string | English export description |
| exportHsCode | string | Export HS code |
| exportQuantity | int | Export quantity; omitted when not supplied |
| exportUnitWeight | float | Export unit weight in kg; omitted when not supplied |
| exportDeclarePrice | string | Export unit declaration price; omitted when not supplied |
| declareElements | string | Declaration elements |
| goodsDetails | ||
|---|---|---|
| Field | Field type | Field description |
| detailDescription | string | Description |
| detailQuantity | string | Quantity |
| detailCustomLabel | string | Item reference number |
| detailWorth | string | Item Value |
| Field | Field type | Required or not | Field description |
|---|---|---|---|
| parameter | array | required | json data |
| apiName | string | required | searchShipCost |
| Field | Field type | Required or not | Field description |
|---|---|---|---|
| HeaderRequest | array | required | See Interface requests required parameters |
| shipCostRequestInfo | array | required | Order cost search information, see shipCostRequestInfo below |
| shipCostRequestInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| start_date | string | required | Start date, format: Y-m-d |
| end_date | string | required | End date, format: Y-m-d |
| page | int | required | Page number |
| page_size | int | required | Page size, maximum 500 |
$data = array(
'apiName' => 'searchShipCost',
'parameter' => json_encode(array(
'HeaderRequest' => array(
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
'shipCostRequestInfo' => array(
'start_date' => '2026-01-01',
'end_date' => '2026-01-31',
'page' => 1,
'page_size' => 20
)
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://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',
),
CURLOPT_RETURNTRANSFER => true,
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
| Field | Field type | Field description |
|---|---|---|
| cost_list | array | Order cost list, see cost_list below |
| total | int | Total records in the selected date range |
| page | int | Current page number |
| page_size | int | Page size |
| cost_list | ||
|---|---|---|
| Field | Field type | Field description |
| index | int | Row index |
| waybill_code | varchar(20) | Waybill number |
| deduct_refund_time | date | Chargeback date |
| add_time | datetime | Creation time |
| refund_code | varchar(50) | Refund number |
| order_code | varchar(20) | Order number |
| AeCode | string | AE order number |
| customer_order_code | varchar(255) | Customer reference number |
| tracking_number | varchar(50) | Tracking number |
| virtual_code | string | Virtual shipping method code |
| ship_type_code | varchar(50) | Shipping method |
| cn_name | varchar(50) | Country/Region |
| write_off | int | Write-off status |
| area | string | Zone |
| zip_code | string | Zip code |
| order_worth | string | Declared value |
| order_evaluate | string | Insured value |
| weight | decimal(6,3) | Weight |
| vol_weight | float/decimal | Volume weight |
| count_weight | float/decimal | Chargeable weight |
| shipping_cost | float(8,2) | Shipping cost |
| according_handling | float(8,2) | Handling fee |
| reg_fee | float(8,2) | Registration fee |
| addons | float(8,2) | Fuel surcharge |
| rests_fee | float(8,2) | Other fees total |
| total_shipping_cost | float(8,2) | Total shipping cost |
| other_fee_name | string | Remark |
| storage_order_code | varchar(50) | Storage order number |
| overweight_handling | float(8,2) | Overweight handling fee |
| packing_materials_fee | float(8,2) | Packing materials fee |
| order_handling_fee | float(8,2) | Order handling fee |
| appreciation_fee | float(8,2) | Value-added service fee |
{"cost_list":[{"index":"","waybill_code":"","deduct_refund_time":"","add_time":"","refund_code":"","order_code":"","AeCode":"","customer_order_code":"","tracking_number":"","virtual_code":"","ship_type_code":"","cn_name":"","write_off":"","area":"","zip_code":"","order_worth":"","order_evaluate":"","weight":"","vol_weight":"","count_weight":"","shipping_cost":"","according_handling":"","reg_fee":"","addons":"","rests_fee":"","total_shipping_cost":"","other_fee_name":"","storage_order_code":"","overweight_handling":"","packing_materials_fee":"","order_handling_fee":"","appreciation_fee":""}],"total":0,"page":1,"page_size":20}
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| searchTimeOrderRequestInfo | array | required | Information of the order to be searched,see searchTimeOrderRequestInfo below |
| searchTimeOrderRequestInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| startTime | string | required | Start date Y-m-d |
| endTime | string | required | End DateY-m-d |
| packages | string | required | Page |
| size | string | option | Numbers of Order per page |
//php example
header('content-type:text/html;charset=utf-8');
try{
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//Fixed required parameters for each interface HeaderRequest
'HeaderRequest' => array (
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
//The names and types of the following request parameters will vary according to the request interface, and there will be multiple request parameters
'searchTimeOrderRequestInfo' => Array
(
'startTime'=>'2019-08-13',// Start date Y-m-d
'endTime'=>'2019-08-14',// End Date Y-m-d
'packages'=>'1', // Optional, which page
'size'=>'5', // Optional, Numbers of Order per page
)
);
);
// The method name of request interface
$result = $client->searchTimeOrder($parameter);
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
| orderInfo | ||
|---|---|---|
| Field | Field type | Field description |
| orderCode | string | order number |
| customerOrderNo | string | Customer Reference Number |
| shipperName | string | sender |
| shipperEmail | string | Sender Email |
| shipperAddress | string | Sender address |
| shipperPhone | string | Sender phone |
| shipperZipCode | string | Sender zip code |
| shipperCompanyName | string | Sender's company name |
| shippingMethod | string | Shipping method |
| recipientCountry | string | Recipient country |
| recipientName | string | Recipient Name |
| recipientState | string | Recipient State |
| recipientCity | string | Recipient City |
| recipientAddress | string | Recipient Adress |
| recipientZipCode | string | RecipientZipCode |
| recipientPhone | string | RecipientPhone |
| recipientEmail | string | Recipient Email |
| goodsDescription | string | Goods Description |
| goodsQuantity | string | Goods Quantity |
| goodsDeclareWorth | string | Goods Declare Value |
| goodsWeight | string | KG Weight kg |
| goodsLength | string | CM Length CM |
| goodsWidth | string | CM Width CM |
| goodsHeight | string | CM Height CM |
| orderStatus | string | English description of order status |
| orderStatusCn | string | Chinese description of order status |
| addTime | string | Order adding time |
| deliveryTime | string | Payment deduction time |
| trackNumber | string | Order Tracking Number |
| trackNumberUsps | string | Updated Order Tracking Number |
| subShipType | string | Sub Shipping Method |
| ae_code | string | Order ID |
| goodsDetails | array | Please check below for all item details, each sub-array regarding as one item:goodsDetails |
| searchTimeOrder | ||
|---|---|---|
| Field | Field type | Field description |
| detailDescription | string | Description |
| detailQuantity | string | Quantity |
| detailCustomLabel | string | Item reference number |
| detailWorth | string | Item Value |
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| startime | string | required | Start Time Y-m-d H:i:s |
| endtime | string | required | End Time Y-m-d H:i:s |
| page | string | option | page number, 500 records per page |
//php sample
header('content-type:text/html;charset=utf-8');
try{
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//Fixed Required parameter for each interface: HeaderRequest
'HeaderRequest' => array (
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
//The name and type of the following request parameters will varies according to the request interface, and there will be multiple request parameters
'startime'=>'2019-08-01 00:00:00',//Start time:Y-m-d H:i:s
'endtime'=>'2019-08-07 00:00:00',//End time: Y-m-d H:i:s
'page'=>'1', //Optional
);
//The method name of request interface
$result = $client->getFeeByTime($parameter);
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
| Field | Field Type | Field description |
|---|---|---|
| ask | string | The result of editing orders: Success、Error |
| sysTime | string | Operation Time |
| msg | string | Success message or failure reason |
| page | string | Page |
| count | string | Total records |
| data | array | order cost details, see data below |
| data | ||
|---|---|---|
| Field | Field Type | Field description |
| uniqueCode | string | |
| orderCode | string | Order Number |
| baseFee | string | Basic Fee |
| regFee | string | |
| dealFee | string | Handling Fee |
| insurance | string | |
| totalFee | string | Total Cost |
| currencyCode | string | Currency |
| countWeight | string | Billable weight |
| realWeight | string | Real Weight |
| userUploadWeight | string | User Upload Weight |
| chargebackTime | string | |
| chargebackWorkDay | string | |
| subShipType | string | Sub-shipping Channel |
| waybillCode | string | Waybill Number |
| discount | string | |
| originBaseFee | string | Standard freight (base freight before discount) |
| originAddons | string | |
| stDealFee | string | |
| stRegFee | string | |
| waybillStatus | string | |
| Field | Field type | Required or not | Field description |
| data | json | required | The array of order tracking numbers converte to json(see request demo,Maximum of 40 orders per request) |
| client | string | option | client |
$curl = curl_init();
$track_num_arr = array('UWQ817779901000930307', 'LO971629672CN');
$data = json_encode($track_num_arr);
$client = 'sfc';
curl_setopt_array($curl, array(
CURLOPT_URL => "https://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;
}
| Field | Field Type | Field description |
|---|---|---|
| code | int | 0 is for successful request, others for failed |
| data | array | Tracking information |
| data | ||
|---|---|---|
| Field | Field Type | Field description |
| number | string | Request Number |
| customer_order_code | string | Order Number |
| ship_type | string | Channel Code |
| destination | string | Destination Country |
| status | string | Order status(1.In Transit;2.Expired;3. Delivered;4.Return Completed;5.Awaiting Collection) |
| track | array | Specific information of each order number |
| track | ||
|---|---|---|
| Field | Field Type | Field description |
| change_date | string | Tracking Time |
| ti_note | string | Tracking Information |
| ti_address | string | Address |
Description: Locate the order by AE code / tracking number, then match a unique carrier provider config by order country + tracking number rules
Method: GET / POST, Format: JSON
| Field | Field type | Required or not | Field description |
| code | string | required | Query number |
| code_type | number | option | Number type: 1=AE code (ae_code, default); 2=tracking number (tracking_number); default is 1, values other than 1/2 are treated as 1 |
| Step | Description |
|---|---|
| 1 | Find order by code + code_type (take the latest by send_date) |
| 2 | Get order ship_type, sub_ship_type, country_id, tracking number |
| 3 | Query carrier provider configs under the channel with is_show=1 |
| 4 | Match one unique record by priority: ①country+rule → ②_+rule → ③country+_ → ④_+_ (empty country_ids means all countries; empty rule means all tracking numbers; non-empty rule matches tracking number prefix, multiple rules separated by semicolon) |
| 5 | Info returns at most 1 item; empty array if no match |
$curl = curl_init();
$code = 'SFCAA0117210538YQ';
$code_type = 1; // 1=AE code (default); 2=tracking number
curl_setopt_array($curl, array(
CURLOPT_URL => "https://tracking.sfcservice.com/api/ship-code-config/search-provider-by-code?code=$code&code_type=$code_type",
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;
}
| Field | Field Type | Field description |
|---|---|---|
| code | string | Business status code: 000000=success; 000001=failure |
| message | string | Message |
| data | object/string | Object on success; may be empty string "" on failure |
| data | ||
|---|---|---|
| Field | Field Type | Field description |
| Info | array | Carrier provider configuration list (0 or 1 item) |
| total | number | Count (0 or 1) |
| Info | ||
|---|---|---|
| Field | Field Type | Field description |
| id | string | Carrier provider config primary key ID |
| ship_type_code | string | Shipping type (main channel) |
| sub_ship_type | string | Sub shipping type (sub channel) |
| provider | string | Last-mile carrier name |
| country_ids | array | Applicable country ID list, e.g. ["115"] |
| countrys_cn | string | Applicable country names in Chinese, separated by commas |
| phone | string | Contact phone |
| web | string | Official website / tracking URL |
| maintenance_specialist | string | Maintenance specialist |
| is_show | string | Whether to show: 1=show |
| rule | string | Rule |
| create_date | string | Create time, format: YYYY-MM-DD HH:mm:ss |
| code | message | Description |
|---|---|---|
| 000000 | (empty) or "没有数据!" | Request processed successfully |
| 000001 | 参数 code 不能为空 | Missing required parameter code |
| 000001 | 未找到订单 | No order matched by the number |
| 000001 | 订单渠道信息不完整 | Order exists but channel fields are missing |
| Description |
|---|
| At most 1 carrier provider config is returned per order |
| Query by order number (orders_code) is no longer supported |
| Do not insert spaces in the middle of the URL path |
| Pass the exact complete code without extra spaces |
| Recommend checking code == "000000" for business success, then check data.total / data.Info for whether config data exists |
| Field | Field type | Required or not | Field description |
| HeaderRequest | array | required | See Interface requests required parameters |
| data | array | required | See data below |
| data | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| company_name | string | required | Express Company |
| package_id | string | required | Express Tracking No |
| sfc_number | int | required | SFC Package Quantity |
| receipt_number | string | option | Quantity of Domestic Express Deliveries |
| receipt_weight | string | option | Weight of Domestic Express Deliveries KG |
| user_remark | string | option | Note |
//php sample
header('content-type:text/html;charset=utf-8');
try{
$client = new SoapClient('https://www.sfcservice.com/ishipsvc/web-service?wsdl');
$parameter = array (
//Fixed Required parameter for each interface: HeaderRequest
'HeaderRequest' => array (
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
//The names and types of the following request parameters will be different based on the request interface, and there will be multiple request parameters
'data' => array (
'company_name' => 'xxx物流有限公司', //Express Company
'package_id' => '1234567890', //Express Tracking No
'sfc_number' => '2', //SFC Package Quantity
'receipt_number' => '', //Quantity of Domestic Express Deliveries
'receipt_weight' => '2.15', //Weight of Domestic Express Deliveries
'user_remark' => '测试新建国内快递交货单',//Note
)
);
//The method name of request interface
$result = $client->createExpressWaybill($parameter);
print_r($result);
}catch(SoapFault $e){
echo $e->getMessage();
}
| obj | ||
|---|---|---|
| Field | Field Type | Field description |
| status | int | Interface status: 0 is failure, 1 success |
| msg | string | Interface success description/failure reason |
| Field | Field type | Required or not | Field description |
|---|---|---|---|
| parameter | array | required | json data |
| apiName | string | required | getReissueFee |
| HeaderRequest | array | required | See Interface requests required parameters |
| reissueFeeRequestInfo | array | required | Reissue fee request info |
| reissueFeeRequestInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| orderCode | string | required | Reissue order code |
$data = array(
'apiName' => 'getReissueFee',
'parameter' => json_encode(array(
'HeaderRequest'=>array(
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
'reissueFeeRequestInfo'=>array(
"orderCode" => "Reissue order code"
),
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://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;
| Field | Field Type | Field description |
|---|---|---|
| ask | string | "Success" is returned when the interface request succeeds, and "Error" is returned when fails |
| sysTime | string | Request time |
| orderCode | string | Reissue order code |
| msg | string | "Success" when request succeeds, failure reason when fails |
| data | array | Reissue fee info, not returned when request fails |
| data | ||
|---|---|---|
| Field | Field Type | Field description |
| total | float | Reissue total fee |
| Field | Field type | Required or not | Field description |
|---|---|---|---|
| parameter | array | required | json data |
| apiName | string | required | getOrderProblemInfo |
| HeaderRequest | array | required | See Interface requests required parameters |
| problemInfoRequestInfo | array | required | Problem info request params |
| problemInfoRequestInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| orderCode | string | required | Order code |
$data = array(
'apiName' => 'getOrderProblemInfo',
'parameter' => json_encode(array(
'HeaderRequest'=>array(
'appKey' => 'Provide the key to user key',
'token' => 'Provide the token to user token',
'userId' => 'User code'
),
'problemInfoRequestInfo'=>array(
"orderCode" => "order code"
),
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://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;
| Field | Field Type | Field description |
|---|---|---|
| ask | string | "Success" is returned when the interface request succeeds, and "Error" is returned when fails |
| sysTime | string | Request time |
| orderCode | string | Order code |
| msg | string | "Success" when request succeeds, failure reason when fails |
| data | array | Problem info list, not returned when request fails |
| data (array, each problem record contains the following fields) | ||
|---|---|---|
| Field | Field Type | Field description |
| orderCode | string | Order code |
| aeOrderNo | string | AE order number |
| customerRefNo | string | Customer reference number |
| transportType | string | Transport type |
| country | string | Destination country |
| packageType | string | Carton / Mail bag |
| customerForecastWeight | string | Customer forecast weight (kg) |
| lengthSFC | string | Length (SFC), unit cm |
| widthSFC | string | Width (SFC), unit cm |
| heightSFC | string | Height (SFC), unit cm |
| actualWeight | string | Actual weight (kg) |
| volumeWeightSFC | string | Volume weight (SFC)(kg) |
| billingWeight | string | Billing weight (kg) |
| estimatedFreight | string | Estimated freight |
| additionalFee | string | Additional fee |
| otherFee | string | Other fee |
| preBillTotalFee | string | Pre-bill total fee |
| problemType | string | Problem type |
| problemRemark | string | Problem remark |
| replyInfo | string | Reply info |
| createTime | string | Create time, e.g. 2026/7/21 19:19 |
| Field | Field type | Required or not | Field description |
|---|---|---|---|
| parameter | array | required | json data |
| apiName | string | required | addPickupBill |
| HeaderRequest | array | required | See Interface requests required parameters |
| pickupBillRequestInfo | array | required | Pickup bill request params |
| pickupBillRequestInfo | |||
|---|---|---|---|
| Field | Field type | Required or not | Field description |
| recipientState | string | required | Pickup state/province. e.g. "Guangdong" |
| recipientCity | string | required | Pickup city. e.g. "Shenzhen" |
| recipientDistrict | string | required | Pickup district. e.g. "Nanshan District" |
| recipientAddress | string | required | Pickup address, e.g. "Room 3904, Shenzhen Bay Venture Investment Bldg., No.25 Haitian 2nd Rd., Binhai Community, Yuehai Subdistrict" |
| recipientName | string | required | Pickup contact name |
| recipientPhone | string | required | Pickup phone |
| recipientBackupPhone | string | option | Pickup backup phone |
| goodsNumber | int | required | Number of packages, int |
| goodsWeight | decimal | required | Package weight KG, two decimals |
| goodsDescription | string | option | Pickup/cargo description (for the pickup driver) |
| pickupDate | string | required | Pickup date, format: yyyy-MM-dd, e.g. "2019-08-13" |
| pickupType | int | required | Pickup type, 0=single pickup(default), 1=fixed pickup |
$data = array(
'apiName' => 'addPickupBill', // replace with your apiName
'parameter' => json_encode(array(
'HeaderRequest'=>array(
'appKey' => 'SFC provided key',
'token' => 'SFC provided token',
'userId' => 'user code'
),
'pickupBillRequestInfo'=>array(
"recipientState" => "Guangdong",
"recipientCity" => "Shenzhen",
"recipientDistrict" => "Nanshan District",
"recipientAddress" => "Room 3904, Shenzhen Bay Venture Investment Bldg.",
"recipientName" => "contact name",
"recipientPhone" => "phone",
"recipientBackupPhone" => "backup phone",
"goodsNumber" => 1,
"goodsWeight" => 1.00,
"goodsDescription" => "cargo description",
"pickupDate" => "2019-08-13",
"pickupType" => 0
),
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://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;
| Field | Field type | Field description |
|---|---|---|
| ask | string | Returns 'Success' on success, 'Error' on failure |
| sysTime | string | Request time |
| customerOrderNo | string | Pickup order number |
| operatingTime | string | Operating time |
| Status | string | Y=add success, N=add failed |
| note | string | Success/failure reason |
apiName=addOrderExportDetail¶meter={"HeaderRequest":{"userId":"USER_CODE","token":"TOKEN","appKey":"APP_KEY"},"addOrderExportDetailRequestInfo":{"orderCode":"QA0200000000000","exportDetails":[{"sort":1,"exportReferenceNo":"SKU-1","exportDescriptionCn":"衣服","exportDescriptionEn":"Clothing","exportHsCode":"6109100000","exportQuantity":2,"exportUnitWeight":"0.250","exportDeclarePrice":"12.50","declareElements":"品牌|享惠"},{"sort":2,"exportReferenceNo":"SKU-2","exportDescriptionCn":"帽子","exportDescriptionEn":"Hat","exportHsCode":"6505009900","exportQuantity":1,"exportUnitWeight":"0.100","exportDeclarePrice":"5.00","declareElements":""}]}}
{"ask":"Success","message":"Success","orderCode":"QA0200000000000","aeCode":"SFCAA...","count":2}
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 ', // 公司
'recipientAddressShortCode' => 'ABCD1234 ', // 短地址
'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' => '', // 统一社会信用代码
'tradeOrderNo' => '', // 交易单号
'ecommerceCode' => '', // 电商企业代码
'ecommerceName' => '', // 电商企业名称
'productionSalesCode' => '', // 生产销售单位代码
'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', // 用途
'ASIN' => '' //产品识别码
'certifierId' => '' //认证方ID(美国CPSC)
'productId' => '' //产品ID(美国CPSC)
'versionId' => '' //版本ID(美国CPSC)
'MPID' => '' //商家产品识别码
'NSPID' => '' //非标准化制造商产品识别码
'SPID' => '' //标准化制造商产品识别码
)
)
)
))
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://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
投诉&举报






