Developer Reference

TGG EXPRESS Parcel API
built for TGG Express & last-mile delivery

A standard HTTP API for e-commerce platforms, warehouses and logistics systems. It covers the full journey from booking and label generation to live tracking — supporting China / Hong Kong → Nigeria (NG) TGG Express routes as well as domestic Nigerian deliveries.

Sandbox
https://sandbox-api.tggexpress.com
Production
https://api.tggexpress.com
01

Overview

Three endpoints cover the complete order-to-door workflow. All requests and responses are JSON with UTF-8 encoding.

POST /shipments Create a shipment

Submit a new shipping order. Returns a tracking_number and a label download URL. Supports CN / HK → NG TGG Express scenarios.

POST /track Batch tracking

Query up to 100 tracking numbers in a single call. Returns Nigerian local timestamps and standardised event codes.

GET /labels/{trackingNumber} Re-download label

Re-retrieve an already generated shipping label PDF. The original link expires after 7 days — use this endpoint to refresh it.

02

Authentication & conventions

Every request must include an API key in the request header. The server uses the key to determine environment and access scope.

🔑

X-API-Key header

Include your API key in the header of every HTTP request. Use the sandbox key for integration testing.

X-API-Key: tgg_sandbox_xxxxxxxxxx

Request conventions

ItemValueNotes
Content-Typeapplication/jsonAll request bodies are JSON except label download
Acceptapplication/jsonResponses default to JSON; label endpoint may return application/pdf
X-API-KeystringRequired. Used for identity and rate limiting
X-Request-IduuidOptional. Recommended for tracing requests end-to-end
CharsetUTF-8All fields are UTF-8 encoded
Time formatISO 8601UTC timestamps end with Z; local times use YYYY-MM-DD HH:mm:ss
i
The default request timeout is 15 seconds; the server closes the connection afterwards. When calling /shipments, make sure your client handles idempotency correctly (use reference_no for de-duplication).
03

Create shipment

Submit a shipping order containing sender, recipient, parcel physical properties and itemised contents.

POST /shipments Create shipment

On success, the response contains the tracking number and a label download URL. The label URL remains valid for 7 days; afterwards call /labels/{trackingNumber} to refresh it.

Request body fields

Field Type Required Max length Description
service_codestringrequired20Fixed value 1575, representing the standard TGG Express service.
reference_nostringrequired40Merchant-side unique business number, used for reconciliation and idempotency.
inco_term_codestringrequired3Incoterms code, e.g. DDP (Delivered Duty Paid).
specialInstruction1stringoptional255Special handling instructions, e.g. "Fragile", "Keep upright".
sender — sender (CN / HK)
namestringrequired60Full name or company name.
phonestringrequired20Include country code, e.g. +86 20 9123 4567.
emailstringoptional80Email address for pickup notifications.
countrystringrequired2ISO 3166-1 alpha-2, e.g. CN.
statestringrequired30Province / state, e.g. Guangdong.
suburbstringrequired40City or district, e.g. Guangzhou.
address_line_1stringrequired200Street address, building, floor.
address_line_2stringoptional200Additional address details (room / unit number).
postcodestringoptional10Postal code if any.
recipient — recipient (NG)
namestringrequired60Full name or company name.
phonestringrequired20e.g. +234 803 123 4567.
emailstringrequired80Used for delivery notifications; mandatory for the NG route.
countrystringrequired2Fixed value NG.
statestringrequired30State, e.g. Lagos, FCT, Kano.
suburbstringrequired40e.g. Victoria Island, Lekki.
address_line_1stringrequired200Street address, building, floor.
address_line_2stringoptional200Additional address details.
postcodestringrequired10Nigerian 6-digit postal code.
parcel — parcel information
weightnumberrequired6,3Total parcel weight in kg, up to 3 decimals.
lengthintegerrequired4Length in cm.
widthintegerrequired4Width in cm.
heightintegerrequired4Height in cm.
parcel.items[] — item details (array, at least one item)
skustringrequired30Merchant internal SKU.
quantitynumberrequired4Item quantity.
namestringrequired120Item name / English description.
hs_codestringrequired10Harmonised System (HS) code.
currencystringrequired3ISO currency code, e.g. NGN, USD.
valuenumberrequired8,2Declared unit value.
sku_weightnumberrequired6,3Weight of a single SKU.
sku_weight_unitstringrequired5kg or g; defaults to kg.
image_urlstringrequired500Product image URL (recommended).
product_urlstringrequired500Product page URL (recommended).

