Skip to main content
GET
/
invoices
/
cURL
curl --request GET \
  --url https://api.getenso.ai/invoices/ \
  --header 'Authorization: Bearer <token>'
{
  "message": "<string>",
  "status": "<string>",
  "data": {
    "rows": [
      {
        "id": "<string>",
        "number": "<string>",
        "date": "2023-11-07T05:31:56Z",
        "fromDate": "2023-11-07T05:31:56Z",
        "toDate": "2023-11-07T05:31:56Z",
        "status": "<string>",
        "data": {},
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "deletedAt": "2023-11-07T05:31:56Z",
        "OrganisationId": "<string>",
        "ContractPlanId": "<string>"
      }
    ],
    "count": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

page
integer
default:1

Page number for pagination

Required range: x >= 1
limit
integer
default:10

Number of invoices per page

Required range: 1 <= x <= 50
filters
string

Filters to apply for querying invoices. Pass as a URL-encoded JSON string. Supports operators like like, eq, ne, gt, lt, etc.

The filters parameter must be stringified and URL-encoded.

Example usage in code:

filters: encodeURIComponent(JSON.stringify({ status: { like: 'draf%' } }))

Example usage in query string:

filters=%7B%22status%22%3A%7B%22like%22%3A%22draf%25%22%7D%7D

Supported operators:

  • like: pattern matching (e.g., { "status": { "like": "draf%" } })
  • eq: equals (e.g., { "status": { "eq": "draft" } })
  • ne: not equals
  • gt: greater than
  • lt: less than
  • in: in array (e.g., { "status": { "in": ["draft", "sent"] } })

More examples:

  • Filter by status starting with 'draf':
    • Raw: { "status": { "like": "draf%" } }
    • Encoded: %7B%22status%22%3A%7B%22like%22%3A%22draf%25%22%7D%7D
  • Filter by status equals 'paid':
    • Raw: { "status": { "eq": "paid" } }
    • Encoded: %7B%22status%22%3A%7B%22eq%22%3A%22paid%22%7D%7D
  • Filter by createdAt greater than a date:
    • Raw: { "createdAt": { "gt": "2024-01-01" } }
    • Encoded: %7B%22createdAt%22%3A%7B%22gt%22%3A%222024-01-01%22%7D%7D

Response

200 - application/json

List of invoices

message
string

Success message

status
string

Status of the response

data
object
I