Get invoices
curl --request GET \
--url https://api.getenso.ai/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getenso.ai/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getenso.ai/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getenso.ai/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getenso.ai/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getenso.ai/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getenso.ai/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": "<string>",
"data": {
"rows": [
{
"id": "inv_123",
"contractPlanId": "cp_123",
"customerIdentifier": "customer_001",
"invoiceData": {
"date": "2023-10-01",
"fromDate": "2023-10-01",
"toDate": "2023-10-31"
},
"invoiceItems": [
{
"title": "Item Title",
"description": "Item description",
"quantity": 1,
"price": 100,
"fromDate": "2023-10-01",
"toDate": "2023-10-31"
}
],
"status": "draft",
"comments": "Reason for cancellation",
"dateOfPayment": "2025-06-04T12:00:00Z"
}
],
"count": 123
}
}{
"status": "error",
"message": "Forbidden",
"errors": [
{}
]
}Invoices
Get invoices
Get a list of invoices
GET
/
invoices
Get invoices
curl --request GET \
--url https://api.getenso.ai/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getenso.ai/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getenso.ai/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getenso.ai/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getenso.ai/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getenso.ai/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getenso.ai/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"status": "<string>",
"data": {
"rows": [
{
"id": "inv_123",
"contractPlanId": "cp_123",
"customerIdentifier": "customer_001",
"invoiceData": {
"date": "2023-10-01",
"fromDate": "2023-10-01",
"toDate": "2023-10-31"
},
"invoiceItems": [
{
"title": "Item Title",
"description": "Item description",
"quantity": 1,
"price": 100,
"fromDate": "2023-10-01",
"toDate": "2023-10-31"
}
],
"status": "draft",
"comments": "Reason for cancellation",
"dateOfPayment": "2025-06-04T12:00:00Z"
}
],
"count": 123
}
}{
"status": "error",
"message": "Forbidden",
"errors": [
{}
]
}SystemUser permission:
InvoiceService:getInvoices, JobService:createAuthorizations
JWT bearer token obtained from POST /auth/system-login using your client credentials.
Query Parameters
Page number for pagination
Required range:
x >= 1Number of invoices per page
Required range:
1 <= x <= 50Filters 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 equalsgt: greater thanlt: less thanin: 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
- Raw:
- Filter by status equals 'paid':
- Raw:
{ "status": { "eq": "paid" } } - Encoded:
%7B%22status%22%3A%7B%22eq%22%3A%22paid%22%7D%7D
- Raw:
- 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
- Raw:
Search/filter string
⌘I