Request example

POST /shipments
{
  "service_code": "1575",
  "reference_no": "TGG-2026-00123",
  "inco_term_code": "DDP",
  "specialInstruction1": "Fragile - handle with care",
  "sender": {
    "name": "Li Wei",
    "phone": "+86 20 9123 4567",
    "email": "li.wei@example.cn",
    "country": "CN",
    "state": "Guangdong",
    "suburb": "Guangzhou",
    "address_line_1": "123 Tianhe Road",
    "address_line_2": "Unit 1802",
    "postcode": "510620"
  },
  "recipient": {
    "name": "Chinedu Okafor",
    "phone": "+234 803 123 4567",
    "email": "chinedu@example.ng",
    "country": "NG",
    "state": "Lagos",
    "suburb": "Victoria Island",
    "address_line_1": "15 Adeola Odeku Street",
    "address_line_2": "",
    "postcode": "101241"
  },
  "parcel": {
    "weight": 2.45,
    "length": 35,
    "width": 25,
    "height": 15,
    "items": [
      {
        "sku": "BK-001",
        "quantity": 1,
        "name": "African Short Stories",
        "hs_code": "49019900",
        "currency": "NGN",
        "value": 18500.00,
        "sku_weight": 0.45,
        "sku_weight_unit": "kg",
        "image_url": "https://example.com/images/book1.jpg",
        "product_url": "https://example.com/product/49019900"
      }
    ]
  }
}

Response examples

✓ Success
application/json
{
  "code": "TGG-OK-000",
  "message": "Shipment created",
  "data": {
    "tracking_number": "TGG782345678NG",
    "label_url": "https://api.tggexpress.com/labels/TGG782345678NG.pdf",
    "label_format": "pdf",
    "reference_no": "TGG-2026-00123"
  }
}
✗ Bad Request
application/json
{
  "code": "TGG-PAR-002",
  "message": "Missing required field: items[0].currency",
  "data": null
}
⚠
The label download URL is valid for 7 days. Once expired, call GET /labels/{trackingNumber} to refresh the link — you don't need to re-create the shipment.
04

Track parcel

Query up to 100 tracking numbers per request. Returns a complete event list plus a current status summary.

POST /track Track parcels

The response is split into results (successful lookups) and errors (invalid or not found). Partial success still returns HTTP 200.

Request body fields

FieldTypeRequiredDescription
tracking_numbers string[] required Array of tracking numbers, up to 100 items, e.g. ["TGG782345678NG"].

Response fields

FieldTypeDescription
resultsobjectMap of tracking number → tracking details object.
errorsobjectMap of invalid / not found numbers → error reason.
tracking_numberstringThe tracking number.
latest_status_codestringLatest event code, e.g. del_09.
latest_status_descriptionstringHuman-readable description of the latest status.
latest_extended_descriptionstringExtra information about the latest status.
latest_local_timestringLocal Nigerian time (WAT) of the latest event.
latest_locationstringLocation of the latest event.
originstringOrigin city.
destinationstringDestination city.
tracking_detailsarrayList of events, ordered latest first.
timestampstringUTC ISO 8601 timestamp.
local_timestringLocal WAT time YYYY-MM-DD HH:mm:ss.
locationstringFacility / city where the event occurred.
status_codestringEvent code (see event codes).
status_descriptionstringDescription of the event.
extended_descriptionstringOptional additional information about the event.

Request example

