ZA – South Africa

Fastway2 Parcel API v3

Base URL: https://api.fastway2.org/v3

Authentication: Include your API key in the X-API-Key header.
X-API-Key: fw3_live_za_8f7e3d2a1c

🚀 API reference – quick overview

Create shipment

POST /shipments

Book a parcel, get tracking number and label PDF. Supports SA addresses, HS codes, and itemised customs info.

Track parcel

POST /track

Retrieve full tracking history for up to 100 tracking numbers. Returns local SA timestamps and standardised event codes.

Get label

GET /labels/{tn}

Re‑download shipping label (PDF/PNG/ZPL). Links expire after 7 days.

Error codes

Standardised error responses with codes (1000–5002) to quickly identify issues like missing fields, auth failures, or carrier rejections.

Tracking codes

List of event codes (PENDING, ARRIVAL, DELIVERED, etc.) used in tracking details. Each maps to a specific logistics stage.

Create shipment (booking)
POST /shipments

Book a parcel with a South African carrier. Returns tracking number and label PDF link. All addresses must be in South Africa.

Request body (JSON)

FieldTypeRequiredLength (max)Description
service_codestringyes20Service type: EXPRESS, ECONOMY, OVERNIGHT_GP, etc.
reference_nostringno40Your custom reference (will appear on label).
senderobjectyesSender details (SA format).
namestringyes60Full name / company.
phonestringyes20e.g. +27 11 555 1234
emailstringno80Optional email for pickup notifications.
countrystringyes2Use "ZA".
statestringyes30Province: Gauteng, Western Cape, etc.
citystringyes40e.g. Johannesburg, Cape Town.
address_line1stringyes100Street name & number.
address_line2stringno100Complex, building, floor.
zip_codestringyes10SA postal code.
recipientobjectyesRecipient details (SA format).
namestringyes60Full name / company.
phonestringyes20e.g. +27 71 234 5678
emailstringno80For delivery notifications.
countrystringyes2Use "ZA".
statestringyes30Province: Gauteng, Western Cape, etc.
citystringyes40e.g. Johannesburg, Cape Town.
address_line1stringyes100Street name & number.
address_line2stringno100Complex, building, floor.
zip_codestringyes10SA postal code.
parcelobjectyesPhysical properties & contents.
weightnumberyes6,3kg (up to 3 decimals).
lengthintegeryes4cm
widthintegeryes4cm
heightintegeryes4cm
itemsarraynoItemised list (recommended).
[].skustringno30Your internal SKU.
[].namestringyes120Item description.
[].hs_codestringno15Harmonized System code (customs).
[].quantityintegeryes5≥1
[].valuenumberyes8,2Unit value in ZAR.

Complete request example (South African addresses)

{ "service_code": "ECONOMY", "reference_no": "ZA-REF-20250317", "sender": { "name": "Lindiwe Khumalo", "phone": "+27 11 234 5678", "email": "lindiwe@example.co.za", "country": "ZA", "state": "Gauteng", "city": "Johannesburg", "address_line1": "23 Fredman Drive", "address_line2": "Sandton", "zip_code": "2196" }, "recipient": { "name": "Thabo Ndlovu", "phone": "+27 21 555 9876", "email": "thabo@example.co.za", "country": "ZA", "state": "Western Cape", "city": "Cape Town", "address_line1": "15 Bree Street", "address_line2": "City Centre", "zip_code": "8001" }, "parcel": { "weight": 2.45, "length": 35, "width": 25, "height": 15, "items": [ { "sku": "BK-001", "name": "African Short Stories", "hs_code": "49019900", "quantity": 2, "value": 185.00 } ] } }

✅ Success (201 Created)

{ "code": 0, "message": "Shipment created", "data": { "tracking_number": "ZA782345678ZA", "label_url": "https://api.fastway2.org/v3/labels/ZA782345678ZA.pdf", "label_format": "pdf", "estimated_cost": 94.30, "shipment_id": "shp_za_abc123" } }

❌ Error example (400)

{ "code": 2001, "message": "Missing required field: recipient.name", "data": null }

Label URL expires after 7 days. Use the Get label endpoint to refresh.

Track parcel
POST /track

Retrieve tracking history for one or multiple tracking numbers (max 100 per request). The request body accepts a list of tracking numbers; response contains a map of results and any errors.

