Skip to content

Create Single Parcel

API Overview

Registers one parcel and returns the WMG tracking number assigned to it. This is the entry point of the integration: create the parcel here, then fetch its label with Get Shipping Label PDF and, when the shipment is ready, include it in an order via Create & Close Order.

The parcel is created synchronously, so the returned tracking number can be used immediately.

Request Information

  • Method: POST
  • Path: /api/parcel/create-order
  • Authentication: Bearer Token

Request Headers

FieldDescription
Content-Typeapplication/json
AuthorizationBearer <token>

Request Parameters

The request body is in JSON format and includes the following fields. All fields sit at the top level except the items, which go in the ItemListing array.

Shipment

ParameterTypeRequiredDescription
OwnerIdnumberNoYour company identifier, echoed back unchanged in the response.
ServiceCodestringNoThe service to ship under, as advised by your account manager. Omit it and your account's first configured service code is used. Must be one of the service codes enabled on your account.
TrackingNumberstringYesYour own tracking number for this parcel, as printed on the item. Maximum 50 characters. Must be unique within your account.
OriginstringYesOrigin country as a 2-letter code, e.g. SG. Exactly 2 characters.
DestinationstringYesDestination country as a 2-letter code, e.g. TH. Exactly 2 characters. Must be a destination enabled for your account.
Dep_IatastringYesDeparture airport IATA code. Exactly 3 characters.
Arr_IatastringYesArrival airport IATA code. Exactly 3 characters.
CommoditystringYesBrief description of the parcel contents.
DeclaredCurrencystringYesCurrency of the declared value, e.g. SGD. Exactly 3 characters. Must be a currency accepted for the destination.
DeclaredValuenumberYesDeclared value of the parcel. Must be 0 or greater.
QtynumberYesNumber of pieces under this tracking number. Must be greater than 0.
WeightnumberYesDeclared weight. Must be 0 or greater. Stored with up to 3 decimal places.
LengthnumberNoLength of the parcel. Must be 0 or greater. Stored with up to 2 decimal places.
WidthnumberNoWidth of the parcel. Must be 0 or greater. Stored with up to 2 decimal places.
HeightnumberNoHeight of the parcel. Must be 0 or greater. Stored with up to 2 decimal places.
IsDDPstringNoClearance mode: Y = DDP, N = DDU. Defaults to N.
MAWBNumberstringNoAir waybill number. Maximum 30 characters.
SendingAgentIDstringNoCustomer or manufacturer reference. Maximum 50 characters.
OrderNumberstringNoYour internal order reference. Maximum 50 characters.
RemarkstringNoDelivery instruction. Maximum 50 characters.
ETDstringNoEstimated departure at origin, formatted YYYY-MM-DD HH:MM:SS.
ETAstringNoEstimated arrival at destination, formatted YYYY-MM-DD HH:MM:SS. Must be later than ETD.
PickUpDatestringNoPickup time at the sender's location, formatted YYYY-MM-DD HH:MM:SS.
DeliveryDatestringNoIntended delivery time, formatted YYYY-MM-DD HH:MM:SS.

Cash on delivery

ParameterTypeRequiredDescription
IsCODstringNoY = collect on delivery, N = not COD.
CODTypeintegerNoExpected payment type: 0 = unspecified (default), 1 = Cash, 2 = Cheque.
CODCurrencystringNoCurrency to collect. Exactly 3 characters.
CODAmountnumberNoAmount to collect. Must be 0 or greater.

Singapore GST — required when Destination is SG, optional otherwise

ParameterTypeRequiredDescription
SupplierNamestringConditionalSupplier name. Maximum 100 characters.
GSTRegNostringConditionalSupplier GST registration number. Maximum 50 characters.
GSTAmountnumberConditionalGST amount paid. Must be 0 or greater.
GSTCurrencystringConditionalCurrency of the GST amount. Exactly 3 characters.
GSTStatusstringConditionalGST status. Maximum 5 characters.

Sender

