GET All Purchase Refunds
Prod Env
{{subdomain}}/api2
Prod Env
{{subdomain}}/api2
GET
{{subdomain}}/api2
Last modified:2025-04-20 12:10:30
Maintainer:Not configured
limit
: Number of records per page (1-1000)page
: Page number for paginationsearch
: Optional search term to filter resultsstart_date
: Optional filter by purchase refund date (YYYY-MM-DD)end_date
: Optional filter by purchase refund date (YYYY-MM-DD)supplier_id
: Optional filter by supplier IDsort
: Optional field to sort by (id, date, total, etc.)direction
: Optional sort direction (asc or desc){
"result": "success",
"code": 200,
"data": [
{
"PurchaseRefund": {
"id": 678,
"number": "PR-2023-001",
"supplier_id": 1,
"date": "2023-03-21",
"total": 250.00,
"status": 1,
"currency_code": "USD",
// Additional purchase refund fields...
},
"Supplier": {
"id": 1,
"name": "Supply Co",
// Additional supplier fields...
},
"PurchaseOrderItem": [
{
"id": 901,
"purchase_refund_id": 678,
"product_id": 1,
"description": "Premium Widget Return",
"quantity": 5,
"unit_price": 50.00,
"total": 250.00
// Additional item fields...
}
]
}
// Additional purchase refunds...
],
"pagination": {
"page": 1,
"page_count": 2,
"total_results": 28,
"prev": null,
"next": "/api2/purchase_refunds.json?page=2"
}
}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET '{{subdomain}}/api2/api2/purchase_refunds.json?limit=20&page=1&search=&start_date=&end_date=&supplier_id=&sort=id&direction=desc'
Response Response Example
{
"result": "success",
"code": 200,
"data": [
{
"PurchaseRefund": {
"id": 678,
"number": "PR-2023-001",
"supplier_id": 1,
"staff_id": 1,
"date": "2023-03-21",
"total": 250,
"status": 1,
"currency_code": "USD",
"draft": 0,
"notes": "Defective product return",
"created": "2023-03-21 10:15:22",
"modified": "2023-03-21 10:15:22"
},
"Supplier": {
"id": 1,
"name": "Supply Co",
"business_name": "Supply Company Ltd",
"email": "orders@supplyco.com"
},
"PurchaseOrderItem": [
{
"id": 901,
"purchase_refund_id": 678,
"product_id": 1,
"description": "Premium Widget Return",
"quantity": 5,
"unit_price": 50,
"total": 250
}
]
},
{
"PurchaseRefund": {
"id": 677,
"number": "PR-2023-002",
"supplier_id": 2,
"staff_id": 1,
"date": "2023-03-19",
"total": 600,
"status": 1,
"currency_code": "USD",
"draft": 0,
"notes": "Incorrect item received",
"created": "2023-03-19 14:30:45",
"modified": "2023-03-19 14:30:45"
},
"Supplier": {
"id": 2,
"name": "Office Depot",
"business_name": "Office Depot Inc.",
"email": "sales@officedepot.com"
},
"PurchaseOrderItem": [
{
"id": 900,
"purchase_refund_id": 677,
"product_id": 5,
"description": "Office Furniture Set Return",
"quantity": 1,
"unit_price": 600,
"total": 600
}
]
}
],
"pagination": {
"page": 1,
"page_count": 2,
"total_results": 28,
"prev": null,
"next": "/api2/purchase_refunds.json?page=2"
}
}
Request
Query Params
limit
stringÂ
required
Example:
20
page
stringÂ
required
Example:
1
search
stringÂ
required
start_date
stringÂ
required
end_date
stringÂ
required
supplier_id
stringÂ
required
sort
stringÂ
required
Example:
id
direction
stringÂ
required
Example:
desc