Quick Start
This page walks you through your first successful call in 5 minutes. From signing up to receiving a real freight quote, only three steps.
Step 1: Sign up#
Open 5688.cn home and click "Sign up" at the top right. Use your mobile number to register. After registration, go to the Developer Console to claim the free 100-credit trial pack.
Tip:The trial pack and credit plans are available right after sign-up — no identity verification needed. Only monthly / yearly unlimited plans require identity verification (company or individual) before purchase.
Step 2: Create an app and get AppKey / AppSecret#
Open Developer Console → App Management and click "Create App".
- Enter an app name (only visible to you, used to distinguish multiple apps)
- Select an initial plan (we recommend starting with the free 100-credit trial)
- We strongly recommend configuring an IP whitelist right away (multiple IPs separated by commas)
- After creation, the page shows your AppKey and AppSecret; the AppSecret is shown only once, copy it immediately.
⚠️ Security warning:Never push your AppSecret to public repos like GitHub / GitLab, and never embed it in frontend JS. If leaked, reset the Secret in the console immediately. Store it in server-side environment variables or a config center.
Step 3: Copy the sample and call the API#
Below is a complete PHP example. Replace $appKey and $appSecret and run it.
<?php
// Ocean FCL Rate Query - Complete PHP Sample
$appKey = 'AK_xxxxxxxxxxxxxxxx'; // (1) Replace with your AppKey
$appSecret = 'SK_yyyyyyyyyyyyyyyyyy'; // (2) Replace with your AppSecret
// pol / pod accept either 5-letter standard code, Chinese, or English. Pick one form.
// standard code 'CNSHA' / 'USLSA' fastest, recommended for production
// Chinese '上海' / '洛杉矶' fuzzy match; same-name ports return all rates automatically
// English 'shanghai' / 'los angeles'
$body = json_encode([
'pol' => 'CNSHA', // Port of Loading (also accepts '上海' or 'shanghai')
'pod' => 'USLSA', // Port of Discharge (also accepts '洛杉矶' or 'los angeles')
'carrier' => 'MSK', // Carrier (optional)
]);
$ts = time(); // Unix timestamp (seconds)
$nonce = bin2hex(random_bytes(8)); // 16-byte random nonce
$path = '/openapi/v1/freight/fcl/search';
// Signature: HMAC-SHA256( METHOD + "\n" + PATH + "\n" + TS + "\n" + NONCE + "\n" + md5(BODY) )
$message = "POST\n{$path}\n{$ts}\n{$nonce}\n" . md5($body);
$sign = hash_hmac('sha256', $message, $appSecret);
$ch = curl_init('https://www.5688.cn/api' . $path);
curl_setopt_array($ch, [
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_TIMEOUT => 10,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
"X-Awice-AppKey: {$appKey}",
"X-Awice-Timestamp: {$ts}",
"X-Awice-Nonce: {$nonce}",
"X-Awice-Signature: {$sign}",
],
]);
$resp = curl_exec($ch);
curl_close($ch);
$result = json_decode($resp, true);
print_r($result);Expected Response#
On success, you receive a JSON response similar to the following:
{
"code": 0,
"msg": "success",
"data": {
"resolved": {
"pol": { "code": "CNSHA", "name": "Shanghai" },
"pod": { "code": "USLSA", "name": "Los Angeles" }
},
"total": 12,
"page": 1,
"limit": 20,
"list": [
{
"carrier": "MSK",
"carrier_name": "MAERSK",
"container_20gp": 1850,
"container_40gp": 2950,
"container_40hq": 2980,
"currency": "USD",
"transit": 18,
"valid_from": "2026-05-01",
"valid_to": "2026-05-31",
"update_time": 1746086400
}
]
},
"credit_used": 1,
"credit_balance": 9499
}Common first-call issues#
| Symptom | Cause | Solution |
|---|---|---|
| Returns 2002 signature error | JSON serialization whitespace differs | Follow the Auth doc and assemble the string exactly |
| Returns 2003 timestamp expired | Server clock not synced | Run ntpdate or enable system NTP sync |
| Returns 2005 IP not in whitelist | Outbound IP missing from whitelist | Add the IP under Console → App Management |