Detail Order
Overview
The Detail Order Endpoint is designed to retrieve detailed information about a specific order, allowing users to access real-time data on their order status, shipping details, and payment information. This endpoint enhances transparency by ensuring users have a clear view of their orders at any given time.
By using this endpoint, users can efficiently track their order progress, verify order details, and resolve any discrepancies before the shipping process is affected.
Key Feature
✅ Real-time Order Tracking → Users can instantly check their order status and monitor its progress.
✅ Enhanced Transparency → Provides full visibility into shipping, payment, and order details.
✅ Error Prevention → Users can verify order accuracy before shipping, reducing potential issues.
✅ Improved Customer Support → Customer service teams can quickly retrieve order details for assistance.
✅ Automated System Integration → Businesses can integrate this endpoint to streamline order management workflows.
How it Works
- Initiate Request: The user sends a GET request to the endpoint, providing the unique Order ID as a parameter.
- Data Retrieval: The system searches its database for the corresponding Order ID. If found, it compiles all relevant order information.
- Response Delivery: The system returns a structured response containing detailed information, including:
- Order Information: Order ID, status, creation and last update timestamps.
- Shipping Details: Courier name, shipping method, cost, and estimated delivery time.
- Origin and Destination: Addresses, region IDs, and city names for both sender and recipient.
- Recipient Information: Name, phone number, and full address of the recipient.
- Payment Details: Payment status, method, and total amount paid.
Use Cases for Detail Order EndPoint
- Order Tracking : Users can check whether their order is still being processed, has been packed, or is already shipped.
- Address Verification : If a user notices incorrect destination details, they can update the address (if the order is still eligible for modification).
- Shipping Cost Confirmation : Businesses can confirm whether the correct shipping fee was applied to an
- Payment Verification : Users can check if their payment has been received successfully or if further action is needed.
- Customer Support Assistance : Support agents can use the Order ID to retrieve all relevant order details when assisting customers with inquiries.
- A valid Order ID is required to retrieve order details.
- Orders cannot be modified through this endpoint—only order details can be viewed.
- Real-time updates ensure that users always receive the most up-to-date order status.
- If an order is canceled, the response will indicate the cancellation status and refund details (if applicable).
By utilizing the Detail Order Endpoint, users and businesses can efficiently monitor and manage orders, ensuring a smooth and transparent order processing experience.
Request Body
- cURL
- JavaScript
- PHP
- GoLang
- Node
curl --location 'https://api-sandbox.collaborator.komerce.id/order/api/v1/orders/detail?order_no=KOMXXXXXXXXXXXXXXXXX' \
--header 'x-api-key: inputapikey'
const myHeaders = new Headers();
myHeaders.append("x-api-key", "inputapikey");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://api-sandbox.collaborator.komerce.id/order/api/v1/orders/detail?order_no=KOMXXXXXXXXXXXXXXXXX", 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://api-sandbox.collaborator.komerce.id/order/api/v1/orders/detail?order_no=KOMXXXXXXXXXXXXXXXXX',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'x-api-key: inputapikey'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.collaborator.komerce.id/order/api/v1/orders/detail?order_no=KOMXXXXXXXXXXXXXXXXX"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("x-api-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: 'get',
maxBodyLength: Infinity,
url: 'https://api-sandbox.collaborator.komerce.id/order/api/v1/orders/detail?order_no=KOMXXXXXXXXXXXXXXXXX',
headers: {
'x-api-key': 'inputapikey'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Query Parameter
Headers
Key | Type | Description |
---|---|---|
x-api-key * | string | this Value contain an secret APIKEY identic for Shipping API. |
Query Parameters
Key | Type | Description |
---|---|---|
order_no * | string | Value is filled with the order number that has been created. |
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 | Message indicating the result of the API request. |
meta.code | HTTP status code representing the request status. |
meta.status | Status of the API response (e.g., success or error). |
data.order_no | Unique identifier for the order within the system. |
data.awb | Air Waybill number used for package tracking (if available). |
data.order_status | Current status of the order (e.g., Diajukan = Submitted). |
data.order_date | Date the order was created. |
data.brand_name | Brand name displayed on the shipping label. |
data.shipper_name | Name of the sender or shipper. |
data.shipper_phone | Phone number of the sender. |
data.shipper_destination_id | ID representing the pickup address region. |
data.shipper_address | Full address of the sender (pickup location). |
data.receiver_name | Name of the person receiving the package. |
data.receiver_phone | Phone number of the receiver. |
data.receiver_destination_id | ID representing the delivery address region. |
data.receiver_address | Full address of the receiver (delivery location). |
data.shipping | Name of the selected shipping courier. |
data.shipping_type | Type of shipping service chosen (e.g., Standard, Express). |
data.payment_method | Method of payment used by the customer. |
data.shipping_cost | Cost charged for the shipping service. |
data.shipping_cashback | Discount applied to the shipping cost. |
data.service_fee | Additional fee charged for COD (if applicable). |
data.additional_cost | Any other cost added to the order. |
data.grand_total | Final total amount (product + shipping + additional cost - cashback). |
data.cod_value | Total amount to be collected if using COD. Should match grand_total. |
data.notes | Optional notes or remarks related to the order. |
data.insurance_value | Value of insurance applied to the shipment (if any). |
data.origin_pin_point | Latitude and longitude of the sender's location. |
data.destination_pin_point | Latitude and longitude of the receiver's location (if available). |
data.booking_id | ID from the courier or third-party booking system (if available). |
data.driver_name | Name of the courier driver handling the delivery. |
data.driver_phone | Contact number of the assigned courier driver. |
data.cancelation_reason | Reason for the order cancellation (if any). |
data.live_tracking_url | URL to track the shipment in real time. |
data.commodity_code | Code representing the type of goods or commodity. |
data.order_details[].product_name | Name of the product in the order. |
data.order_details[].product_variant_name | Specific variant or configuration of the product. |
data.order_details[].product_weight | Weight of the product in grams. |
data.order_details[].product_height | Height of the product in centimeters. |
data.order_details[].product_width | Width of the product in centimeters. |
data.order_details[].product_length | Length of the product in centimeters. |
data.order_details[].product_price | Unit price of the product. |
data.order_details[].qty | Quantity of the product ordered. |
data.order_details[].subtotal | Total price for this item (product_price × qty). |
Success Respons for Getting Detail Order
{
"meta": {
"message": "Success get order detail",
"code": 200,
"status": "success"
},
"data": {
"order_no": "KOMXXXXXXXXXXXXXXXXX",
"awb": "{{ awb.number }}",
"order_status": "{{ status }}",
"order_date": "{{ order.date }}",
"brand_name": "{{ brand_name }}",
"shipper_name": "{{ shipper_name }}",
"shipper_phone": "{{ shipper_phone_number }}",
"shipper_destination_id": {{ shipper_destination_id }},
"shipper_address": "{{ shipper_detail_address }}",
"receiver_name": "{{ receiver_name }}",
"receiver_phone": "{{ receiver_phone_number }}",
"receiver_destination_id": {{ receiver_destination_id }},
"receiver_address": "{{ receiver_detail_address }}",
"shipping": "{{ courier }}",
"shipping_type": "{{ courier.service }}",
"payment_method": "{{ payment_method }}",
"shipping_cost": {{ Shipping_cost }},
"shipping_cashback": {{ shipping_cashback }},
"service_fee": {{ service_fee, 2.8% }},
"additional_cost": {{ additional_cost }},
"grand_total": {{ grand_total }},
"cod_value": {{ cod_value }},
"notes": "{{ Order_notes }}",
"insurance_value": {{ insurance_value }},
"origin_pin_point": "{{ longitude }}, {{ latitude }}",
"destination_pin_point": "{{ longitude }}, {{ latitude }}",
"booking_id": "{{ booking_id }}",
"driver_name": "{{ driver_name }}",
"driver_phone": "{{ driver_phone }}",
"cancelation_reason": "{{ reason }}",
"live_tracking_url": "{{ track_url }}",
"commodity_code": "{{ commodity }}",
"order_details": [
{
"product_name": "{{ product_name }}",
"product_variant_name": "{{ product_variant }}",
"product_weight": {{ product_weight }},
"product_height": {{ product_height }},
"product_width": {{ product_width }},
"product_length": {{ product_length }},
"product_price": {{ product_price }},
"qty": {{ qty }},
"subtotal": {{ subtotal }}
}
]
}
}
Error Respons for Getting Detail Order
{
"meta": {
"message": "Get Order detail failed",
"code": 400,
"status": "error"
},
"data": {
"errors": "Data not found"
}
}
Error Code
Code | Status | Description | How to Fix |
---|---|---|---|
400 | Not Found | order_no not found | Check the order_no again, whether it matches the order number that was previously created. |
401 | Unauthorized | API key invalid or missing from parameter | Make sure your API key is valid using your Account |
422 | Unprocessable Entity | Keywoard parameter is missing | Add an valid keywoard parameter in your requested query. Parameter Request can't be null or missing |
500 | - | - | - |
Tips to Avoid Error
- Always include the Authorization header with a valid apikey.
- Do not leave the order_no parameter empty — it’s required.
- Use the correct endpoint and query structure.