ParameterTypeRequiredDescription
SenderNamestringYesSender name. Maximum 60 characters.
SenderCompanystringNoSender company. Maximum 80 characters.
SenderAddress1stringYesSender address line 1. Maximum 160 characters.
SenderAddress2stringNoSender address line 2. Maximum 100 characters.
SenderCitystringNoSender city. Maximum 50 characters.
SenderStatestringNoSender state. Maximum 50 characters.
SenderCountrystringYesSender country name. Maximum 60 characters.
SenderPostalCodestringYesSender postal code. Maximum 20 characters. Send an empty string for countries without postal codes.
SenderContactNostringNoSender contact number. Maximum 20 characters.
SenderEmailstringNoSender email. Maximum 100 characters.

Recipient

ParameterTypeRequiredDescription
RecipientNamestringYesConsignee name. Maximum 60 characters.
RecipientCompanystringNoConsignee company. Maximum 80 characters.
RecipientAddress1stringYesConsignee address line 1. Maximum 160 characters.
RecipientAddress2stringNoConsignee address line 2. Maximum 160 characters.
RecipientAddress3stringNoConsignee address line 3. Maximum 100 characters.
RecipientCitystringYesConsignee city. Maximum 50 characters.
RecipientStatestringYesConsignee state. Maximum 50 characters.
RecipientCountrystringYesConsignee country name. Maximum 60 characters.
RecipientPostalCodestringYesConsignee postal code. Maximum 20 characters. Validated against the destination's postal-code format where one applies.
RecipientContactNostringYesConsignee contact number. Maximum 20 characters.
RecipientEmailstringNoConsignee email. Maximum 100 characters.

ItemListing — array, at least one item required

ParameterTypeRequiredDescription
ItemListing[].SKUstringNoYour SKU for the item. Maximum 60 characters.
ItemListing[].ItemDescriptionstringYesDescription of the item. Maximum 300 characters.
ItemListing[].ItemWeightnumberYesWeight of the item. Must be 0 or greater.
ItemListing[].NoOfPcsnumberYesNumber of pieces of this item. Must be 0 or greater.
ItemListing[].ItemValuenumberYesValue of the item. Must be 0 or greater.
ItemListing[].ItemCurrencystringYesCurrency of the item value. Maximum 3 characters. Must be accepted for the destination.
ItemListing[].ItemOriginstringYesItem origin country as a 2-letter code. Maximum 2 characters.
ItemListing[].ItemDestinationstringYesItem destination country as a 2-letter code. Maximum 2 characters.
ItemListing[].HSCodestringYesHS code of the item. Maximum 50 characters.

Request Body Example

json
{
  "OwnerId": 111,
  "ServiceCode": "A0000",
  "TrackingNumber": "CUST0001234567",
  "Origin": "SG",
  "Destination": "TH",
  "Dep_Iata": "SIN",
  "Arr_Iata": "BKK",
  "Commodity": "Cotton T-shirts",
  "DeclaredCurrency": "SGD",
  "DeclaredValue": 45.50,
  "Qty": 1,
  "Weight": 1.250,
  "Length": 30.00,
  "Width": 20.00,
  "Height": 10.00,
  "IsDDP": "N",
  "OrderNumber": "SO-2026-000123",
  "ETD": "2026-07-30 14:25:00",
  "ETA": "2026-07-31 09:15:00",
  "SenderName": "Jane Tan",
  "SenderCompany": "Example Trading Pte Ltd",
  "SenderAddress1": "10 Anson Road #12-01",
  "SenderCity": "Singapore",
  "SenderCountry": "Singapore",
  "SenderPostalCode": "079903",
  "SenderContactNo": "+6561234567",
  "SenderEmail": "jane.tan@example.com",
  "RecipientName": "Somchai Preecha",
  "RecipientAddress1": "99 Sukhumvit Road",
  "RecipientAddress2": "Khlong Toei",
  "RecipientCity": "Bangkok",
  "RecipientState": "Bangkok",
  "RecipientCountry": "Thailand",
  "RecipientPostalCode": "10110",
  "RecipientContactNo": "+66812345678",
  "RecipientEmail": "somchai@example.com",
  "ItemListing": [
    {
      "SKU": "TS-BLK-M",
      "ItemDescription": "Cotton T-shirt, black, size M",
      "ItemWeight": 0.250,
      "NoOfPcs": 2,
      "ItemValue": 15.00,
      "ItemCurrency": "SGD",
      "ItemOrigin": "SG",
      "ItemDestination": "TH",
      "HSCode": "610910"
    },
    {
      "SKU": "TS-WHT-L",
      "ItemDescription": "Cotton T-shirt, white, size L",
      "ItemWeight": 0.750,
      "NoOfPcs": 1,
      "ItemValue": 15.50,
      "ItemCurrency": "SGD",
      "ItemOrigin": "SG",
      "ItemDestination": "TH",
      "HSCode": "610910"
    }
  ]
}

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; empty array [] on failure

