Docs Menu

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
<?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:

JSON
{
  "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#

SymptomCauseSolution
Returns 2002 signature errorJSON serialization whitespace differsFollow the Auth doc and assemble the string exactly
Returns 2003 timestamp expiredServer clock not syncedRun ntpdate or enable system NTP sync
Returns 2005 IP not in whitelistOutbound IP missing from whitelistAdd the IP under Console → App Management

White-label display and distribution rights#

Unlimited plans include white-label display on your own branded platform. The three usage scenarios have different authorization requirements; credit plans and separate written permissions follow their respective terms.

Your own branded platform

Included with unlimited plans

Display API data covered by the plan on websites, applications or customer interfaces under the subscriber’s own brand, allowing your customers to search rates, prepare quotations or submit bookings. Awice branding and source attribution may be omitted while the unlimited plan is active, at no additional licensing charge.

Partner companies’ websites and systems

Separate written authorization

Embedding data or search and booking tools into independent forwarders’ or other companies’ websites, apps, TMS platforms or business systems under their respective brands requires distribution authorization. An unlimited plan does not automatically grant these rights.

Redistribution through your own API

Separate written authorization

Packaging our data or API capabilities into your own API for access by other companies or software, resale or SaaS distribution requires API distribution authorization. Even when distribution is authorized, Awice AppSecrets must not be published or shared.

White-label rights follow the activation, expiry or termination of the relevant unlimited plan and cover only the APIs included in that plan. If it expires without renewal or another valid written authorization, restore source attribution or stop white-label display.

Without an active unlimited plan or another written waiver, external displays must clearly identify “Data source: Awice Logistics”. Data must not be claimed as independently collected or original.

Unlimited refers to the plan’s call allowance during its active term. Existing signing, authentication, rate limits, concurrency limits, data access controls and order-confirmation rules still apply. Removing interface branding does not change data ownership or the actual parties named in transport documents and contracts.

Separate written authorizations apply within their confirmed scope and term. Own-platform white-label rights do not grant unrestricted downstream distribution.

Discuss partner or API distribution rights