Skip to content

Query Single Status

API Overview

Returns the current status and the full tracking history of one parcel, identified by its WMG tracking number. Use it to drive a per-parcel tracking view; use Query Multiple Status to poll many parcels at once.

Request Information

  • Method: GET
  • Path: /api/status/track
  • Authentication: Bearer Token

Request Headers

FieldDescription
AuthorizationBearer <token>

Request Parameters

The request includes the following query parameters:

NameTypeRequiredDescription
IDstringYesThe WMG tracking number of the parcel. Between 8 and 50 characters.

Authentication

This endpoint uses Bearer token authentication.

Obtain a token from Get Token and send it as Authorization: Bearer <Token>.

Response Information

The response is in JSON format.

Response Format

FieldTypeDescription
Codeinteger0 = success; non-zero = failure
MessagestringHuman-readable result
DataobjectPayload

Success Response

  • Status Code: 200
json
{
  "Code": 0,
  "Message": "Success",
  "Data": {
    "TrackingNumber": "C240129142515376136497",
    "LastStatus": "DR_DR",
    "LastStatusDateTime": "2024-01-29T14:27:09+08:00",
    "Activities": [
      {
        "StatusDateTime": "2024-01-29T14:27:09+08:00",
        "StatusCode": "DR_DR",
        "StatusDesc": "Data Received via API",
        "Remarks": "",
        "ReceiveBy": ""
      }
    ]
  }
}
FieldTypeDescription
Data.TrackingNumberstringThe WMG tracking number that was queried.
Data.LastStatusstringStatus code of the most recent activity. Empty if the parcel has no publishable status yet.
Data.LastStatusDateTimestringTimestamp of the most recent activity, ISO 8601 with offset (+08:00).
Data.ActivitiesarrayTracking history, most recent first.
Data.Activities[].StatusDateTimestringTimestamp of the activity, ISO 8601 with offset (+08:00).
Data.Activities[].StatusCodestringStatus code — see Delivery Status.
Data.Activities[].StatusDescstringDescription of the status code.
Data.Activities[].RemarksstringAdditional remark recorded with the activity; empty when there is none.
Data.Activities[].ReceiveBystringReserved. Always returned as an empty string.

Error Response

  • Status Code: 200 (business logic error) or 4xx/5xx (system error)
json
{
  "Code": 1,
  "Message": "Fail",
  "Data": {
    "TrackingNumber": "C240129142515376136497a",
    "Remarks": "No Record(s)"
  }
}
FieldTypeDescription
Data.TrackingNumberstringThe tracking number that was queried.
Data.RemarksstringReason the lookup failed.

Code Reference

CodeDescription
0Success
1Failure

Example

Bash

bash
BASE_URL="https://api.postal.test.wmgdelivery.com"
TOKEN="your_access_token"

curl -G "$BASE_URL/api/status/track" \
  --data-urlencode "ID=C240129142515376136497" \
  -H "Authorization: Bearer $TOKEN"

Windows PowerShell

powershell
$BASE_URL = "https://api.postal.test.wmgdelivery.com"
$TOKEN    = "your_access_token"
$ID       = "C240129142515376136497"

$response = Invoke-RestMethod -Uri "$BASE_URL/api/status/track?ID=$ID" -Method Get `
    -Headers @{Authorization = "Bearer $TOKEN"}
$response | ConvertTo-Json -Depth 10

Python

python
import requests

BASE_URL = "https://api.postal.test.wmgdelivery.com"
TOKEN    = "your_access_token"

resp = requests.get(f"{BASE_URL}/api/status/track",
                    params={"ID": "C240129142515376136497"},
                    headers={"Authorization": f"Bearer {TOKEN}"}, timeout=10)
print(resp.json())

Node.js / TypeScript

typescript
const BASE_URL = "https://api.postal.test.wmgdelivery.com";
const TOKEN = "your_access_token";

const url = new URL(`${BASE_URL}/api/status/track`);
url.searchParams.set("ID", "C240129142515376136497");

const res = await fetch(url, {headers: {"Authorization": `Bearer ${TOKEN}`}});
console.log(await res.json());

PHP

php
<?php
$BASE_URL = 'https://api.postal.test.wmgdelivery.com';
$TOKEN    = 'your_access_token';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $BASE_URL . '/api/status/track?' . http_build_query([
    'ID' => 'C240129142515376136497',
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $TOKEN]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$response = curl_exec($ch);
curl_close($ch);

echo json_encode(json_decode($response, true), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) . "\n";
?>

Notes

  • All timestamps are Singapore time (UTC+08:00) and are returned in ISO 8601 form with the offset included.
  • Activities is ordered most recent first, and LastStatus / LastStatusDateTime always mirror its first entry.
  • Branch your logic on StatusCode, never on StatusDesc. The description text can differ between carriers and account configurations while the code stays stable.
  • Internal-only status records are filtered out, so Activities can be shorter than the parcel's full internal history — and a newly created parcel can legitimately return an empty Activities array with an empty LastStatus.
  • A parcel that does not exist in your account is not an HTTP error: it returns Code: 1 with Message: "Fail" and Data.Remarks: "No Record(s)". Note that Data is an object here, not the empty array returned by other endpoints on failure.
  • ID must be the WMG tracking number and is matched exactly — it is not normalised to upper case, so send it exactly as issued.
  • Only parcels belonging to the authenticated account are visible.

Error Codes

codemessageDescription
1FailNo parcel in your account matches ID. Data.Remarks contains No Record(s).
1ID requireID is missing or empty.
1min size of ID must be 8ID is shorter than 8 characters.
1max size of ID must be 50ID is longer than 50 characters.
1Error encountered, please contact tech@wmg-group.com with screenshot of error page for resolution.Unexpected server error.
1003Token errorThe token is missing, expired, or superseded by a newer login. Call Get Token again.