v1

latestOpenAPI 3.0.1Apache 2.02026-07-2473111182.6 KB
Client

Create a client

Create and return a client for the specified business id

post/api/business/{businessId}/client

Path parameters

businessIdstring required

Request body

linkedClientMobilestring
landLinestring
emailstring
birthDatestring date
clientSincestring date-time
gender'MALE' | 'FEMALE' | 'NON_BINARY' | 'NOT_SPECIFIED' | 'PREFER_NOT_TO_SAY' | 'UNKNOWN'
notesstring
smsMarketingConsentboolean
emailMarketingConsentboolean
smsReminderConsentboolean
emailReminderConsentboolean
preferredStaffIdstring
externalIdstring
creatingBranchIdstring
archivedboolean
bannedboolean
clientCategoryIdsstring[]

The list of client category IDs associated with this client

clientIdstring
versioninteger
firstNamestring required
lastNamestring required
mobilestring

Example request

{
  "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"
}

Response

Client created successfully

linkedClientMobilestring
landLinestring
emailstring
birthDatestring date
clientSincestring date-time
gender'MALE' | 'FEMALE' | 'NON_BINARY' | 'NOT_SPECIFIED' | 'PREFER_NOT_TO_SAY' | 'UNKNOWN'
notesstring
smsMarketingConsentboolean
emailMarketingConsentboolean
smsReminderConsentboolean
emailReminderConsentboolean
preferredStaffIdstring
externalIdstring
creatingBranchIdstring
archivedboolean
bannedboolean
clientCategoryIdsstring[]

The list of client category IDs associated with this client

clientIdstring
versioninteger
firstNamestring required
lastNamestring required
mobilestring
createdAtstring date-time
updatedAtstring date-time
photoUrlstring
mergedToClientIdstring
linkedClientIdstring

id of the linked (parent) client this client is linked to, if any

deletedboolean
firstVisitstring date
lastVisitstring date
lastVisitedBranchIdstring

Example response

{
  "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"
}