Staff Members API: Sample Use Cases and Flows

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

Connect a staff member to a Wix user

By connecting a staff member to a Wix user, you enable them to manage their own working hour schedule in their dashboard.

To connect a staff member to a Wix user:

  1. Call Query Staff Members (SDK | REST). Save the relevant staff member ID.
  2. Call Connect Staff Member to User (SDK | REST). Specify the staff member ID. If an existing Wix user is related to the staff member but has a different email address than the staff member's email, specify that email address.
  3. Call Get Staff Member (SDK | REST), specifying ASSOCIATED_IDENTITY_STATUS in the fields parameter. Check the value of the associatedWixIdentity.connection.status field.

Assign a staff working hour schedule

By assigning a custom working hour schedule to a staff member, they can have different working hours than the business.

To assign a working hour schedule to a staff member:

  1. Call Query Staff Members (SDK | REST), specifying RESOURCE_DETAILS in the fields parameter. Save the relevant staff member ID and their resource.eventsSchedule.id.
  2. Call Assign Working Hours Schedule to Staff Member (SDK | REST). Specify the values retrieved in the previous step as staffMemberId and scheduleId. Note that you must specify the event schedule ID from step 1, even though the method is called Assign Working Hours Schedule to Staff Member.
  3. Optional: If you want to add working hours, call Create Event (SDK | REST). Specify the schedule ID. If it's a recurring event, specify also recurrenceRule. Learn more about recurring events (SDK | REST).
  4. Optional: If you want to remove working hours, call Cancel Event (SDK | REST).
Did this help?