Success Response

  • Status Code: 200
json
{
  "Code": 0,
  "Message": "Success",
  "Data": {
    "OwnerId": 111,
    "TrackingNo": "CUST0001234567",
    "WmgTrackingNo": "CY180000999SG",
    "DeliveryId": "",
    "DateTime": "2026-07-30 15:43:48",
    "Status": "",
    "Error": []
  }
}
FieldTypeDescription
Data.OwnerIdnumberThe OwnerId you sent, echoed back. Empty string if you did not send one.
Data.TrackingNostringYour tracking number, exactly as you sent it.
Data.WmgTrackingNostringThe WMG tracking number assigned to the parcel. Use it for labels, tracking and orders.
Data.DeliveryIdstringReserved. Always returned as an empty string.
Data.DateTimestringServer time when the parcel was created, formatted YYYY-MM-DD HH:MM:SS.
Data.StatusstringReserved. Always returned as an empty string.
Data.ErrorarrayReserved. Always returned as an empty array — failures come back with Code: 1 instead.

Error Response

  • Status Code: 200 (business logic error) or 4xx/5xx (system error)
json
{
    "Code": 1,
    "Message": "Tracking Number already exist",
    "Data": []
}

Code Reference

CodeDescription
0Success
1Failure

Example

Bash

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

curl -X POST "$BASE_URL/api/parcel/create-order" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d @parcel.json

Windows PowerShell

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

$body = @{
    ServiceCode         = "A0000"
    TrackingNumber      = "CUST0001234567"
    Origin              = "SG"
    Destination         = "TH"
    Dep_Iata            = "SIN"
    Arr_Iata            = "BKK"
    Commodity           = "Cotton T-shirts"
    DeclaredCurrency    = "SGD"
    DeclaredValue       = 45.50
    Qty                 = 1
    Weight              = 1.250
    SenderName          = "Jane Tan"
    SenderAddress1      = "10 Anson Road #12-01"
    SenderCountry       = "Singapore"
    SenderPostalCode    = "079903"
    RecipientName       = "Somchai Preecha"
    RecipientAddress1   = "99 Sukhumvit Road"
    RecipientCity       = "Bangkok"
    RecipientState      = "Bangkok"
    RecipientCountry    = "Thailand"
    RecipientPostalCode = "10110"
    RecipientContactNo  = "+66812345678"
    ItemListing         = @(
        @{
            ItemDescription = "Cotton T-shirt, black, size M"
            ItemWeight      = 0.250
            NoOfPcs         = 2
            ItemValue       = 15.00
            ItemCurrency    = "SGD"
            ItemOrigin      = "SG"
            ItemDestination = "TH"
            HSCode          = "610910"
        }
    )
} | ConvertTo-Json -Depth 5

