Passa al contenuto principale

Appointment-services API

Auto-generated from the OpenAPI spec. Run node docs-site/scripts/fetch-openapi.js to regenerate.

GET /api/v1/appointment-services

List Appointment Services

Parameters

NameInRequiredTypeDescription
include_inactivequeryNoboolean
pagequeryNointeger
page_sizequeryNointeger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

POST /api/v1/appointment-services

Create Appointment Service

Request body

FieldRequiredTypeDescription
nameYesstring
descriptionNostring
duration_minutesYesinteger
buffer_minutesNointeger
establishment_idsNoarray

Responses

  • 201 — Successful Response
  • 422 — Validation Error

GET /api/v1/appointment-services/{service_id}/available-instructors

List Available Instructors For Service

Instructors eligible for this service: at least one active availability window scoped to the service (NULL-service_id windows are wildcards for every service), and — when the service is scoped to specific establishments — whose own location matches one of them (a service with no establishment links is open to instructors anywhere).

This does NOT filter by a specific date/day; GET /appointments/available-slots already does that per-instructor. This endpoint only narrows down which instructors are eligible at all.

Parameters

NameInRequiredTypeDescription
service_idpathYesinteger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

GET /api/v1/appointment-services/{service_id}

Get Appointment Service

Parameters

NameInRequiredTypeDescription
service_idpathYesinteger

Responses

  • 200 — Successful Response
  • 422 — Validation Error

PATCH /api/v1/appointment-services/{service_id}

Update Appointment Service

Parameters

NameInRequiredTypeDescription
service_idpathYesinteger

Request body

FieldRequiredTypeDescription
nameNostring
descriptionNostring
duration_minutesNointeger
buffer_minutesNointeger
is_activeNoboolean
establishment_idsNoarray

Responses

  • 200 — Successful Response
  • 422 — Validation Error

DELETE /api/v1/appointment-services/{service_id}

Deactivate Appointment Service

Soft-delete: deactivate the service (reversible via PATCH is_active=true).

This endpoint never hard-deletes — appointment history referencing the service must be preserved, consistent with the "deactivate = reversible" convention established for membership types. There is no companion hard-delete route for appointment services in this round.

Parameters

NameInRequiredTypeDescription
service_idpathYesinteger

Responses

  • 200 — Successful Response
  • 422 — Validation Error