POST /track
{
  "tracking_numbers": ["TGG782345678NG", "TGG998877NG"]
}

Success response

200 OK · application/json
{
  "code": "TGG-OK-000",
  "message": "OK",
  "data": {
    "results": {
      "TGG782345678NG": {
        "tracking_number": "TGG782345678NG",
        "latest_status_code": "del_09",
        "latest_status_description": "Delivery Completed",
        "latest_extended_description": "Parcel handed to resident and signed",
        "latest_local_time": "2026-04-02 15:20:00",
        "latest_location": "Lagos",
        "origin": "Hong Kong",
        "destination": "Lagos, LA",
        "tracking_details": [
          {
            "timestamp": "2026-04-02T14:20:00Z",
            "local_time": "2026-04-02 15:20:00",
            "location": "Lagos",
            "status_code": "del_09",
            "status_description": "Delivery Completed",
            "extended_description": "Proof of delivery signed by recipient"
          },
          {
            "timestamp": "2026-04-02T08:15:00Z",
            "local_time": "2026-04-02 09:15:00",
            "location": "Lagos Depot",
            "status_code": "ofd_01",
            "status_description": "Out for Delivery",
            "extended_description": "Driver assigned to route 12B"
          },
          {
            "timestamp": "2026-04-01T22:00:00Z",
            "local_time": "2026-04-01 23:00:00",
            "location": "Lagos Hub",
            "status_code": "dep_01",
            "status_description": "Arrived at destination depot",
            "extended_description": "Parcel sorted for delivery"
          },
          {
            "timestamp": "2026-03-30T10:45:00Z",
            "local_time": "2026-03-30 11:45:00",
            "location": "Lagos Customs",
            "status_code": "ccl_01",
            "status_description": "Released from Customs",
            "extended_description": "Customs clearance completed, duties paid"
          },
          {
            "timestamp": "2026-03-27T10:30:00Z",
            "local_time": "2026-03-27 18:30:00",
            "location": "Hong Kong Hub",
            "status_code": "pro_01",
            "status_description": "Parcel Check In",
            "extended_description": "Parcel accepted at origin facility"
          },
          {
            "timestamp": "2026-03-26T08:00:00Z",
            "local_time": "2026-03-26 16:00:00",
            "location": "Hong Kong",
            "status_code": "cre_01",
            "status_description": "We have been notified of your order.",
            "extended_description": "Shipping label created, awaiting pickup"
          }
        ]
      }
    },
    "errors": {}
  }
}

Partial success response

Partial success
{
  "code": "TGG-OK-000",
  "message": "Partial success",
  "data": {
    "results": {
      "TGG782345678NG": { /* full tracking object */ }
    },
    "errors": {
      "INVALID999": "Tracking number format invalid",
      "TGG000000NG": "Not found"
    }
  }
}
05

Get label

Re-retrieve an already generated label file, either as JSON with a download URL or as a direct PDF stream.

GET /labels/{trackingNumber} Get label

By default returns JSON containing the download link; add ?format=pdf to receive the PDF file stream directly.

Path & query parameters

ParameterLocationTypeDescription
trackingNumberpathstringTracking number, e.g. TGG782345678NG.
formatquerystringOptional. When set to pdf, returns the PDF file directly; otherwise returns JSON.

Response examples

✓ Success (JSON)
application/json
{
  "code": "TGG-OK-000",
  "message": "Success",
  "data": {
    "tracking_number": "TGG782345678NG",
    "label_url": "https://api.tggexpress.com/labels/TGG782345678NG.pdf",
    "label_format": "pdf",
    "created_at": "2026-04-01T10:30:00Z",
    "expires_at": "2026-04-08T10:30:00Z"
  }
}
✗ Not Found
application/json
{
  "code": "TGG-RES-404",
  "message": "Label not found / expired",
  "data": null
}
i
The label file defaults to A6 (100 × 150 mm). To receive an A4 version, append &size=a4 to the query string.
06

Error codes