$response = Invoke-RestMethod -Uri "$BASE_URL/api/parcel/create-order" -Method Post `
    -ContentType "application/json" -Body $body -Headers @{Authorization = "Bearer $TOKEN"}
$response.Data.WmgTrackingNo

Python

python
import requests

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

parcel = {
    "ServiceCode": "A0000",
    "TrackingNumber": "CUST0001234567",
    "Origin": "SG",
    "Destination": "TH",
    "Dep_Iata": "SIN",
    "Arr_Iata": "BKK",
    "Commodity": "Cotton T-shirts",
    "DeclaredCurrency": "SGD",
    "DeclaredValue": 45.50,
    "Qty": 1,
    "Weight": 1.250,
    "SenderName": "Jane Tan",
    "SenderAddress1": "10 Anson Road #12-01",
    "SenderCountry": "Singapore",
    "SenderPostalCode": "079903",
    "RecipientName": "Somchai Preecha",
    "RecipientAddress1": "99 Sukhumvit Road",
    "RecipientCity": "Bangkok",
    "RecipientState": "Bangkok",
    "RecipientCountry": "Thailand",
    "RecipientPostalCode": "10110",
    "RecipientContactNo": "+66812345678",
    "ItemListing": [
        {
            "ItemDescription": "Cotton T-shirt, black, size M",
            "ItemWeight": 0.250,
            "NoOfPcs": 2,
            "ItemValue": 15.00,
            "ItemCurrency": "SGD",
            "ItemOrigin": "SG",
            "ItemDestination": "TH",
            "HSCode": "610910",
        },
    ],
}

resp = requests.post(f"{BASE_URL}/api/parcel/create-order", json=parcel,
                     headers={"Authorization": f"Bearer {TOKEN}"}, timeout=30)
payload = resp.json()
print(payload["Data"]["WmgTrackingNo"])

Node.js / TypeScript

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

const parcel = {
  ServiceCode: "A0000",
  TrackingNumber: "CUST0001234567",
  Origin: "SG",
  Destination: "TH",
  Dep_Iata: "SIN",
  Arr_Iata: "BKK",
  Commodity: "Cotton T-shirts",
  DeclaredCurrency: "SGD",
  DeclaredValue: 45.50,
  Qty: 1,
  Weight: 1.250,
  SenderName: "Jane Tan",
  SenderAddress1: "10 Anson Road #12-01",
  SenderCountry: "Singapore",
  SenderPostalCode: "079903",
  RecipientName: "Somchai Preecha",
  RecipientAddress1: "99 Sukhumvit Road",
  RecipientCity: "Bangkok",
  RecipientState: "Bangkok",
  RecipientCountry: "Thailand",
  RecipientPostalCode: "10110",
  RecipientContactNo: "+66812345678",
  ItemListing: [
    {
      ItemDescription: "Cotton T-shirt, black, size M",
      ItemWeight: 0.250,
      NoOfPcs: 2,
      ItemValue: 15.00,
      ItemCurrency: "SGD",
      ItemOrigin: "SG",
      ItemDestination: "TH",
      HSCode: "610910",
    },
  ],
};

const res = await fetch(`${BASE_URL}/api/parcel/create-order`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${TOKEN}`,
  },
  body: JSON.stringify(parcel),
});
const payload = await res.json();
console.log(payload.Data.WmgTrackingNo);

PHP

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

$parcel = [
    'ServiceCode'         => 'A0000',
    'TrackingNumber'      => 'CUST0001234567',
    'Origin'              => 'SG',
    'Destination'         => 'TH',
    'Dep_Iata'            => 'SIN',
    'Arr_Iata'            => 'BKK',
    'Commodity'           => 'Cotton T-shirts',
    'DeclaredCurrency'    => 'SGD',
    'DeclaredValue'       => 45.50,
    'Qty'                 => 1,
    'Weight'              => 1.250,
    'SenderName'          => 'Jane Tan',
    'SenderAddress1'      => '10 Anson Road #12-01',
    'SenderCountry'       => 'Singapore',
    'SenderPostalCode'    => '079903',
    'RecipientName'       => 'Somchai Preecha',
    'RecipientAddress1'   => '99 Sukhumvit Road',
    'RecipientCity'       => 'Bangkok',
    'RecipientState'      => 'Bangkok',
    'RecipientCountry'    => 'Thailand',
    'RecipientPostalCode' => '10110',
    'RecipientContactNo'  => '+66812345678',
    'ItemListing'         => [
        [
            'ItemDescription' => 'Cotton T-shirt, black, size M',
            'ItemWeight'      => 0.250,
            'NoOfPcs'         => 2,
            'ItemValue'       => 15.00,
            'ItemCurrency'    => 'SGD',
            'ItemOrigin'      => 'SG',
            'ItemDestination' => 'TH',
            'HSCode'          => '610910',
        ],
    ],
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $BASE_URL . '/api/parcel/create-order');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Authorization: Bearer ' . $TOKEN,
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($parcel));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
curl_close($ch);

$payload = json_decode($response, true);
echo $payload['Data']['WmgTrackingNo'] . "\n";
?>

