Skip to content

Get a list of clients

Request

Filter and sort the client base, returning meta.total_count and only the requested fields for one page. If fields is omitted, each row contains only id. This endpoint cannot return tags/categories, custom fields, birth date, loyalty card or comments; use the deprecated GET /clients/{location_id} for full profile pages or GET /client/{location_id}/{id} for one card.

Security
BearerPartnerUser
Path
location_idnumberrequired

location ID

Headers
Acceptstringrequired

application/vnd.api.v2+json

Content-Typestringrequired

application/json

Authorizationstringrequired

Bearer partner_token, User user_token

Bodyapplication/jsonrequired
pagenumber

Page number

Example:1
page_sizenumber

The number of output lines per page. Maximum 200. (Default 25)

Example:3
fieldsArray of strings

Fields to return in each row. id is always included; without this property, only id is returned. Categories/tags and custom fields are unavailable here.

Items Enum:"id""name""surname""patronymic""phone""email""discount""first_visit_date""last_visit_date""sold_amount"
Example:
[ "id", "name" ]
order_bystring

What field to sort by

Enum:"id""name""phone""email""discount""first_visit_date""last_visit_date""sold_amount""visits_count"
Example:"name"
order_by_directionstring

How to sort (ascending / descending)

Enum:"ASC""DESC"
Example:"desc"
operationstring

Type of transaction

Enum:"AND""OR"
Example:"AND"
filtersArray of objects

Filters for searching by customers

Example:
[ { "type": "id", "state": { … } }, { "type": "sold_amount", "state": { … } }, { "type": "quick_search", "state": { … } }, { "type": "importance", "state": { … } }, { "type": "has_mobile_app", "state": { … } }, { "type": "category", "state": { … } }, { "type": "has_passteam_card", "state": { … } }, { "type": "passteam_card_ids", "state": { … } }, { "type": "birthday", "state": { … } }, { "type": "gender", "state": { … } }, { "type": "record", "state": { … } }, { "type": "client", "state": { … } }, { "type": "sale", "state": { … } } ]
curl -i -X POST \
  'https://developer.alteg.io/_mock/en/b2b-v1/openapi/locations/{location_id}/clients/search' \
  -H 'Accept: string' \
  -H 'Authorization: Bearer <YOUR_Bearer {PartnerToken}, User {UserToken}_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "page": 1,
    "page_size": 3,
    "fields": [
      "id",
      "name"
    ],
    "order_by": "name",
    "order_by_direction": "desc",
    "operation": "AND",
    "filters": [
      {
        "type": "id",
        "state": {
          "value": [
            1,
            2,
            3
          ]
        }
      },
      {
        "type": "sold_amount",
        "state": {
          "from": 0,
          "to": 100.77
        }
      },
      {
        "type": "quick_search",
        "state": {
          "value": "James Smith"
        }
      },
      {
        "type": "importance",
        "state": {
          "value": [
            0,
            1,
            2,
            3
          ]
        }
      },
      {
        "type": "has_mobile_app",
        "state": {
          "value": true
        }
      },
      {
        "type": "category",
        "state": {
          "value": [
            1,
            7
          ]
        }
      },
      {
        "type": "has_passteam_card",
        "state": {
          "value": true
        }
      },
      {
        "type": "passteam_card_ids",
        "state": {
          "value": [
            "111122223333aaaabbbbcccc"
          ]
        }
      },
      {
        "type": "birthday",
        "state": {
          "from": "1990-01-01 00:00:00",
          "to": "2000-01-01 23:59:59"
        }
      },
      {
        "type": "gender",
        "state": {
          "value": [
            0,
            1,
            2
          ]
        }
      },
      {
        "type": "record",
        "state": {
          "staff": {
            "value": [
              1,
              2
            ]
          },
          "service": {
            "value": [
              2,
              3
            ]
          },
          "service_category": {
            "value": [
              4,
              5
            ]
          },
          "status": {
            "value": [
              1
            ]
          },
          "created": {
            "from": "2026-01-01 00:00:00",
            "to": "2026-01-01 23:59:59"
          },
          "records_count": {
            "from": 1,
            "to": 99999
          },
          "sold_amount": {
            "from": 1.001,
            "to": 99999.09
          }
        }
      },
      {
        "type": "client",
        "state": {
          "id": {
            "value": [
              1,
              2,
              3
            ]
          },
          "birthday": {
            "from": "1990-01-01 00:00:00",
            "to": "2000-01-01 23:59:59"
          }
        }
      },
      {
        "type": "sale",
        "state": {
          "abonement_balance": {
            "from": 2,
            "to": 3
          }
        }
      }
    ]
  }'

Responses

OK

Bodyapplication/json
successboolean

Execution success status (true)

Example:true
dataArray of objects

Array of objects with data

Example:
[ { "name": "James Smith", "id": 2 }, { "name": "Taylor Reed", "id": 3 }, { "name": "James Smith", "id": 1 } ]
metaobject

Metadata (contains the number of clients found)

Example:
{ "total_count": 908 }
Response
{ "success": true, "data": [ { … }, { … }, { … } ], "meta": { "total_count": 908 } }