Calendar & Scheduling

Practitioner Rotas

Endpoints to manage Practitioner Rotas in Trybe.

get/shop/practitioner-rotas

List all practitioner rotas

listAllPractitionerRotas

Returns a paginated list of every PractitionerRota the caller is authorised to see, across all practitioners. Useful for schedule management UIs that need to show a unified rota view. Use the nested /shop/practitioners/{practitionerId}/rotas endpoint when you already know the practitioner and want to avoid the extra filtering.

Query parameters

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

Responses

  • 200

    A paginated list of PractitionerRota objects across all practitioners the caller can see.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

post/shop/practitioner-rotas

Create a practitioner rota

createPractitionerRotaStandalone

Creates a new PractitionerRota for the practitioner identified by practitioner_id in the request body. Equivalent to calling the nested POST /shop/practitioners/{practitionerId}/rotas endpoint but doesn't require the practitioner ID in the URL.

Request body

  • practitioner_idobject-idrequired

    Practitioner the new rota applies to. The caller must have SCHEDULE_MANAGE (or equivalent) on every site the practitioner works at — otherwise the request is rejected with 403.

  • start_datedateoptionalnullable

    The date from which this rota is active (YYYY-MM-DD).

  • end_datedateoptionalnullable

    The date on which this rota ends. Omit or pass null for an open-ended rota.

  • The number of weeks in the rolling schedule cycle.

  • availability_rulesobject[]required

    The availability rules for this rota.

Responses

  • 201

    A single PractitionerRota object.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

get/shop/practitioner-rotas/{practitionerRotaId}

Retrieve a practitioner rota by ID

getPractitionerRotaById

Returns the PractitionerRota identified by practitionerRotaId. The rota record includes the practitioner_id it belongs to. Equivalent to calling the nested GET /shop/practitioners/{practitionerId}/rotas/{rotaId} endpoint but doesn't require the practitioner ID in the URL.

Path parameters

Responses

  • 200

    A single PractitionerRota object.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

put/shop/practitioner-rotas/{practitionerRotaId}

Update a practitioner rota by ID

updatePractitionerRotaById

Updates the PractitionerRota identified by practitionerRotaId. The practitioner the rota belongs to cannot be changed; create a new rota and delete the old one if you need to move the schedule between practitioners.

Path parameters

Request body

  • start_datedateoptionalnullable

    The date from which this rota is active (YYYY-MM-DD).

  • end_datedateoptionalnullable

    The date on which this rota ends. Pass null for an open-ended rota.

  • The number of weeks in the rolling schedule cycle.

  • availability_rulesobject[]required

    The availability rules for this rota.

Responses

  • 200

    A single PractitionerRota object.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/shop/practitioner-rotas/{practitionerRotaId}

Delete a practitioner rota by ID

deletePractitionerRotaById

Deletes the PractitionerRota identified by practitionerRotaId. Any future availability windows generated from this rota are invalidated, but existing bookings are retained.

Path parameters

Responses

  • 204

    PractitionerRota deleted successfully.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

get/shop/practitioners/{practitionerId}/rotas

List rotas for a practitioner

listPractitionerRotas

Returns a paginated list of PractitionerRota objects for the given practitioner.

Path parameters

  • practitionerIdstringrequired

    Identifier of the practitioner. Practitioners are the staff members or therapists who deliver appointments; this ID is used to manage their rotas, availability, and assignment to bookings.

  • practitionerIdstringrequired

    Identifier of the practitioner. Practitioners are the staff members or therapists who deliver appointments; this ID is used to manage their rotas, availability, and assignment to bookings.

Query parameters

  • pageintegeroptional

    The page to retrieve results from

  • per_pageintegeroptional

    The number of results to return per page

Responses

  • 200

    A paginated list of PractitionerRota objects.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

post/shop/practitioners/{practitionerId}/rotas

Create a rota for a practitioner

createPractitionerRota

Creates a new PractitionerRota for the given practitioner.

Path parameters

  • practitionerIdstringrequired

    Identifier of the practitioner. Practitioners are the staff members or therapists who deliver appointments; this ID is used to manage their rotas, availability, and assignment to bookings.

Request body

  • practitioner_idobject-idrequired

    Identifier of the practitioner this rota applies to. Must match the practitionerId in the URL; included in the body so the rota is self-describing on writeback to integrations and audit logs.

  • start_datedateoptionalnullable

    The date from which this rota is active (YYYY-MM-DD).

  • end_datedateoptionalnullable

    The date on which this rota ends. Omit or pass null for an open-ended rota.

  • The number of weeks in the rolling schedule cycle.

  • availability_rulesobject[]required

    The availability rules for this rota.

Responses

  • 201

    A single PractitionerRota object.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

get/shop/practitioners/{practitionerId}/rotas/{rotaId}

Retrieve a practitioner rota

getPractitionerRota

Use this endpoint to retrieve a single PractitionerRota.

Path parameters

  • practitionerIdstringrequired

    Identifier of the practitioner. Practitioners are the staff members or therapists who deliver appointments; this ID is used to manage their rotas, availability, and assignment to bookings.

  • rotaIduuidrequired

    The ID of the PractitionerRota.

Responses

  • 200

    A single PractitionerRota object.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

put/shop/practitioners/{practitionerId}/rotas/{rotaId}

Update a practitioner rota

updatePractitionerRota

Use this endpoint to update an existing PractitionerRota.

Path parameters

  • practitionerIdstringrequired

    Identifier of the practitioner. Practitioners are the staff members or therapists who deliver appointments; this ID is used to manage their rotas, availability, and assignment to bookings.

  • rotaIduuidrequired

    The ID of the PractitionerRota.

Request body

  • start_datedateoptionalnullable

    The date from which this rota is active (YYYY-MM-DD).

  • end_datedateoptionalnullable

    The date on which this rota ends. Pass null for an open-ended rota.

  • The number of weeks in the rolling schedule cycle.

  • availability_rulesobject[]required

    The availability rules for this rota.

Responses

  • 200

    A single PractitionerRota object.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found

  • 422

    The request didn't pass validation

delete/shop/practitioners/{practitionerId}/rotas/{rotaId}

Delete a practitioner rota

deletePractitionerRota

Use this endpoint to delete a PractitionerRota.

Path parameters

  • practitionerIdstringrequired

    Identifier of the practitioner. Practitioners are the staff members or therapists who deliver appointments; this ID is used to manage their rotas, availability, and assignment to bookings.

  • rotaIduuidrequired

    The ID of the PractitionerRota.

Responses

  • 204

    PractitionerRota deleted successfully.

  • 401

    The user is unauthenticated

  • 403

    The authenticated user does not have permission.

  • 404

    The resource couldn't be found