# Phorest

> Manage salon clients and leads, book and cancel appointments, and follow new bookings and reviews.

App · 26 actions. Web page: https://docs.lodol.com/docs/integrations/phorest

## Actions

### Add a break

Block out time in a staff member's appointment book, such as lunch.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Staff member (`staff_id`, text, required): The staff member taking the break.
- Date (`break_date`, date, required): The day of the break.
- Start time (`start_time`, time, required): When the break starts.
- End time (`end_time`, time, required): When the break ends.
- Label (`label`, text): What the break is for, such as lunch.
- Paid (`paid_break`, true/false): On if the break is paid.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "breakDate": "example",
    "breakId": "example",
    "endTime": "example",
    "label": "example",
    "machineId": "example",
    "paidBreak": true,
    "roomId": "example",
    "staffId": "example",
    "startTime": "example",
    "version": 1
  }
}
```

### Add an appointment note

Set the service note on an appointment, which staff see in the appointment book.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Appointment ID (`appointment_id`, text, required): The appointment, by ID.
- Note (`note`, text, required): The note.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "noteId": "example",
    "serviceNote": "example"
  }
}
```

### Book an appointment

Book a client in for a service with a staff member at a set time.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Client ID (`client_id`, text, required): The client to book, by ID.
- Service (`service_id`, text, required): The service to book.
- Staff member (`staff_id`, text, required): The staff member who does the service.
- Start time (`start_time`, date and time, required): When the appointment starts.
- Room ID (`room_id`, text): A room to hold, by ID.
- Note (`note`, text): A note on the booking.
- Book even if it clashes (`force_selected_time`, true/false): On to book the time even if Phorest finds a clash.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "bookingId": "example",
    "bookingStatus": "ACTIVE",
    "clientAppointmentSchedules": [
      {
        "clientId": "example",
        "serviceSchedules": [
          {
            "alternativeStaffMember": true,
            "appointmentId": "example",
            "branchServiceGroupId": "example",
            "clientCourseItemId": "example",
            "endTime": "example",
            "machineId": "example",
            "price": 1,
            "roomId": "example",
            "serviceGroupItemOptionId": "example",
            "serviceId": "example",
            "staffId": "example",
            "staffRequest": true,
            "startTime": "example"
          }
        ]
      }
    ],
    "clientId": "example",
    "note": "example",
    "schedules": [
      {
        "alternativeStaffMember": true,
        "appointmentId": "example",
        "branchServiceGroupId": "example",
        "clientCourseItemId": "example",
        "endTime": "example",
        "machineId": "example",
        "price": 1,
        "roomId": "example",
        "serviceGroupItemOptionId": "example",
        "serviceId": "example",
        "staffId": "example",
        "staffRequest": true,
        "startTime": "example"
      }
    ]
  }
}
```

### Cancel a booking

Cancel a booking and every appointment in it.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Booking ID (`booking_id`, text, required): The booking, by ID.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {}
}
```

### Cancel appointments

Cancel one or more appointments.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Appointment IDs (`appointment_ids`, list, required): The appointments to cancel, by ID.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {}
}
```

### Check in a client

Check a client in for their appointments on a day.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Client ID (`client_id`, text, required): The client, by ID.
- Date (`date`, date): The day of the appointments. Leave empty for today.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {}
}
```

### Confirm a client's appointments

