Get All Orders
The Get All Orders API Route is used to fetch a paginated list of orders along with their current status and shipment details from Openleaf.
Request
GET REQUEST
https://api.openleaf.tech/api/v1/orders/getAllOrdersData?startDate=2025-08-19&endDate=2025-08-26&page=1&batchSize=20&payment_mode=COD&carrier_name=Delhivery
| Parameter | Description |
|---|---|
| page, batchSize | Pagination — 1-indexed page number and page size |
| startDate, endDate | Order date range, format YYYY-MM-DD |
| status | Order status, comma-separated ("RTO" expands to all RTO substatuses) |
| payment_mode | COD / PREPAID, comma-separated |
| carrier_name | Carrier name, e.g. Delhivery — comma-separated |
Header Example
{
"Authorization": "Bearer {{your_token}}"
}
Response
| Field | Data Type | Description |
|---|---|---|
| data | Array | List of order objects matching the query |
| data[].order_id | String | Unique order ID |
| data[].carrier_name | String | Carrier service handling the shipment |
| data[].payment_mode | String | Payment mode of the order (COD / PREPAID) |
| data[].current_order_status | String | Current status of the order |
| data[].awbno | String | AWB number of the shipment |
Response Example
{
"data": [
{
"order_id": "...",
"carrier_name": "Delhivery",
"payment_mode": "COD",
"current_order_status": "DELIVERED",
"awbno": "..."
}
]
}
Example
Curl Command
curl --location --request GET 'https://api.openleaf.tech/api/v1/orders/getAllOrdersData?startDate=2025-08-19&endDate=2025-08-26&page=1&batchSize=20&payment_mode=COD&carrier_name=Delhivery' \
--header 'Authorization: Bearer {{token}}'
Output:
{
"data": [
{
"order_id": "...",
"carrier_name": "Delhivery",
"payment_mode": "COD",
"current_order_status": "DELIVERED",
"awbno": "..."
}
]
}