> ## Documentation Index
> Fetch the complete documentation index at: https://learn.servitly.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Get all customers
> Returns the list of all customers.
This endpoint is authorized for organizations only, and allows retrieving the list of customers specifying:
- One or more conditions based on properties (all conditions are in AND).
- The sorting criteria (also multiple).
- The paging configuration.
The list of results is limited to only those customers authorized to the user's parent organization.
Required permissions: READ_ALL_CUSTOMERS.
## OpenAPI
````json GET /v2/network/customers
{
"openapi": "3.1.0",
"info": {
"title": "Servitly DPS API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.servitly-sandbox.com",
"description": "[AWS SANDBOX]"
},
{
"url": "https://api.servitly.com",
"description": "[AWS PRODUCTION Ireland]"
},
{
"url": "https://api-ap.servitly.com",
"description": "[AWS Hong Kong]"
},
{
"url": "https://azapi.servitly-dev.com",
"description": "[AZURE DEV Frankfurt]"
},
{
"url": "https://azapi.servitly-staging.com",
"description": "[AZURE STAGING Frankfurt]"
},
{
"url": "https://azapi.servitly.com",
"description": "[AZURE PRODUCTION Frankfurt]"
}
],
"security": [
{
"bearerAuth": []
}
],
"tags": [
{
"name": "ACTIONS"
},
{
"name": "ALERTS"
},
{
"name": "API GATEWAY"
},
{
"name": "AUTHENTICATION"
},
{
"name": "AUTHORIZATIONS"
},
{
"name": "CUSTOMERS"
},
{
"name": "DATA IMPORT / EXPORT"
},
{
"name": "EVENTS"
},
{
"name": "LOCATIONS"
},
{
"name": "MAINTENANCE"
},
{
"name": "MAPPING"
},
{
"name": "METRIC DATA"
},
{
"name": "MOBILE APP"
},
{
"name": "ORGANIZATION"
},
{
"name": "PARTNERS"
},
{
"name": "PRODUCT MODELS"
},
{
"name": "SPARE PARTS"
},
{
"name": "STATISTICS"
},
{
"name": "STORE ORDERS"
},
{
"name": "SUBSCRIPTIONS"
},
{
"name": "SUBSCRIPTIONS (OLD)"
},
{
"name": "THING CONTROL"
},
{
"name": "THING DEFINITIONS"
},
{
"name": "THING MANAGEMENT"
},
{
"name": "THINGS"
},
{
"name": "TICKETS"
},
{
"name": "USER TYPES"
},
{
"name": "USERS"
},
{
"name": "WORK SESSIONS"
}
],
"paths": {
"/v2/network/customers": {
"get": {
"summary": "Get all customers",
"description": "Returns the list of all customers.
This endpoint is authorized for organizations only, and allows retrieving the list of customers specifying:
- One or more conditions based on properties (all conditions are in AND).
- The sorting criteria (also multiple).
- The paging configuration.
The list of results is limited to only those customers authorized to the user's parent organization.
Required permissions: READ_ALL_CUSTOMERS.",
"tags": [
"CUSTOMERS"
],
"parameters": [
{
"$ref": "#/components/parameters/tenantNameHeader"
},
{
"$ref": "#/components/parameters/searchText"
},
{
"$ref": "#/components/parameters/searchField"
},
{
"$ref": "#/components/parameters/customerCode"
},
{
"$ref": "#/components/parameters/name"
},
{
"$ref": "#/components/parameters/country"
},
{
"$ref": "#/components/parameters/query_property"
},
{
"$ref": "#/components/parameters/pageSize"
},
{
"$ref": "#/components/parameters/page"
},
{
"$ref": "#/components/parameters/sort"
}
],
"responses": {
"200": {
"description": "Successful operation.",
"content": {
"application/json": {
"schema": {
"allOf": [
{
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Customer"
}
}
}
},
{
"$ref": "#/components/schemas/PaginatedResponse"
}
]
}
}
}
},
"401": {
"$ref": "#/components/responses/NotAuthenticated"
},
"403": {
"$ref": "#/components/responses/NotAuthorized"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"429": {
"$ref": "#/components/responses/ApiLimit"
},
"500": {
"$ref": "#/components/responses/IntError"
}
}
}
}
},
"components": {
"parameters": {
"tenantNameHeader": {
"in": "header",
"name": "X-Servitly-Tenant",
"required": "true",
"schema": {
"type": "string",
"example": "{{tenantName}}"
},
"description": "The name of the tenant (e.g. acme)."
},
"searchText": {
"in": "query",
"name": "searchText",
"required": "false",
"schema": {
"type": "string",
"maximum": "1",
"example": "*foo*"
},
"description": "The search text used to filter objects (requires searchField parameter).
Use '*' for variants: starts with (foo*), contains (*foo*) or ends with (*foo)."
},
"searchField": {
"in": "query",
"name": "searchField",
"required": "false",
"schema": {
"type": "string",
"maximum": "-1",
"example": "name"
},
"description": "The name of the field in which to verify the search text."
},
"customerCode": {
"in": "query",
"name": "code",
"required": "false",
"schema": {
"type": "string",
"example": "C000123"
},
"description": "Condition on customer code.
For more details on predicates, see the payload common concepts article."
},
"name": {
"in": "query",
"name": "name",
"required": "false",
"schema": {
"type": "string",
"example": "eq;FooBar"
},
"description": "Condition on name property.
For more details on predicates, see the payload common concepts article."
},
"country": {
"in": "query",
"name": "country",
"required": "false",
"schema": {
"type": "string",
"example": "Italy"
},
"description": "Condition on country.
For more details on predicates, see the payload common concepts article."
},
"query_property": {
"in": "query",
"name": "PROPERTY_NAME",
"required": "false",
"schema": {
"type": "string",
"example": "properties.propABC=eq;XYZ"
},
"description": "Condition on object property.
For more details on predicates, see the payload common concepts article."
},
"pageSize": {
"in": "query",
"name": "size",
"required": "false",
"schema": {
"type": "integer",
"minimum": "1"
},
"example": "200",
"description": "The number of elements to retrieve for the current page."
},
"page": {
"in": "query",
"name": "page",
"required": "false",
"schema": {
"type": "integer",
"minimum": "0"
},
"example": "0",
"description": "The page number to retrieve (zero-based)."
},
"sort": {
"in": "query",
"name": "sort",
"required": "false",
"schema": {
"type": "string",
"minimum": "0"
},
"example": "name,ASC",
"description": "The sorting criteria based on object properties."
}
},
"schemas": {
"Customer": {
"type": "object",
"description": "The bean providing customer details.",
"properties": {
"id": {
"type": "string",
"description": "The customer object identifier.",
"readOnly": "true"
},
"code": {
"type": "string",
"description": "Public, human-readable identifier for the customer. Unlike \"id\", which is the immutable internal identifier, \"code\" is exposed externally and can be modified by clients. Must be unique."
},
"name": {
"type": "string",
"description": "The name of the customer which could be a personal name or a business name."
},
"country": {
"type": "string",
"description": "The country of the customer."
},
"countryIsoCode": {
"type": "string",
"description": "The country ISO Code of the customer."
},
"timezone": {
"type": "string",
"description": "The timezone used for date/times localization (e.g. Europe/Rome)."
},
"properties": {
"$ref": "#/components/schemas/Properties"
},
"creationTimestamp": {
"type": "integer",
"format": "int64",
"description": "The timestamp at which the object was created."
},
"firstAccessTimestamp": {
"type": "integer",
"format": "int64",
"description": "The timestamp at which a client's user first logged in."
},
"lastAccessTimestamp": {
"type": "integer",
"format": "int64",
"description": "The timestamp at which a client's user last logged in."
}
}
},
"PaginatedResponse": {
"type": "object",
"properties": {
"first": {
"type": "boolean",
"description": "The flag indicating whether the page is the first one."
},
"last": {
"type": "boolean",
"description": "The flag indicating whether the last page has been reached."
},
"totalPages": {
"type": "integer",
"description": "The total number of pages."
},
"totalElements": {
"type": "integer",
"description": "The total number of elements."
},
"sort": {
"type": "string",
"description": "The current sorting criteria."
},
"numberOfElements": {
"type": "integer",
"description": "The number of elements in this page."
},
"size": {
"type": "integer",
"description": "The requested page size."
},
"number": {
"type": "integer",
"minimum": "0",
"description": "The number of the page (zero-based)."
}
}
},
"Properties": {
"type": "object",
"description": "The set of properties providing additional details to the parent object.",
"additionalProperties": {
"type": "string"
},
"example": {
"foo": "abc",
"bar": "123"
}
}
},
"responses": {
"NotAuthenticated": {
"description": "User not authenticated.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "User not authenticated"
}
}
}
}
}
},
"NotAuthorized": {
"description": "User not authorized.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "User not authorized"
}
}
}
}
}
},
"NotFound": {
"description": "Resource was not found.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "Resource not found"
}
}
}
}
}
},
"ApiLimit": {
"description": "API call rate limit exceeded.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "API call rate limit exceeded"
}
}
}
}
}
},
"IntError": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The error response.",
"example": "Internal Server Error"
}
}
}
}
}
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
}
}
````