Skip to main content

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

ParameterDescription
page, batchSizePagination — 1-indexed page number and page size
startDate, endDateOrder date range, format YYYY-MM-DD
statusOrder status, comma-separated ("RTO" expands to all RTO substatuses)
payment_modeCOD / PREPAID, comma-separated
carrier_nameCarrier name, e.g. Delhivery — comma-separated
Header Example
{
"Authorization": "Bearer {{your_token}}"
}

Response

FieldData TypeDescription
dataArrayList of order objects matching the query
data[].order_idStringUnique order ID
data[].carrier_nameStringCarrier service handling the shipment
data[].payment_modeStringPayment mode of the order (COD / PREPAID)
data[].current_order_statusStringCurrent status of the order
data[].awbnoStringAWB 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": "..."
}
]
}