Request body (JSON)

FieldTypeRequiredDescription
tracking_numbers array of strings yes Array of tracking numbers, e.g. ["ZA782345678ZA", "ZA998877ZA"]. Max 100 items.

Response fields

FieldTypeDescription
resultsobjectDictionary mapping tracking number → tracking details (same structure as below).
errorsobjectInvalid or not found numbers with error messages.
tracking_numberstring(inside each result) The tracking number.
statusstringCurrent status code (e.g. "in_transit")
status_descstringe.g. "Out for delivery"
estimated_deliverystringYYYY-MM-DD
originstringOrigin city.
destinationstringDestination city.
tracking_detailsarrayEvents (latest first).
timestampstringUTC ISO
local_timestringSAST (Africa/Johannesburg) format: YYYY-MM-DD HH:MM:SS
locationstringFacility/city
descriptionstringEvent description
codestringStandard tracking code (see codes section)

Request example (multiple)

POST /v3/track Content-Type: application/json { "tracking_numbers": ["ZA782345678ZA", "ZA998877ZA"] }

✅ Success response (carrier removed)

{ "code": 0, "message": "OK", "data": { "results": { "ZA782345678ZA": { "tracking_number": "ZA782345678ZA", "status": "out_for_delivery", "status_desc": "Out for delivery", "estimated_delivery": "2025-03-20", "origin": "Cape Town, WC", "destination": "Johannesburg, GP", "tracking_details": [ { "timestamp": "2025-03-19T05:32:00Z", "local_time": "2025-03-19 07:32:00", "location": "Johannesburg Depot", "description": "Out for delivery", "code": "OUT_FOR_DELIVERY" } ] }, "ZA998877ZA": { "tracking_number": "ZA998877ZA", "status": "arrived", "status_desc": "Arrived at sorting centre", "estimated_delivery": "2025-03-21", "origin": "Durban", "destination": "Pretoria", "tracking_details": [] } }, "errors": {} } }

❌ Partial errors

{ "code": 0, "message": "Partial success", "data": { "results": { "ZA782345678ZA": { ... } }, "errors": { "INVALID999": "Tracking number format invalid", "ZA000000ZA": "Not found" } } }
Get shipping label
GET /labels/{trackingNumber}

Download a previously generated label. Default response is JSON with URL; add ?format=pdf to get the file directly.

Path & query

ParameterTypeDescription
trackingNumberstringe.g. ZA782345678ZA
format (opt)stringpdf (default), png, zpl

✅ JSON response

{ "code": 0, "message": "Success", "data": { "tracking_number": "ZA782345678ZA", "label_url": "https://api.fastway2.org/v3/labels/ZA782345678ZA.pdf", "label_format": "pdf", "created_at": "2025-03-17T10:30:00Z", "expires_at": "2025-03-24T10:30:00Z" } }

❌ Not found error

{ "code": 4000, "message": "Label not found / expired", "data": null }
Error codes
CodeMessageDescription
0SuccessNo error.
1000Internal server errorTry again later.
1001Service unavailableMaintenance.
2000Invalid parameterCheck field format.
2001Missing required fieldField is mandatory.
2002Parameter out of rangeValue exceeds allowed length/range.
3000Authentication failedInvalid or missing X-API-Key.
3001Permission deniedKey lacks access.
4000Resource not foundTracking number not recognised.
4001Duplicate requestIdempotency conflict (duplicate reference).
5000Business validation failedAddress unreachable / P.O. Box not allowed.
5001Carrier rejectionDownstream carrier error.
5002Quota exceededToo many requests.
Tracking event codes
CodeDescription (EN)Stage
PENDINGInformation receivedPre-transit
PICKED_UPCollected from senderIn transit
ARRIVALArrived at facilityIn transit
DEPARTUREDeparted from facilityIn transit
CUSTOMS_HOLDHeld for customs (SA customs)Customs
CUSTOMS_CLEAREDCleared by customsCustoms
OUT_FOR_DELIVERYOut for deliveryDelivery
DELIVEREDDeliveredFinal
DELIVERY_FAILEDAttempt failedException
RETURNINGReturning to senderReturn
RETURNEDReturned to senderReturned
ADDRESS_CORRECTIONAddress correctedException
HELDHeld at requestException

All local times are South African Standard Time (SAST, UTC+2).