Mark a client's appointments on a day as confirmed.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Client ID (`client_id`, text, required): The client whose appointments to confirm, by ID.
- Date (`date`, date): The day of the appointments. Leave empty for today.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "appointments": [
        {
          "activationState": "RESERVED",
          "appointmentDate": "example",
          "appointmentId": "example",
          "bookingId": "example",
          "branchId": "example",
          "clientCourseId": "example",
          "clientCourseItemId": "example",
          "clientId": "example",
          "confirmed": true,
          "courseId": "example",
          "courseName": "example",
          "createdAt": "example",
          "deleted": true,
          "depositAmount": 1,
          "depositDateTime": "example",
          "endTime": "example",
          "groupBookingId": "example",
          "internetServiceCategories": [
            {
              "id": "example",
              "name": "example"
            }
          ],
          "isFinishAppointment": true,
          "machineId": "example",
          "notes": "example",
          "parentServiceGroupId": "example",
          "preferredStaff": true,
          "price": 1,
          "purchasingBranchId": "example",
          "roomId": "example",
          "serviceGroupId": "example",
          "serviceGroupItemOptionId": "example",
          "serviceId": "example",
          "serviceName": "example",
          "serviceRewardId": "example",
          "source": "example",
          "staffId": "example",
          "staffRequest": true,
          "startTime": "example",
          "state": "BOOKED",
          "updatedAt": "example",
          "version": 1,
          "waitingListDateTime": "example"
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### Create a client

Add a client to the business. Give a mobile number or an email so the salon can reach them.

**Inputs**

- First name (`first_name`, text, required): First name.
- Last name (`last_name`, text, required): Last name.
- Mobile (`mobile`, text): Mobile number, with the country code.
- Email (`email`, text): Email address.
- Landline (`land_line`, text): Landline number.
- Date of birth (`birth_date`, date): Date of birth.
- Gender (`gender`, text): Gender. One of: `MALE`, `FEMALE`, `NON_BINARY` (Non binary), `NOT_SPECIFIED` (Not specified), `PREFER_NOT_TO_SAY` (Prefer not to say), `UNKNOWN`.
- Notes (`notes`, text): Notes about the client.
- Street address (`street_address1`, text): First line of the address.
- Street address line 2 (`street_address2`, text): Second line of the address.
- City (`city`, text): Town or city.
- State (`state`, text): State or county.
- Postal code (`postal_code`, text): Postal or ZIP code.
- Country (`country`, text): Country.
- Marketing texts (`sms_marketing_consent`, true/false): On if the client agreed to marketing texts.
- Marketing email (`email_marketing_consent`, true/false): On if the client agreed to marketing email.
- Reminder texts (`sms_reminder_consent`, true/false): On if the client agreed to appointment reminders by text.
- Reminder email (`email_reminder_consent`, true/false): On if the client agreed to appointment reminders by email.
- External ID (`external_id`, text): Your own ID for the client, from another system.
- Client categories (`client_category_ids`, list): The client categories the client belongs to.
- Branch (`creating_branch_id`, text): The salon the client is added at.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "address": {
      "city": "example",
      "country": "example",
      "postalCode": "example",
      "state": "example",
      "streetAddress1": "example",
      "streetAddress2": "example"
    },
    "archived": true,
    "banned": true,
    "birthDate": "example",
    "clientCategoryIds": [
      "example"
    ],
    "clientId": "example",
    "clientSince": "example",
    "createdAt": "example",
    "creatingBranchId": "example",
    "creditAccount": {
      "creditDays": 1,
      "creditLimit": 1,
      "outstandingBalance": 1
    },
    "deleted": true,
    "email": "example",
    "emailMarketingConsent": true,
    "emailReminderConsent": true,
    "externalId": "example",
    "firstName": "example",
    "firstVisit": "example",
    "gender": "MALE",
    "hasActiveMembership": true,
    "landLine": "example",
    "lastName": "example",
    "lastVisit": "example",
    "lastVisitedBranchId": "example",
    "linkedClientId": "example",
    "linkedClientMobile": "example",
    "loyaltyCard": {
      "points": 1,
      "serial": "example"
    },
    "mergedToClientId": "example",
    "mobile": "example",
    "notes": "example",
    "photoUrl": "example",
    "preferredStaffId": "example",
    "smsMarketingConsent": true,
    "smsReminderConsent": true,
    "updatedAt": "example",
    "version": 1
  }
}
```

### Create a lead

Add a lead: someone interested in the salon who isn't a client yet.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- First name (`first_name`, text, required): First name.
- Last name (`last_name`, text, required): Last name.
- Mobile (`mobile`, text, required): Mobile number, with the country code.
- Email (`email`, text, required): Email address.
- Contact by email (`contactable_by_email`, true/false): On if the salon may email them.
- Contact by text (`contactable_by_mobile`, true/false): On if the salon may text them.
- Marketing opt-in (`marketing_opt_in`, true/false): On if they agreed to marketing.
- Source (`source`, text): Where the lead came from, such as a website form.
- Note (`note`, text): A note about the lead.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "message": "example",
    "success": true
  }
}
```

