Version 1.0.0
Workshift management for a personnel administration application. This microservice handles the scheduling, assignment, and modification of employee work shifts, including last-minute adjustments and cancellations.
| Method | Path | Description |
|---|---|---|
| GET | /workshifts | Get all workshifts |
| POST | /workshifts | Create a new workshift |
| GET | /workshifts/doctor/{doctorId} | Get workshifts by doctor ID |
| POST | /workshifts/week | Create a new workshift for a week |
| DELETE | /workshifts/{id} | Delete a workshift by ID |
| GET | /workshifts/{id} | Get a workshift by ID |
| PUT | /workshifts/{id} | Update a workshift by ID |
| Name | Path | Description |
|---|---|---|
| Workshift | #/components/schemas/Workshift | |
| WorkshiftInput | #/components/schemas/WorkshiftInput | |
| cookieAuth | #/components/securitySchemes/cookieAuth |
-
Summary
Get all workshifts -
Security
cookieAuth
- 200 Retrieve a list of workshifts
application/json
{
id?: string
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}[]- 500 Server error
-
Summary
Create a new workshift -
Security
cookieAuth
- application/json
{
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}- 201 Workshift created
application/json
{
id?: string
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}- 400 Validation error
-
Summary
Get workshifts by doctor ID -
Security
cookieAuth
- 200 Lista de workshifts
application/json
{
id?: string
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}[]- 500 Error del servidor
-
Summary
Create a new workshift for a week -
Security
cookieAuth
- application/json
{
// Unique identifier for the doctor
doctorId: string
// Unique identifier for the clinic
clinicId: string
// Duration of each work shift in minutes
duration: integer
// Start date of the week, must be a Monday
periodStartDate?: string
// End date of the week, must be a Sunday within the same week as weekStartDate
periodEndDate?: string
}- 201 Workshifts created successfully
application/json
{
id?: string
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}[]- 400 Invalid input or validation error
application/json
{
// Error message explaining the issue
message?: string
}-
Summary
Delete a workshift by ID -
Security
cookieAuth
-
204 Workshift deleted
-
404 Workshift not found
-
500 Server error
-
Summary
Get a workshift by ID -
Security
cookieAuth
- 200 Retrieve a workshift
application/json
{
id?: string
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}-
404 Workshift not found
-
500 Server error
-
Summary
Update a workshift by ID -
Security
cookieAuth
- application/json
{
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}- 200 Workshift updated
application/json
{
id?: string
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}-
400 Validation error
-
404 Workshift not found
{
id?: string
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}{
doctorId?: string
clinicId?: string
startDate?: string
duration?: integer
}{
"type": "apiKey",
"in": "cookie",
"name": "token"
}