Skip to main content

Sorting

To sort/order the result set, you can specify an additional query string parameter:

?order=customer_id:DESC
(specify the the_field_name:ASC or the_field_name:DESC to sort ascending or descending)

API REQUEST
GET /api/v3/invoice?order=total:ASC
API RESPONSE
HTTP/1.1 200 OK
Content-Type: application/json
API RESPONSE BODY
{
"code": 200,
"status": "OK",
"message": "",
"details": {},
"response": [
{
"invoice_id": 1764,
"total": 500,
"customer_id": 6245
},
{
"invoice_id": 1668,
"total": 1000,
"customer_id": 6212
},
{
"invoice_id": 1681,
"total": 2000,
"customer_id": 6215
}
]
}