### Delete a break

Remove a break from the appointment book.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Break ID (`break_id`, text, required): The break, by ID.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {}
}
```

### Find available appointment times

Find the times a service can be booked between two moments, optionally with one staff member.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Service (`service_id`, text, required): The service to book.
- From (`start_time`, date and time, required): Earliest start to look at.
- To (`end_time`, date and time, required): Latest time to look at.
- Staff member (`staff_id`, text): Only times with this staff member. Leave empty for anyone.
- Client ID (`client_id`, text): The client it's for, by ID.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "clientSchedules": [
          {
            "clientId": "example",
            "serviceSchedules": [
              {
                "alternativeStaffMember": true,
                "appointmentId": "example",
                "branchServiceGroupId": "example",
                "clientCourseItemId": "example",
                "endTime": "example",
                "machineId": "example",
                "price": 1,
                "roomId": "example",
                "serviceGroupItemOptionId": "example",
                "serviceId": "example",
                "staffId": "example",
                "staffRequest": true,
                "startTime": "example"
              }
            ]
          }
        ],
        "startTime": "example"
      }
    ]
  }
}
```

### Get a client

Get one client's details, consents, loyalty points and visits.

**Inputs**

- Client ID (`client_id`, text, required): The client, by ID.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "address": {
      "city": "example",
      "country": "example",
      "postalCode": "example",
      "state": "example",
      "streetAddress1": "example",
      "streetAddress2": "example"
    },
    "archived": true,
    "banned": true,
    "birthDate": "example",
    "clientCategoryIds": [
      "example"
    ],
    "clientId": "example",
    "clientSince": "example",
    "createdAt": "example",
    "creatingBranchId": "example",
    "creditAccount": {
      "creditDays": 1,
      "creditLimit": 1,
      "outstandingBalance": 1
    },
    "deleted": true,
    "email": "example",
    "emailMarketingConsent": true,
    "emailReminderConsent": true,
    "externalId": "example",
    "firstName": "example",
    "firstVisit": "example",
    "gender": "MALE",
    "hasActiveMembership": true,
    "landLine": "example",
    "lastName": "example",
    "lastVisit": "example",
    "lastVisitedBranchId": "example",
    "linkedClientId": "example",
    "linkedClientMobile": "example",
    "loyaltyCard": {
      "points": 1,
      "serial": "example"
    },
    "mergedToClientId": "example",
    "mobile": "example",
    "notes": "example",
    "photoUrl": "example",
    "preferredStaffId": "example",
    "smsMarketingConsent": true,
    "smsReminderConsent": true,
    "updatedAt": "example",
    "version": 1
  }
}
```

### Get an appointment

Get one appointment: its service, staff member, time, price and status.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Appointment ID (`appointment_id`, text, required): The appointment, by ID.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "activationState": "RESERVED",
    "appointmentDate": "example",
    "appointmentId": "example",
    "bookingId": "example",
    "branchId": "example",
    "clientCourseId": "example",
    "clientCourseItemId": "example",
    "clientId": "example",
    "confirmed": true,
    "courseId": "example",
    "courseName": "example",
    "createdAt": "example",
    "deleted": true,
    "depositAmount": 1,
    "depositDateTime": "example",
    "endTime": "example",
    "groupBookingId": "example",
    "internetServiceCategories": [
      {
        "id": "example",
        "name": "example"
      }
    ],
    "isFinishAppointment": true,
    "machineId": "example",
    "notes": "example",
    "parentServiceGroupId": "example",
    "preferredStaff": true,
    "price": 1,
    "purchasingBranchId": "example",
    "roomId": "example",
    "serviceGroupId": "example",
    "serviceGroupItemOptionId": "example",
    "serviceId": "example",
    "serviceName": "example",
    "serviceRewardId": "example",
    "source": "example",
    "staffId": "example",
    "staffRequest": true,
    "startTime": "example",
    "state": "BOOKED",
    "updatedAt": "example",
    "version": 1,
    "waitingListDateTime": "example"
  }
}
```

