List customers with filtering and pagination
curl --request GET \
--url https://api.zenskar.com/customers \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zenskar.com/customers"
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', organisation: '<api-key>'}};
fetch('https://api.zenskar.com/customers', 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.zenskar.com/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"organisation: <api-key>",
"x-api-key: <api-key>"
],
]);
$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.zenskar.com/customers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<api-key>")
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.zenskar.com/customers")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"customer_name": "Acme Corporation",
"email": "billing@acme.com",
"created_at": "2023-01-01T00:00:00",
"updated_at": "2023-06-15T10:30:00"
},
{
"id": "223e4567-e89b-12d3-a456-426614174001",
"customer_name": "TechStart Inc",
"email": "contact@techstart.io",
"created_at": "2023-02-15T00:00:00",
"updated_at": "2023-06-20T14:20:00"
}
],
"next": "cursor_to_next_page",
"total": 142
}
Customers
List customers with filtering and pagination
Retrieve customers with rich filtering, sorting, and pagination.
Filter by:
- Customer attributes: customer_name, email, custom_data fields.
- Dates: created_at, updated_at (range filters supported).
- Search: use search parameter for flexible multi-field queries.
Pagination & sorting:
- limit: page size (default varies by configuration).
- cursor: pass ‘next’ or ‘previous’ from response to paginate.
- order: field to sort by with - prefix for descending (e.g., -created_at).
Expand:
- expand: comma-separated list of related resources to include (e.g., contacts).
GET
/
customers
List customers with filtering and pagination
curl --request GET \
--url https://api.zenskar.com/customers \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zenskar.com/customers"
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', organisation: '<api-key>'}};
fetch('https://api.zenskar.com/customers', 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.zenskar.com/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"organisation: <api-key>",
"x-api-key: <api-key>"
],
]);
$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.zenskar.com/customers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<api-key>")
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.zenskar.com/customers")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"customer_name": "Acme Corporation",
"email": "billing@acme.com",
"created_at": "2023-01-01T00:00:00",
"updated_at": "2023-06-15T10:30:00"
},
{
"id": "223e4567-e89b-12d3-a456-426614174001",
"customer_name": "TechStart Inc",
"email": "contact@techstart.io",
"created_at": "2023-02-15T00:00:00",
"updated_at": "2023-06-20T14:20:00"
}
],
"next": "cursor_to_next_page",
"total": 142
}
Authorizations
Query Parameters
The cursor indicating a unique set of results - this should be auto generated and you get it from the next and previous fields of the response
Example:
"V2VsbCBhcmV1IGN1cmlvdxM="
The number of results to return - defaults to 10
Example:
10
Example:
"customer_name=Acme"
Example:
"order=created_at"
Example:
"sort_key=id"
Example:
"sort_key=asc"
Example:
"expand=contacts"
Response
Successfully retrieved customers
The results for the current page
Show child attributes
Show child attributes
The cursor for the next page of results
Example:
"V2VsbCBhcmV1IGN1cmlvdxM="
The cursor for the previous page of results
Example:
"GmBsbCBhcmV1IGN1cmlvdxM="
The total count of rows