v1

latestOpenAPI 3.0.1Apache 2.02026-07-2473111182.6 KB
Client

List clients

Get a list of clients for the specified business id. List can be filtered by email, phone, DateTime of update, first and last name, external id and possibility to include archived, deleted and linked clients

get/api/business/{businessId}/client

Path parameters

businessIdstring required

Query parameters

emailstring

client email address to filter by

phonestring

client mobile number to filter by

updatedAfterstring

updatedAfter date to filter clients updated after a set date. yyyy-MM-dd'T'HH:mm:ss.SSZ

updatedBeforestring

updatedBefore date to filter clients updated before a set date. yyyy-MM-dd'T'HH:mm:ss.SSZ

firstNamestring

client first name to filter by. To search by exact match use John. To query by matching first letters use ~Jo% which will find both John and Joe

lastNamestring

client last name to filter by. To search by exact match use Doe. To query by matching first letters use ~Do% which will find both Doe and Doran

externalIdstring

client externalId to filter by

includeArchivedboolean

include archived clients in the list

includeDeletedboolean

include deleted clients in the list

includeLinkedClientsboolean

when true and combined with a phone filter, also returns clients linked to the matched clients

number of client records to return, max is 100

page number, default is 0 and is optional

Response

Clients listed

Example response

{
  "_embedded": {
    "clients": [
      {
        "linkedClientMobile": "871229345",
        "landLine": "35312345667",
        "email": "test@phorest.com",
        "birthDate": "2024-11-01",
        "clientSince": "2024-11-01T09:00:00Z",
        "notes": "sample",
        "preferredStaffId": "SE-J0emUgQnya14mOGdQS",
        "externalId": "123456789",
        "creatingBranchId": "SE-J0emUgQnya14mOGdQS",
        "clientCategoryIds": [
          "hAhxpPMKsDWX59Ir-LX_WQ",
          "Yj9wkv0RRVrfgX7YNvhEQw"
        ],
        "clientId": "ab123",
        "version": 1,
        "firstName": "John",
        "lastName": "Doe",
        "mobile": "871229345",
        "createdAt": "2024-11-01T09:00:00Z",
        "updatedAt": "2024-11-01T09:00:00Z",
        "photoUrl": "https://some-picture.com/photo.jpg",
        "creditAccount": {
          "outstandingBalance": 123.12,
          "creditDays": 5,
          "creditLimit": 502.32
        },
        "loyaltyCard": {
          "serial": "1424242",
          "points": 100
        },
        "mergedToClientId": "ab123",
        "linkedClientId": "ab123",
        "firstVisit": "2024-11-01",
        "lastVisit": "2024-11-01",
        "lastVisitedBranchId": "ab123"
      }
    ]
  }
}