All error responses follow a unified structure: code is an alphanumeric business code (TGG-XXX-000), message a human-readable description, and data is usually null.

i
Codes use the format TGG-{CATEGORY}-{SEQ}. Category prefixes: OK success, SRV server, PAR parameter, AUTH authentication, RES resource, BIZ business rule, CAR carrier, QTA quota.
CodeMessageMeaning & troubleshooting
TGG-OK-000SuccessRequest succeeded with no error.
TGG-SRV-001Internal server errorServer-side exception. Retry later or contact support.
TGG-SRV-002Service unavailableService under maintenance; usually accompanied by a Retry-After header.
TGG-PAR-001Invalid parameterField format error. Check the type and allowed values.
TGG-PAR-002Missing required fieldA required field is missing; the error message points to the exact field path.
TGG-PAR-003Parameter out of rangeA field exceeds its length or numeric range.
TGG-AUTH-001Authentication failedX-API-Key is missing or invalid.
TGG-AUTH-002Permission deniedThe key is not authorised to access the resource or environment.
TGG-RES-404Resource not foundTracking number does not exist, or the label has expired.
TGG-RES-409Duplicate requestIdempotency conflict; reference_no already exists.
TGG-BIZ-001Business validation failedAddress unreachable, P.O. Box not allowed, or similar business rule failure.
TGG-CAR-001Carrier rejectionThe downstream carrier refused the shipment. Check cargo attributes.
TGG-QTA-001Quota exceededRate limit reached. Reduce QPS or request a quota increase.
07

Tracking event codes

Every event uses a 3-letter prefix plus a 2-digit sequence. The prefix identifies the stage, making it easy for front-ends to map icons and labels.

i
All local_time values are in West Africa Time (WAT, UTC+1).
Created 2 codes
CodeDescription
cre_01We have been notified of your order.
cre_02Collection Assigned
Processed 2 codes
CodeDescription
pro_01Parcel Check In
pro_04Shipment Added in Transit Bag
Arrived 1 code
CodeDescription
arr_01Flight Partial Arrived
Under clearance 4 codes
CodeDescription
unc_01Parcel Collected from Airport
unc_02Your parcel has been stopped at customs.
unc_03Your parcel is currently with customs.
unc_04Customs rejected the shipment.
Cleared 3 codes
CodeDescription
ccl_01Released from Customs
ccl_02Customs Invoice Paid
cus_03Released from Security
Sorted to destination 3 codes
CodeDescription
sor_01In Transit
sor_02Collected
sor_03Ready For Dispatch
Reached destination depot 2 codes
CodeDescription
dep_01Arrived at destination depot
dep_02Pickup Point Depot
Out for delivery 1 code
CodeDescription
ofd_01Out for Delivery
Transit exception 4 codes
CodeDescription
tex_01Delayed Parcel
tex_02Misdirected
tex_03Damaged
tex_04Parcel Intercepted
Delivery exception 13 codes
CodeDescription
exe_01Protest Action
exe_02Premises closed on arrival
exe_03Traffic Congestion
exe_04Out of Time
exe_05Calling Card Left
exe_06Bad Weather
exe_07Problem Freight
exe_08Address Unclear
exe_09Consignee on Holiday
exe_10Rejected Delivery
exe_11Cannot Locate Receiver
exe_12Change of Address
exe_13Out of Regional Boundaries
Delivered 10 codes
CodeDescription
del_01Signature Obtained
del_02Back door Delivery
del_03Left in Letterbox
del_04Contactless Signature
del_05Left in Safe Place
del_06Manual POD
del_07Left As Instructed
del_08Left with Neighbour
del_09Delivery Completed
del_10Parcel Collected by Customer
Claim · Cancelled · Returned · Abandoned 6 codes
CodeDescription
cla_01Insurance Claim
cla_02Hijacking Claim
cla_03Damaged Claim
can_01Cancelled Shipment
ret_01Return to Sender
aba_01Abandoned Shipment