### List a client's service history

List the services a client has had, visit by visit.

**Inputs**

- Client ID (`client_id`, text, required): The client, by ID.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "clientServiceHistories": [
        {
          "bookingId": "example",
          "branchId": "example",
          "clientId": "example",
          "date": "example",
          "notes": "example",
          "services": [
            {
              "appointmentId": "example",
              "cancelled": true,
              "checkedIn": true,
              "clientCourseItemId": "example",
              "depositAmount": 1,
              "depositTime": "example",
              "description": "example",
              "discount": 1,
              "duration": 1,
              "fee": 1,
              "groupBookingId": "example",
              "originalPrice": 1,
              "serviceCategoryId": "example",
              "serviceGroupId": "example",
              "serviceGroupItemOptionId": "example",
              "serviceId": "example",
              "serviceRewardId": "example",
              "staffId": "example",
              "time": "example",
              "waitingList": true
            }
          ],
          "systemNotes": "example"
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List appointments

List a salon's appointments between two dates (at most a month apart), or those changed lately.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- From (`from_date`, date): First day to include.
- To (`to_date`, date): Last day to include.
- Staff member (`staff_id`, text): Only this staff member's appointments.
- Client ID (`client_id`, text): Only this client's appointments, by ID.
- Updated after (`updated_from`, date and time): Only appointments changed at or after this time.
- Updated before (`updated_to`, date and time): Only appointments changed at or before this time.
- Include canceled (`fetch_canceled`, true/false): On to include canceled appointments.
- Include notes (`fetch_notes`, true/false): On to include each appointment's notes.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "appointments": [
        {
          "activationState": "RESERVED",
          "appointmentDate": "example",
          "appointmentId": "example",
          "bookingId": "example",
          "branchId": "example",
          "clientCourseId": "example",
          "clientCourseItemId": "example",
          "clientId": "example",
          "confirmed": true,
          "courseId": "example",
          "courseName": "example",
          "createdAt": "example",
          "deleted": true,
          "depositAmount": 1,
          "depositDateTime": "example",
          "endTime": "example",
          "groupBookingId": "example",
          "internetServiceCategories": [
            {
              "id": "example",
              "name": "example"
            }
          ],
          "isFinishAppointment": true,
          "machineId": "example",
          "notes": "example",
          "parentServiceGroupId": "example",
          "preferredStaff": true,
          "price": 1,
          "purchasingBranchId": "example",
          "roomId": "example",
          "serviceGroupId": "example",
          "serviceGroupItemOptionId": "example",
          "serviceId": "example",
          "serviceName": "example",
          "serviceRewardId": "example",
          "source": "example",
          "staffId": "example",
          "staffRequest": true,
          "startTime": "example",
          "state": "BOOKED",
          "updatedAt": "example",
          "version": 1,
          "waitingListDateTime": "example"
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List branches

List the business's salons (branches), with their addresses and time zones.

**Inputs**

- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "branches": [
        {
          "accountId": 1,
          "branchId": "example",
          "city": "example",
          "country": "example",
          "currencyCode": "example",
          "latitude": 1,
          "longitude": 1,
          "name": "example",
          "postalCode": "example",
          "state": "example",
          "streetAddress1": "example",
          "streetAddress2": "example",
          "timeZone": "example"
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List breaks

List the breaks booked in a salon's appointment book between two dates, at most a month apart.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- From (`from_date`, date, required): First day to include.
- To (`to_date`, date, required): Last day to include.
- Staff member (`staff_id`, text): Only this staff member's breaks.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "breaks": [
        {
          "breakDate": "example",
          "breakId": "example",
          "endTime": "example",
          "label": "example",
          "machineId": "example",
          "paidBreak": true,
          "roomId": "example",
          "staffId": "example",
          "startTime": "example",
          "version": 1
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List client categories

List the categories clients can be put in, such as VIP.

**Inputs**

- Name (`name`, text): Only categories with this name.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "clientCategories": [
        {
          "archived": true,
          "categoryId": "example",
          "description": "example",
          "discountOffers": true,
          "name": "example"
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List clients

Find clients by name, email or mobile, or list those changed in a time range.

**Inputs**

- Email (`email`, text): Only the client with this email.
- Mobile (`phone`, text): Only the client with this mobile number.
- First name (`first_name`, text): Only clients with this first name. Start with `~` and end with `%` to match the beginning, such as `~Jo%`.
- Last name (`last_name`, text): Only clients with this last name, matched the same way as the first name.
- Updated after (`updated_after`, date and time): Only clients changed after this time.
- Updated before (`updated_before`, date and time): Only clients changed before this time.
- External ID (`external_id`, text): Only the client with this external ID.
- Include archived (`include_archived`, true/false): On to include archived clients.
- Has a membership (`has_active_membership`, true/false): On for clients with an active membership only, off for those without.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "clients": [
        {
          "address": {
            "city": "example",
            "country": "example",
            "postalCode": "example",
            "state": "example",
            "streetAddress1": "example",
            "streetAddress2": "example"
          },
          "archived": true,
          "banned": true,
          "birthDate": "example",
          "clientCategoryIds": [
            "example"
          ],
          "clientId": "example",
          "clientSince": "example",
          "createdAt": "example",
          "creatingBranchId": "example",
          "creditAccount": {
            "creditDays": 1,
            "creditLimit": 1,
            "outstandingBalance": 1
          },
          "deleted": true,
          "email": "example",
          "emailMarketingConsent": true,
          "emailReminderConsent": true,
          "externalId": "example",
          "firstName": "example",
          "firstVisit": "example",
          "gender": "MALE",
          "hasActiveMembership": true,
          "landLine": "example",
          "lastName": "example",
          "lastVisit": "example",
          "lastVisitedBranchId": "example",
          "linkedClientId": "example",
          "linkedClientMobile": "example",
          "loyaltyCard": {
            "points": 1,
            "serial": "example"
          },
          "mergedToClientId": "example",
          "mobile": "example",
          "notes": "example",
          "photoUrl": "example",
          "preferredStaffId": "example",
          "smsMarketingConsent": true,
          "smsReminderConsent": true,
          "updatedAt": "example",
          "version": 1
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List leads

List a salon's leads: people interested who aren't clients yet.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Name (`name`, text): Only leads with this first and last name.
- Statuses (`status`, list): Only leads in these statuses. One or more of: `NEW_LEAD` (New lead), `CONTACT_ATTEMPTED` (Contact attempted), `CONTACT_MADE` (Contact made), `INTERESTED`, `APPOINTMENT_SCHEDULED` (Appointment scheduled), `CONVERTED`, `LOST`, `DELETED`.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "leads": [
        {
          "adCampaignName": "example",
          "branchId": "example",
          "businessId": "example",
          "clientId": "example",
          "contactableByEmail": true,
          "contactableByMobile": true,
          "email": "example",
          "emailMarketingOptOut": true,
          "firstName": "example",
          "lastActivityDate": "example",
          "lastName": "example",
          "leadId": 1,
          "messageHistory": [
            {
              "channel": "example",
              "sendDate": "example",
              "type": "example"
            }
          ],
          "mobile": "example",
          "note": "example",
          "smsMarketingOptOut": true,
          "source": "example",
          "status": "NEW_LEAD",
          "updateAction": "MANUAL_UPDATE",
          "updatedBy": "example"
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List reviews

List the reviews clients left after their visits.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Client ID (`client_id`, text): Only this client's reviews, by ID.
- Date (`review_date`, date): Only reviews left on this day.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "reviews": [
        {
          "clientFirstName": "example",
          "clientId": "example",
          "clientLastName": "example",
          "facebookReview": true,
          "rating": 1,
          "reviewDate": "example",
          "reviewId": "example",
          "staffFirstName": "example",
          "staffId": "example",
          "staffLastName": "example",
          "text": "example",
          "twitterReview": true,
          "visitDate": "example"
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List service categories

List the categories a salon's services are grouped into.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "serviceCategories": [
        {
          "categoryId": "example",
          "color": 1,
          "description": "example",
          "internetServiceCategories": [
            {
              "id": "example",
              "name": "example"
            }
          ],
          "name": "example"
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List services

List the services a salon offers, with their prices and durations.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Category (`category_id`, text): Only services in this category.
- Include archived (`include_archived`, true/false): On to include archived services.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "services": [
        {
          "addonServiceIds": [
            "example"
          ],
          "archived": true,
          "categoryId": "example",
          "categoryName": "example",
          "department": {
            "id": "example",
            "name": "example"
          },
          "disqualifiedStaff": [
            "example"
          ],
          "duration": 1,
          "finishDuration": 1,
          "gapTime": 1,
          "internetDescription": "example",
          "internetEnabled": true,
          "internetName": "example",
          "internetServiceCategories": [
            {
              "id": "example",
              "name": "example"
            }
          ],
          "isAddonOnly": true,
          "machines": [
            "example"
          ],
          "name": "example",
          "price": 1,
          "rooms": [
            "example"
          ],
          "serviceId": "example",
          "staffCategories": {
            "prices": [
              {
                "id": "example",
                "price": 1
              }
            ]
          },
          "taxRates": [
            "example"
          ],
          "userDurations": [
            {
              "duration": 1,
              "userRef": "example"
            }
          ],
          "userFinishDurations": [
            {
              "duration": 1,
              "userRef": "example"
            }
          ],
          "userGapTimes": [
            {
              "gapTime": 1,
              "userRef": "example"
            }
          ],
          "userPrices": [
            {
              "price": 1,
              "userRef": "example"
            }
          ],
          "version": 1
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### List staff

List a salon's staff members.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Include archived (`fetch_archived`, true/false): On to include staff who have left.
- Page size (`size`, number): How many records to return on a page, up to 200. Phorest returns 20 when this is empty. From 1 to 200.
- Page (`page`, number): Which page to read, starting at 0 for the first. At least 0.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "staffs": [
        {
          "archived": true,
          "birthDate": "example",
          "branchId": "example",
          "disqualifiedServices": [
            "example"
          ],
          "email": "example",
          "firstName": "example",
          "gender": "example",
          "hideFromAppointmentScreen": true,
          "hideFromOnlineBookings": true,
          "imageUrl": "example",
          "lastName": "example",
          "mobile": "example",
          "notes": "example",
          "onlineProfile": "example",
          "payrollNumber": "example",
          "selfEmployed": true,
          "staffCategoryId": "example",
          "staffCategoryName": "example",
          "staffId": "example",
          "startDate": "example",
          "taxNumber": "example",
          "userId": "example"
        }
      ]
    },
    "page": {
      "number": 1,
      "size": 1,
      "totalElements": 1,
      "totalPages": 1
    }
  }
}
```

### Update a client

Change a client's details. Only the fields filled in change; the rest stay as they are.

**Inputs**

- Client ID (`client_id`, text, required): The client, by ID.
- First name (`first_name`, text): New first name.
- Last name (`last_name`, text): New last name.
- Mobile (`mobile`, text): Mobile number, with the country code.
- Email (`email`, text): Email address.
- Landline (`land_line`, text): Landline number.
- Date of birth (`birth_date`, date): Date of birth.
- Gender (`gender`, text): Gender. One of: `MALE`, `FEMALE`, `NON_BINARY` (Non binary), `NOT_SPECIFIED` (Not specified), `PREFER_NOT_TO_SAY` (Prefer not to say), `UNKNOWN`.
- Notes (`notes`, text): Notes about the client.
- Street address (`street_address1`, text): First line of the address.
- Street address line 2 (`street_address2`, text): Second line of the address.
- City (`city`, text): Town or city.
- State (`state`, text): State or county.
- Postal code (`postal_code`, text): Postal or ZIP code.
- Country (`country`, text): Country.
- Marketing texts (`sms_marketing_consent`, true/false): On if the client agreed to marketing texts.
- Marketing email (`email_marketing_consent`, true/false): On if the client agreed to marketing email.
- Reminder texts (`sms_reminder_consent`, true/false): On if the client agreed to appointment reminders by text.
- Reminder email (`email_reminder_consent`, true/false): On if the client agreed to appointment reminders by email.
- External ID (`external_id`, text): Your own ID for the client, from another system.
- Client categories (`client_category_ids`, list): The client categories the client belongs to.
- Archived (`archived`, true/false): On to archive the client, off to bring them back.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "address": {
      "city": "example",
      "country": "example",
      "postalCode": "example",
      "state": "example",
      "streetAddress1": "example",
      "streetAddress2": "example"
    },
    "archived": true,
    "banned": true,
    "birthDate": "example",
    "clientCategoryIds": [
      "example"
    ],
    "clientId": "example",
    "clientSince": "example",
    "createdAt": "example",
    "creatingBranchId": "example",
    "creditAccount": {
      "creditDays": 1,
      "creditLimit": 1,
      "outstandingBalance": 1
    },
    "deleted": true,
    "email": "example",
    "emailMarketingConsent": true,
    "emailReminderConsent": true,
    "externalId": "example",
    "firstName": "example",
    "firstVisit": "example",
    "gender": "MALE",
    "hasActiveMembership": true,
    "landLine": "example",
    "lastName": "example",
    "lastVisit": "example",
    "lastVisitedBranchId": "example",
    "linkedClientId": "example",
    "linkedClientMobile": "example",
    "loyaltyCard": {
      "points": 1,
      "serial": "example"
    },
    "mergedToClientId": "example",
    "mobile": "example",
    "notes": "example",
    "photoUrl": "example",
    "preferredStaffId": "example",
    "smsMarketingConsent": true,
    "smsReminderConsent": true,
    "updatedAt": "example",
    "version": 1
  }
}
```

### Update a lead

Change a lead's details or status. Only the fields filled in change.

**Inputs**

- Branch (`branch_id`, text, required): The salon (branch) to work in.
- Lead ID (`lead_id`, number, required): The lead, by ID. At least 1.
- First name (`first_name`, text): New first name.
- Last name (`last_name`, text): New last name.
- Mobile (`mobile`, text): New mobile number.
- Email (`email`, text): New email address.
- Status (`status`, text): Where the lead is now. One of: `NEW_LEAD` (New lead), `CONTACT_ATTEMPTED` (Contact attempted), `CONTACT_MADE` (Contact made), `INTERESTED`, `APPOINTMENT_SCHEDULED` (Appointment scheduled), `CONVERTED`, `LOST`, `DELETED`.
- Contact by email (`contactable_by_email`, true/false): On if the salon may email them.
- Contact by text (`contactable_by_mobile`, true/false): On if the salon may text them.
- Client ID (`client_id`, text): The client the lead became, by ID.

**Outputs**

- `data` (object): The response from Phorest.

**Example output**

```json
{
  "data": {
    "adCampaignName": "example",
    "branchId": "example",
    "businessId": "example",
    "clientId": "example",
    "contactableByEmail": true,
    "contactableByMobile": true,
    "email": "example",
    "emailMarketingOptOut": true,
    "firstName": "example",
    "lastActivityDate": "example",
    "lastName": "example",
    "leadId": 1,
    "messageHistory": [
      {
        "channel": "example",
        "sendDate": "example",
        "type": "example"
      }
    ],
    "mobile": "example",
    "note": "example",
    "smsMarketingOptOut": true,
    "source": "example",
    "status": "NEW_LEAD",
    "updateAction": "MANUAL_UPDATE",
    "updatedBy": "example"
  }
}
```
