Skip to main content

History AWB Order

Overview

Endpoint provides a detailed view of a shipment’s delivery history by tracking the status updates based on its AWB (Air Waybill) number. This endpoint acts as a bridge between your system and the courier’s tracking services, offering up-to-date delivery events that help merchants and customers stay informed about their package’s journey.

Tracking transparency is crucial for both operational teams and end-users. With this endpoint, businesses can monitor every logistical step — from pickup confirmation to successful delivery — improving delivery reliability, building trust with customers, and streamlining after-sales support in case of delays or delivery issues.

Whether you’re managing hundreds of daily shipments or offering individual tracking to customers via your application, this endpoint empowers your system to deliver real-time shipping visibility.

Key Feature

✅ Real-Time Delivery Status Updates : Retrieves real-time tracking history from the courier’s system using a valid AWB number. Includes timestamps, status codes, and detailed descriptions.
✅ Courier-Agnostic Integration : Automatically fetches tracking data from the relevant courier, depending on the logistics provider used in the original order.
✅ Structured Timeline : Returns a chronological series of events showing the full lifecycle of a package, from pickup, transit, attempted deliveries, to final delivery or return.
✅ Supports Customer Service Workflows : Can be used to proactively inform customers about delays, resolve complaints faster, and improve support ticket handling.
✅ Enables End-to-End Shipment Monitoring : Useful for operational dashboards or customer-facing tracking pages, allowing both internal teams and buyers to follow shipment progress.
✅ Compatible with Label-Generated Shipments : Designed to work in tandem with the POST /label-order process, ensuring traceability for each AWB assigned via the Komerce platform.

How it Works

  1. Order Label is Generated : When an order is created and labeled via POST /label-order, an AWB number is returned from the courier.
  2. Tracking Request Made : You send a GET request to the /history-airwaybill endpoint with the AWB number included as a query parameter.
  3. System Connects with Courier : Komerce routes the request to the relevant courier’s tracking system and retrieves the complete tracking log for that shipment.
  4. Receive Status Timeline : The API responds with a list of historical status updates, each containing a date-time, status code, and description of the event.
  5. Integrate with UI or Operations : The returned data can be displayed on merchant dashboards, customer tracking pages, or used by the operations team to follow up on shipments or raise support tickets.
  6. Refresh As Needed : This endpoint can be polled at intervals to refresh delivery status until the package reaches a final state (delivered, returned, canceled, etc.).

Request Body

curl --location 'https://api-sandbox.collaborator.komerce.id/order/api/v1/orders/history-airway-bill?shipping={{courier}}&airway_bill=KOMERKOMXXXXXXXXXXXXXXXXX' \
--header 'x-api-key: inputapikey'

Query Parameter

Headers

KeyTypeDescription
x-api-key*stringthis Value contain an secret APIKEY identic for Shipping API.

Query Param

KeyTypeDescription
shipping*stringName of the courier used for delivery of package.
airway_bill*stringAWB number that will be checked for package travel history.
danger

For each header and parameter that has a * sign, it is a parameter that must be Required when making a request, otherwise there will be a system error that will warn the user regarding the request made.

Response

Response Structure

KeyValue (Description)
meta.messageMessage indicating the result of the API request.
meta.codeHTTP status code representing the request status.
meta.statusStatus of the API response (e.g., success or error).
data.airway_billDisplay the AWB information that is being searched for package travel history.
data.last_statusDisplay the delivery status information of the AWB that is being searched for travel history.
data.history[].descDisplay descriptions related to AWB's travel history
data.history[].dateDisplay package travel history time information
data.history[].codeDisplay status code for travel history information
data.history[].statusDisplay general status for travel history

Success Respons for History AWB Order

{
"meta": {
"message": "success get data",
"code": 200,
"status": "success"
},
"data": {
"airway_bill": "KOMERKOMXXXXXXXXXXXXXXXXX",
"last_status": "{{ last status }}",
"history": [
{
"desc": "{{ description }}",
"date": "{{ YYYY-MM-DD HH:MM:SS }}",
"code": "{{ code }}",
"status": "{{ status }}"
}
]
}
}

Error Respons for History AWB Order

{
"meta": {
"message": "invalid cnote/airway bill",
"code": 400,
"status": "error"
},
"data": {}
}

Error Code

CodeStatusDescriptionHow to Fix
200SuccessSuccess get data history AWB
400InvalidAWB data not foundMake sure the AWB number data you are looking for is correct
422FailedFailed get dataMake sure the request parameter is available and has a value
500--

Tips to Avoid Error

✅ Use a valid AWB number generated from a successful POST /label-order call. Invalid or mistyped numbers will return no data or an error.
⏱️ Wait for pickup confirmation before making tracking requests. If the package hasn’t been scanned by the courier yet, the tracking history may be empty.
📦 Not all couriers support real-time tracking or may have delays in updating status. Build fallback logic for cases where tracking data is temporarily unavailable.
💡 Handle empty or null results gracefully, especially in UI displays, and inform users that tracking may not be available yet.
🔁 Implement rate-limiting and caching for high-frequency tracking requests to avoid performance bottlenecks or overuse of courier resources.
🔐 Avoid exposing query param AWB numbers on the client-side if your application needs privacy or added security for tracking details.