Skip to main content
GET
/
entities
/
list
Get list
curl --request GET \
  --url https://api.getenso.ai/entities/list \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.getenso.ai/entities/list"

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/entities/list', 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/entities/list",
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/entities/list"

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/entities/list")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.getenso.ai/entities/list")

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
{
  "status": "success",
  "message": "Success",
  "data": {
    "rows": [
      {
        "id": "ent_123",
        "legalName": "Acme Inc",
        "bankDetails": "Bank of Example - ****1234",
        "alias": "acme",
        "email": [
          "billing@acme.test"
        ],
        "phoneNumber": "+1-415-555-0100",
        "cc": [
          "finance@acme.test"
        ],
        "bcc": [
          "audit@acme.test"
        ],
        "Customer": {
          "name": "Acme Customer"
        },
        "entityForId": "cus_123",
        "contractCount": 4,
        "Addresses": [
          {
            "address1": "123 Market St",
            "address2": "Suite 200",
            "city": "San Francisco",
            "zip": "94105",
            "State": {
              "name": "California",
              "Country": {
                "name": "United States"
              }
            }
          }
        ]
      }
    ],
    "count": 1
  }
}
{
"status": "error",
"message": "Error",
"errors": [
"Invalid parameters"
],
"data": {}
}
SystemUser permission: EntityService:getEntitiesByTypeWithFilters, JobService:create

Authorizations

Authorization
string
header
required

JWT bearer token obtained from POST /auth/system-login using your client credentials.

Query Parameters

page
integer
default:1

Page number for pagination.

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

Number of entities per page.

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

Filters to apply. Pass as a URL-encoded JSON string.

Example usage in query string:

filters=%7B%22entityFor%22%3A%22customer%22%7D

Example usage in code:

filters: encodeURIComponent(JSON.stringify({ entityFor: "customer" }))
attributes
string

List of attributes to return. Pass as a URL-encoded JSON array.

Example usage in query string:

attributes=%5B%22id%22%2C%22legalName%22%2C%22bankDetails%22%2C%22alias%22%2C%22Addresses.address1%22%2C%22Addresses.address2%22%2C%22Addresses.city%22%2C%22Addresses.zip%22%2C%22Addresses.State.name%22%2C%22Addresses.State.Country.name%22%2C%22email%22%2C%22phoneNumber%22%2C%22cc%22%2C%22bcc%22%2C%22Customer.name%22%2C%22entityForId%22%2C%22contractCount%22%5D

groupBy
string

Fields to group by. Pass as a URL-encoded JSON array.

Example usage in query string:

groupBy=%5B%22Entity.id%22%2C%22Addresses.id%22%5D

sortBy
string

Field to sort by.

Example:

"createdAt"

sortOrder
enum<string>

Sort order.

Available options:
asc,
desc
Example:

"desc"

Search/filter string

Response

Success. Returns a paginated list of customer entities.

status
string
message
string
data
object