Staff Members API: Sample Use Cases and Flows

This article presents possible use cases that your app could support, along with sample flows to implement each use case. These examples can serve as a helpful starting point as you plan your app's functionality.

Connect a Staff Member to a Wix User

By connecting a staff member to a Wix user, you enable the user to manage the staff member's calendar through the Wix back office.

Only a single user can be connected to a single staff member, trying to connect a staff member to a user that is already connected to another staff member will result in an error.

To connect a staff member to a Wix user:

  1. Retrieve Wix Bookings staff members using the Query Staff Members endpoint.

  2. Use the Connect Staff Member to User endpoint to connect a staff member to a Wix user by providing the staff member ID and the user’s email address as parameters. If the email address is not provided, the email address associated with the staff member will be used.

  3. If the email address is not associated with an existing Wix user, an email invite will be sent to the address provided.

  4. To check the connection status, use the Get Staff Member endpoint with ASSOCIATED_IDENTITY_STATUS in the fields parameter.

Assign a Staff Working Hours Schedule

By assigning a custom working hours schedule to a staff member, you can specify their availability for bookings, which will override the default business hours.

To assign a working hours schedule to a staff member:

  1. Retrieve Wix Bookings staff members using the Query Staff Members endpoint, specifying RESOURCE_DETAILS in the fields parameter. The staff member’s events schedule ID is found under the resource property.

  2. Use the Assign Working Hours Schedule to Staff Member endpoint to assign a working hours schedule to a staff member by providing the staff member ID and the working hours schedule ID as parameters. Currently, only the staff’s events schedule ID is supported.

  3. To add or remove working hours from the staff's schedule, use the Events API to create working hours events linked to the staff’s events schedule ID.

Did this help?