List Purchase Orders (batchwise)
POST /api/external/v1/po/getOrdersBatchwise
Returns Purchase Orders in fixed pages of 200, using batch as a 0-indexed page number
(batch=0 → rows 1-200, batch=1 → rows 201-400, etc.). Combine with filters to narrow results.
Request body (GetAllPurchaseOrdersBatchwiseRequest)
| Field | Type | Required | Description |
|---|---|---|---|
batch | integer | No (default 0) | 0-indexed page number, 200 rows per page |
filters | object | Yes (can be {}) | See table below |
filters object (PoFilters)
| Field | Type | Description |
|---|---|---|
status | string[] | Filter by PO status |
user_warehouse | string[] | Filter by assigned warehouse ID |
received_start_date | datetime | PO received-date range start |
received_end_date | datetime | PO received-date range end |
expiry_start_date | datetime | PO expiry-date range start |
expiry_end_date | datetime | PO expiry-date range end |
appointment_start_date | datetime | Appointment-date range start |
appointment_end_date | datetime | Appointment-date range end |
is_processed_by_warehouse | boolean | Only POs marked processed/unprocessed by the warehouse |
is_expired | boolean | Only expired/non-expired POs |
has_invoice | boolean | Only POs with/without an invoice generated |
remark_type | string[] | Filter by remark type tags |
channel | string[] | Filter by sales channel |
batch | string[] | Filter by batch number (client-defined grouping, not the pagination batch above) |
search_string | string | Free-text search value |
search_type | string | Which field search_string searches, e.g. po_number, batch_number |
Request Example
{
"batch": 0,
"filters": {
"status": ["NEW"],
"received_start_date": "2026-08-01T00:00:00Z",
"received_end_date": "2026-08-11T23:59:59Z"
}
}
Response 200 OK
data.purchase_orders is an array of Purchase Order objects:
{
"success": true,
"status_code": 200,
"message": "Successfully fetched purchase orders batchwise",
"data": {
"purchase_orders": [
{
"po_id": "b6b2a3e1-0c61-4fd2-9a07-3bf2035888f1",
"user_id": "9f2b1e10-.....",
"po_number": "PO-2026-00123",
"reference_number": "REF-998",
"customer_name": "Acme Retail Pvt Ltd",
"customer_warehouse_id": "d2f5a1a2-.....",
"customer_warehouse_name": "Acme Mumbai DC",
"customer_address": "Plot 12, Industrial Area",
"customer_city": "Mumbai",
"customer_state": "Maharashtra",
"customer_pincode": "400001",
"vendor_name": "Openleaf Client Pvt Ltd",
"sku_details": [
{ "sku_code": "SKU-001", "sku_name": "Widget", "quantity": 100, "cost_price": 90, "price": 120, "mrp": 150 }
],
"quantity": 100,
"total_amount": 12000,
"taxable_amount": 10169.5,
"tax_amount": 1830.5,
"mrp_amount": 15000,
"received_date": "2026-08-10T09:00:00Z",
"expires_at": "2026-08-20T23:59:59Z",
"assigned_warehouse_id": "e1a2b3c4-.....",
"warehouse_name": "Mumbai FC",
"is_assigned": true,
"is_fulfilled": false,
"has_draft_order": false,
"status": "NEW",
"readable_status": "New",
"channel": "b2b",
"batch_number": "BATCH-01",
"invoice_number": null,
"master_waybill": null,
"child_waybills": null,
"created_at": "2026-08-10T09:00:05Z",
"remarks": []
}
]
}
}
The Purchase Order object also carries billing address fields, per-SKU tax breakdown (CGST/SGST/
IGST/CESS), uploaded documents, invoice data, and a free-form custom_data object (client-specific
fields) — the fields above are the commonly needed ones. An empty array is returned (not null)
when there are no matches.