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
| Field | Description |
|---|---|
| Authorization | Bearer <token> |
Request Parameters
The request includes the following query parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| ID | string | Yes | The 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
| Field | Type | Description |
|---|---|---|
| Code | integer | 0 = success; non-zero = failure |
| Message | string | Human-readable result |
| Data | object | Payload |
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": ""
}
]
}
}| Field | Type | Description |
|---|---|---|
| Data.TrackingNumber | string | The WMG tracking number that was queried. |
| Data.LastStatus | string | Status code of the most recent activity. Empty if the parcel has no publishable status yet. |
| Data.LastStatusDateTime | string | Timestamp of the most recent activity, ISO 8601 with offset (+08:00). |
| Data.Activities | array | Tracking history, most recent first. |
| Data.Activities[].StatusDateTime | string | Timestamp of the activity, ISO 8601 with offset (+08:00). |
| Data.Activities[].StatusCode | string | Status code — see Delivery Status. |
| Data.Activities[].StatusDesc | string | Description of the status code. |
| Data.Activities[].Remarks | string | Additional remark recorded with the activity; empty when there is none. |
| Data.Activities[].ReceiveBy | string | Reserved. 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)"
}
}| Field | Type | Description |
|---|---|---|
| Data.TrackingNumber | string | The tracking number that was queried. |
| Data.Remarks | string | Reason the lookup failed. |
Code Reference
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Failure |
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 10Python
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.
Activitiesis ordered most recent first, andLastStatus/LastStatusDateTimealways mirror its first entry.- Branch your logic on
StatusCode, never onStatusDesc. The description text can differ between carriers and account configurations while the code stays stable. - Internal-only status records are filtered out, so
Activitiescan be shorter than the parcel's full internal history — and a newly created parcel can legitimately return an emptyActivitiesarray with an emptyLastStatus. - A parcel that does not exist in your account is not an HTTP error: it returns
Code: 1withMessage: "Fail"andData.Remarks: "No Record(s)". Note thatDatais an object here, not the empty array returned by other endpoints on failure. IDmust 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
| code | message | Description |
|---|---|---|
1 | Fail | No parcel in your account matches ID. Data.Remarks contains No Record(s). |
1 | ID require | ID is missing or empty. |
1 | min size of ID must be 8 | ID is shorter than 8 characters. |
1 | max size of ID must be 50 | ID is longer than 50 characters. |
1 | Error encountered, please contact tech@wmg-group.com with screenshot of error page for resolution. | Unexpected server error. |
1003 | Token error | The token is missing, expired, or superseded by a newer login. Call Get Token again. |