Tracking AWB
Overviewβ
The Tracking AWB endpoint allows you to retrieve real-time shipment status using an airwaybill (AWB) number from supported couriers. This feature is essential for merchants and customers who want to monitor delivery progress, identify delays, or confirm successful delivery.
Tracking can be done for both domestic and international shipments, depending on the courierβs support.
Key Featureβ
- π Real-Time Tracking Updates
- π¦ Supports Multiple Couriers
- π Current and Historical Statuses
- π Location-based Tracking Events
- π Estimated Delivery Time Insight
How it Worksβ
- The client sends a POST request to the tracking endpoint.
- The API forwards the request to RajaOngkir, which queries the courierβs system.
- A structured response is returned containing:
- Shipment summary (status, service, origin, destination)
- History of tracking events
- Delivery status and receiver (if available)
Request Bodyβ
- cURL
- JavaScript
- PHP
- GoLang
- Node
curl --location --globoff --request POST 'https://rajaongkir.komerce.id/api/v1/track/waybill?awb={{%20awb_number%20}}&courier={{%20courier_name%20}}' \
--header 'key: inputapikey'
const myHeaders = new Headers();
myHeaders.append("key", "inputapikey");
const requestOptions = {
method: "POST",
headers: myHeaders,
redirect: "follow"
};
fetch("https://rajaongkir.komerce.id/api/v1/track/waybill?awb={{ awb_number }}&courier={{ courier_name }}", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rajaongkir.komerce.id/api/v1/track/waybill?awb={{%20awb_number%20}}&courier={{%20courier_name%20}}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'key: inputapikey'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://rajaongkir.komerce.id/api/v1/track/waybill?awb={{%20awb_number%20}}&courier={{%20courier_name%20}}"
method := "POST"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("key", "inputapikey")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
const axios = require('axios');
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://rajaongkir.komerce.id/api/v1/track/waybill?awb={{ awb_number }}&courier={{ courier_name }}',
headers: {
'key': 'inputapikey'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Query Parameterβ
Headersβ
Key | Type | Description |
---|---|---|
key * | string | this Value contain an secret APIKEY identic for Shipping Cost API |
Body x-www-form-urlencodeβ
Key | Type | Description |
---|---|---|
awb * | string | this Value contain awb number |
courier * | string | this Value contain the courier service |
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β
Key | Value (Description) |
---|---|
meta.message | Response for searching address. |
meta.code | Any response have different code. |
meta.status | Boolean status for checking address. |
data.delivered | Boolean indicating if the shipment has been delivered. |
data.summary.courier_code | Code of the courier service (e.g. jne , sicepat ). |
data.summary.courier_name | Full name of the courier. |
data.summary.waybill_number | The shipment's tracking number (AWB). |
data.summary.service_code | Shipping service type code. |
data.summary.waybill_date | Date the waybill was created. |
data.summary.shipper_name | Name of the sender. |
data.summary.receiver_name | Name of the receiver. |
data.summary.origin | Origin location (e.g., city or district). |
data.summary.destination | Destination location. |
data.summary.status | Current shipment status. |
data.details.waybill_number | Tracking number. |
data.details.waybill_date | Date the shipment was created. |
data.details.waybill_time | Time the shipment was created. |
data.details.weight | Package weight. |
data.details.origin | Origin location. |
data.details.destination | Destination location. |
data.details.shipper_name | Sender's name. |
data.details.shipper_address1 | Sender address line 1. |
data.details.shipper_address2 | Sender address line 2. |
data.details.shipper_address3 | Sender address line 3. |
data.details.shipper_city | Sender's city. |
data.details.receiver_name | Receiver's name. |
data.details.receiver_address1 | Receiver address line 1. |
data.details.receiver_address2 | Receiver address line 2. |
data.details.receiver_address3 | Receiver address line 3. |
data.details.receiver_city | Receiver's city. |
data.delivery_status.status | Final delivery status (e.g., DELIVERED ). |
data.delivery_status.pod_receiver | Name of the person who received the package. |
data.delivery_status.pod_date | Date the package was delivered. |
data.delivery_status.pod_time | Time the package was delivered. |
data.manifest[].manifest_code | Code indicating the manifest event. |
data.manifest[].manifest_description | Description of the event (e.g., "Package received"). |
data.manifest[].manifest_date | Date of the manifest event. |
data.manifest[].manifest_time | Time of the manifest event. |
data.manifest[].city_name | City where the event occurred. |
Success Respons for Tracking AWBβ
{
"meta": {
"message": "{{ message }}",
"code": {{ code }},
"status": "{{ status }}"
},
"data": {
"delivered": {{ delivery_status }},
"summary": {
"courier_code": "{{ courier.code }}",
"courier_name": "{{ courier_name }}",
"waybill_number": "{{ awb.number }}",
"service_code": "{{ service.code }}",
"waybill_date": "{{ awb.date.created }}",
"shipper_name": "{{ shipper.name }}",
"receiver_name": "{{ receiver.name }}",
"origin": "{{ origin.location }}",
"destination": "{{ destination.location }}",
"status": "{{ status }}"
},
"details": {
"waybill_number": "{{ awb.number }}",
"waybill_date": "{{ awb.date.created }}",
"waybill_time": "{{ awb.time.created }}",
"weight": "{{ package.weight }}",
"origin": "{{origin.location }}",
"destination": "{{ destination.location }}",
"shipper_name": "{{ shipper.name }}",
"shipper_address1": "{{ shipper.address1 }}",
"shipper_address2": "{{ shipper.address2 }}",
"shipper_address3": "{{ shipper.address3 }}",
"shipper_city": "{{ shipper.city_name }}",
"receiver_name": "{{ receiver.name }}",
"receiver_address1": "{{ receiver.address1 }}",
"receiver_address2": "{{ receiver.address2 }}",
"receiver_address3": "{{ receiver.address3 }}",
"receiver_city": "{{ receiver.city_name }}"
},
"delivery_status": {
"status": "{{ delivery.status }}",
"pod_receiver": "{{ info.pod_receiver }}",
"pod_date": "{{ pod.date }}",
"pod_time": "{{ pod.time }}"
},
"manifest": [
{
"manifest_code": "{{ manifest.code }}",
"manifest_description": "{{ manifest.desc }}",
"manifest_date": "{{ manifest.date }}",
"manifest_time": "{{ manifest.time }}",
"city_name": "{{ point.city_name }}"
}
]
}
}
Error Respons for Tracking AWBβ
{
"meta": {
"message": "{{ message }}",
"code": {{ code }},
"status": "{{ status }}"
},
"data": null
}
Status Codeβ
Code | Status | Description | How to Fix |
---|---|---|---|
200 | Success | ||
400 | Error | Missing Params | Make sure the request parameters that are sent match the required parameters. |
404 | Error | Checking AWB not found | This error is unavoidable because the awb number to provide the desired data. |
Tips to Avoid Errorβ
- β Double-check the AWB number β it must be valid and issued by the specified courier.
- π¦ Ensure the courier supports tracking β not all partners provide real-time updates.
- π Use the correct API Key β unauthorized or expired keys will result in a 401 error.
- π Retry smartly β sometimes couriers may have delay in updating status. Implement retries with delay.
- β³ Allow processing time β recently generated AWB might take a few minutes before itβs trackable.