Notes

  • TrackingNumber must be unique within your account. Re-sending one that already exists returns Tracking Number already exist — the call is not idempotent and will not return the earlier parcel.
  • TrackingNumber and Destination are normalised to upper case before processing, so Data.WmgTrackingNo is matched against the upper-case form later. Data.TrackingNo echoes your value with its original casing.
  • Omitting ServiceCode is allowed: your account's first configured service code is used. If your account has no service code at all, the call fails with User Service Codes is Empty.
  • RecipientAddress1, RecipientAddress2 and RecipientAddress3 are concatenated for the label. Their combined length must not exceed 320 characters, independently of each field's own limit.
  • DeclaredCurrency and every ItemCurrency must be a currency accepted for the destination, otherwise the parcel is rejected. Item currency errors name the 1-based item position.
  • For destination MY, Commodity and each ItemDescription are screened for medical and pharmaceutical wording and rejected with Prohibited Item, Do Not Import!.
  • Date fields (ETD, ETA, PickUpDate, DeliveryDate) use the format YYYY-MM-DD HH:MM:SS. ISO 8601 strings with a T separator or a timezone offset are rejected.
  • ETA must be later than ETD when both are supplied.
  • The Singapore GST fields become mandatory only when Destination is SG.
  • Data.DeliveryId, Data.Status and Data.Error are reserved and always come back empty. Check Code, not Error, to decide whether the call succeeded.
  • Validation stops at the first failure, so fixing one field can reveal the next. Expect to iterate when onboarding.
  • All parameters are case-sensitive.

Error Codes

codemessageDescription
1Tracking Number cannot be emptyTrackingNumber was missing or blank.
1Tracking Number already existA parcel with that TrackingNumber already exists in your account.
1User Service Codes is EmptyServiceCode was omitted and your account has no service code configured.
1ServiceCode invalidServiceCode is not one of the service codes enabled on your account.
1The account you are using does not support destination "XX" for the time being, please contact your business manager to confirm.No parcel-size configuration exists for that destination.
1Destination not allowThe destination is configured but not permitted for your account and service.
1DeclaredCurrency not allowDeclaredCurrency is not accepted for the destination.
1Item 1 ItemCurrency(SGD) not allowThat item's ItemCurrency is not accepted for the destination. The number is the 1-based item position.
1ItemListing requiredItemListing is missing or empty.
1Prohibited Item, Do Not Import!Commodity or an ItemDescription contains medical or pharmaceutical wording for a MY destination.
1The total length of addresses 1, 2, and 3 exceeds the maximum limit of 320 charactersThe concatenated recipient address is longer than 320 characters.
1TrackingNumber requireTrackingNumber is missing or empty.
1max size of TrackingNumber must be 50TrackingNumber is longer than 50 characters.
1Destination requireDestination is missing or empty.
1size of Destination must be 2Destination is not exactly 2 characters.
1Origin requireOrigin is missing or empty.
1size of Origin must be 2Origin is not exactly 2 characters.
1Commodity requireCommodity is missing or empty.
1DeclaredCurrency requireDeclaredCurrency is missing or empty.
1size of DeclaredCurrency must be 3DeclaredCurrency is not exactly 3 characters.
1DeclaredValue requireDeclaredValue is missing or empty.
1Qty requireQty is missing or empty.
1Weight requireWeight is missing or empty.
1IsDDP must be in Y,NIsDDP is neither Y nor N.
1IsCOD must be in Y,NIsCOD is neither Y nor N.
1CODType must be in 0,1,2CODType is not 0, 1 or 2.
1Dep_Iata requireDep_Iata is missing or empty.
1size of Dep_Iata must be 3Dep_Iata is not exactly 3 characters.
1Arr_Iata requireArr_Iata is missing or empty.
1size of Arr_Iata must be 3Arr_Iata is not exactly 3 characters.
1ETA range is incorrectETA is not later than ETD.
1SupplierName requireDestination is SG and SupplierName is missing. The same applies to GSTRegNo, GSTAmount, GSTCurrency and GSTStatus.
1SenderName requireSenderName is missing or empty. The same pattern applies to every other required sender, recipient and item field.
1max size of SenderName must be 60The field is longer than its documented maximum. The same pattern applies to every length-limited field.
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.

Field-level validation messages follow the pattern <FieldName> require for missing values and max size of <FieldName> must be <n> / size of <FieldName> must be <n> for length problems, using the exact field name from the tables above.