{
  "openapi": "3.1.1",
  "info": {
    "title": "TurnoVirtual API",
    "version": "v1"
  },
  "paths": {
    "/api/v1/me": {
      "get": {
        "tags": [
          "me"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/scopes": {
      "get": {
        "tags": [
          "booking"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfBookingScopeDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/cities": {
      "get": {
        "tags": [
          "booking"
        ],
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfBookingCityDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/professionals": {
      "get": {
        "tags": [
          "booking"
        ],
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfBookingProfessionalDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/specialties": {
      "get": {
        "tags": [
          "booking"
        ],
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfBookingSpecialtyDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/coverages": {
      "get": {
        "tags": [
          "booking"
        ],
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfBookingCoverageDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/practices": {
      "get": {
        "tags": [
          "booking"
        ],
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specialtyId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfBookingPracticeDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/schedules": {
      "get": {
        "tags": [
          "booking"
        ],
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "professionalId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specialtyId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "coverageId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfBookingScheduleDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/schedules/{id}/slots": {
      "get": {
        "tags": [
          "booking"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specialtyId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "practiceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfBookingSlotDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/appointments/search": {
      "post": {
        "tags": [
          "booking"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingAppointmentSearch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfBookingAppointmentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/appointments": {
      "post": {
        "tags": [
          "booking"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingAppointmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingAppointmentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/slot-unavailable: The start is not offered, already taken, or outside the booking window. Type /api/problems/already-booked: The client already holds an appointment on the schedule at an overlapping time.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/RefusedStartsMembers"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity. Type /api/problems/booking-refused: The booking misses something the wizard asks for, or names something the schedule does not offer.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/booking/appointments/{id}/cancel": {
      "post": {
        "tags": [
          "booking"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingCancelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/accounts": {
      "get": {
        "tags": [
          "manage"
        ],
        "summary": "Lists the accounts (an Empresa, or one of its sedes) this connection can act in, each with its id, Empresa (name and logo URL), sede (name and city, when the account is one sede's) and the caller's roles there; pass an id as account to any tool to act in that account",
        "operationId": "list_accounts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfAccountDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/schedules": {
      "get": {
        "tags": [
          "manage"
        ],
        "summary": "Lists the schedules the caller can see, each with its id, name, state, time zone, branch, professionals and specialties; a person sees only the schedules they see in the portal's Agenda, a tenant key every schedule. Paged: pass limit (1-500, default 100) and the previous answer's nextCursor as cursor.",
        "operationId": "list_schedules",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfManageScheduleDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/schedules/{id}/slots": {
      "get": {
        "tags": [
          "manage"
        ],
        "summary": "Lists the free slots (start and end) of one schedule, by its id from list_schedules, whose start is from from up to to (ISO 8601 instants with offset, at most 31 days apart), at the length specialtyId or practiceId gives, as the portal's Agenda offers them to staff, private times included; a start from the answer can be booked with create_appointment; a person sees only the schedules they see in the portal's Agenda, a tenant key every schedule. Paged: pass limit (1-500, default 100) and the previous answer's nextCursor as cursor.",
        "operationId": "list_slots",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "specialtyId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "practiceId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfManageSlotDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/appointments": {
      "get": {
        "tags": [
          "manage"
        ],
        "summary": "Lists the appointments that overlap from and to (ISO 8601 instants with offset), optionally on one scheduleId and in the states given as comma-separated names (ASSIGNED,ARRIVED), each with its start, end, state, schedule, professional, specialty and client; a person sees only the schedules they see in the portal's Agenda, a tenant key every schedule. Paged: pass limit (1-500, default 100) and the previous answer's nextCursor as cursor.",
        "operationId": "list_appointments",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scheduleId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfManageAppointmentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "manage"
        ],
        "summary": "Books one client on one schedule at one or more starts (up to 52, each an ISO 8601 instant with offset and optional minutes), all of them or none; overbook books past the slot's capacity. Takes scheduleId, professionalId and specialtyId from list_schedules and the client's identity and name, and answers the appointments booked.",
        "operationId": "create_appointment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageAppointmentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ManageAppointmentDto"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/slot-unavailable: The start is not offered, already taken, or outside the booking window. Type /api/problems/already-booked: The client already holds an appointment on the schedule at an overlapping time.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/RefusedStartsMembers"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity. Type /api/problems/appointment-refused: The appointment misses something the portal asks for, or names something the agenda does not offer.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/appointments/{id}": {
      "patch": {
        "tags": [
          "manage"
        ],
        "summary": "Moves an appointment within its own schedule to a new start (an ISO 8601 instant with offset), a new length in minutes, or both; a field left out keeps its value. Takes the appointment id from list_appointments and answers the appointment as moved.",
        "operationId": "update_appointment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageAppointmentUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageAppointmentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/slot-unavailable: The start is not offered, already taken, or outside the booking window. Type /api/problems/already-booked: The client already holds an appointment on the schedule at an overlapping time.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ProblemDetails"
                    },
                    {
                      "$ref": "#/components/schemas/RefusedStartsMembers"
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity. Type /api/problems/appointment-refused: The appointment misses something the portal asks for, or names something the agenda does not offer.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/appointments/{id}/confirm": {
      "post": {
        "tags": [
          "manage"
        ],
        "summary": "Confirms a REQUESTED appointment, moving it to ASSIGNED; optional notes are appended to the appointment's notes. Takes the appointment id from list_appointments and answers the appointment in its new state.",
        "operationId": "confirm_appointment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageAppointmentStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageAppointmentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/state-change-refused: The appointment's current state does not allow this step.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/appointments/{id}/cancel": {
      "post": {
        "tags": [
          "manage"
        ],
        "summary": "Cancels a REQUESTED or ASSIGNED appointment, moving it to SUSPENDED; optional notes are appended to the appointment's notes. Takes the appointment id from list_appointments and answers the appointment in its new state.",
        "operationId": "cancel_appointment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageAppointmentStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageAppointmentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/state-change-refused: The appointment's current state does not allow this step.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/appointments/{id}/arrive": {
      "post": {
        "tags": [
          "manage"
        ],
        "summary": "Marks that the client of an ASSIGNED appointment has arrived, moving it to ARRIVED; optional notes are appended to the appointment's notes. Takes the appointment id from list_appointments and answers the appointment in its new state.",
        "operationId": "mark_appointment_arrived",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageAppointmentStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageAppointmentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/state-change-refused: The appointment's current state does not allow this step.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/appointments/{id}/consume": {
      "post": {
        "tags": [
          "manage"
        ],
        "summary": "Marks an ASSIGNED or ARRIVED appointment as attended, moving it to CONSUMED; optional notes are appended to the appointment's notes. Takes the appointment id from list_appointments and answers the appointment in its new state.",
        "operationId": "mark_appointment_consumed",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageAppointmentStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageAppointmentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/state-change-refused: The appointment's current state does not allow this step.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/appointments/{id}/reactivate": {
      "post": {
        "tags": [
          "manage"
        ],
        "summary": "Moves a SUSPENDED, ARRIVED or CONSUMED appointment back to ASSIGNED, undoing a cancel, an arrival or an attendance; optional notes are appended to the appointment's notes. Takes the appointment id from list_appointments and answers the appointment in its new state.",
        "operationId": "reactivate_appointment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageAppointmentStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageAppointmentDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/state-change-refused: The appointment's current state does not allow this step.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/blocks": {
      "get": {
        "tags": [
          "manage"
        ],
        "summary": "Lists the blocks (LICENSE, MEETING or OTHER time a schedule takes no appointments in) that overlap from and to (ISO 8601 instants with offset), optionally on one scheduleId; a person sees only the schedules they see in the portal's Agenda, a tenant key every schedule. Paged: pass limit (1-500, default 100) and the previous answer's nextCursor as cursor.",
        "operationId": "list_blocks",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scheduleId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiListOfManageBlockDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "manage"
        ],
        "summary": "Blocks a schedule's time from start to end (ISO 8601 instants with offset) as a LICENSE, MEETING or OTHER block with optional notes, refused when it overlaps an appointment or another block. Takes scheduleId from list_schedules and answers the block created.",
        "operationId": "create_block",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageBlockRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageBlockDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/block-overlaps: The block overlaps an appointment or another block.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity. Type /api/problems/block-refused: The block misses a time, or names a schedule outside the agenda or not active.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/manage/blocks/{id}": {
      "patch": {
        "tags": [
          "manage"
        ],
        "summary": "Changes a block's type, start, end (ISO 8601 instants with offset) or notes on its own schedule; a field left out keeps its value, and new times are refused when they overlap an appointment or another block. Takes the block id from list_blocks and answers the block as changed.",
        "operationId": "update_block",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageBlockUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "description": "Bad Request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageBlockDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Type /api/problems/block-overlaps: The block overlaps an appointment or another block.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity. Type /api/problems/block-refused: The block misses a time, or names a schedule outside the agenda or not active.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "manage"
        ],
        "summary": "Deletes a block, freeing its time on the schedule. Takes the block id from list_blocks.",
        "operationId": "delete_block",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. Type /api/problems/plan-upgrade-required: the account's plan does not include this surface. Type /api/problems/tenant-suspended: the account is suspended. No type: this key may not use it.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountDto": {
        "required": [
          "id",
          "empresa",
          "sede",
          "roles"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "empresa": {
            "$ref": "#/components/schemas/AccountEmpresaDto"
          },
          "sede": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AccountSedeDto"
              }
            ]
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "AccountEmpresaDto": {
        "required": [
          "name",
          "logo"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "logo": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AccountSedeDto": {
        "required": [
          "name",
          "city"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "city": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfAccountDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfBookingAppointmentDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingAppointmentDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfBookingCityDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingCityDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfBookingCoverageDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingCoverageDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfBookingPracticeDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingPracticeDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfBookingProfessionalDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingProfessionalDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfBookingScheduleDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingScheduleDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfBookingScopeDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingScopeDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfBookingSlotDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingSlotDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfBookingSpecialtyDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BookingSpecialtyDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfManageAppointmentDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManageAppointmentDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfManageBlockDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManageBlockDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfManageScheduleDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManageScheduleDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApiListOfManageSlotDto": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManageSlotDto"
            }
          },
          "nextCursor": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AppointmentStates": {
        "enum": [
          "NONE",
          "REQUESTED",
          "ASSIGNED",
          "ARRIVED",
          "CONSUMED",
          "SUSPENDED",
          "_CONFIRM_REQUESTED",
          "_CONFIRMED",
          null
        ]
      },
      "AppointmentTypes": {
        "enum": [
          "NONE",
          "ONLINE",
          "INTERNAL",
          "OVERBOOKED",
          null
        ]
      },
      "BookingAppointmentDto": {
        "required": [
          "id",
          "start",
          "end",
          "scheduleId",
          "scheduleName",
          "timeZone",
          "state"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "end": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "scheduleId": {
            "type": "string"
          },
          "scheduleName": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppointmentStates"
              }
            ]
          }
        }
      },
      "BookingAppointmentRequest": {
        "type": "object",
        "properties": {
          "scheduleId": {
            "type": [
              "null",
              "string"
            ]
          },
          "start": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "professionalId": {
            "type": [
              "null",
              "string"
            ]
          },
          "specialtyId": {
            "type": [
              "null",
              "string"
            ]
          },
          "practiceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "coverageId": {
            "type": [
              "null",
              "string"
            ]
          },
          "identityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "identityNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "emailAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "cellPhoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BookingAppointmentSearch": {
        "type": "object",
        "properties": {
          "identityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "identityNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "professionalId": {
            "type": [
              "null",
              "string"
            ]
          },
          "specialtyId": {
            "type": [
              "null",
              "string"
            ]
          },
          "date": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BookingCancelRequest": {
        "type": "object",
        "properties": {
          "identityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "identityNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "BookingCityDto": {
        "required": [
          "name",
          "province"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "province": {
            "type": "string"
          }
        }
      },
      "BookingCoverageDto": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "BookingPracticeDto": {
        "required": [
          "id",
          "name",
          "description",
          "specialtyId",
          "appointmentMinutes"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "specialtyId": {
            "type": [
              "null",
              "string"
            ]
          },
          "appointmentMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "BookingProfessionalDto": {
        "required": [
          "id",
          "displayName"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          }
        }
      },
      "BookingScheduleDto": {
        "required": [
          "id",
          "name",
          "city",
          "timeZone",
          "professionalIds",
          "specialtyIds",
          "coverageIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "city": {
            "type": [
              "null",
              "string"
            ]
          },
          "timeZone": {
            "type": "string"
          },
          "professionalIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "specialtyIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "coverageIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BookingScopeDto": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "BookingSlotDto": {
        "required": [
          "start",
          "end"
        ],
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BookingSpecialtyDto": {
        "required": [
          "id",
          "name",
          "appointmentMinutes"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "appointmentMinutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ManageAppointmentDto": {
        "required": [
          "id",
          "start",
          "end",
          "state",
          "type",
          "schedule",
          "professional",
          "specialty",
          "practice",
          "coverage",
          "coverageMemberId",
          "client"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "end": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppointmentStates"
              }
            ]
          },
          "type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AppointmentTypes"
              }
            ]
          },
          "schedule": {
            "$ref": "#/components/schemas/ManageRefDto"
          },
          "professional": {
            "$ref": "#/components/schemas/ManageRefDto"
          },
          "specialty": {
            "$ref": "#/components/schemas/ManageRefDto"
          },
          "practice": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ManageRefDto"
              }
            ]
          },
          "coverage": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ManageRefDto"
              }
            ]
          },
          "coverageMemberId": {
            "type": [
              "null",
              "string"
            ]
          },
          "client": {
            "$ref": "#/components/schemas/ManageClientDto"
          }
        }
      },
      "ManageAppointmentRequest": {
        "type": "object",
        "properties": {
          "scheduleId": {
            "type": [
              "null",
              "string"
            ]
          },
          "starts": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "object",
              "properties": {
                "start": {
                  "type": [
                    "null",
                    "string"
                  ],
                  "format": "date-time"
                },
                "minutes": {
                  "pattern": "^-?(?:0|[1-9]\\d*)$",
                  "type": [
                    "null",
                    "integer",
                    "string"
                  ],
                  "format": "int32"
                }
              }
            }
          },
          "overbook": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "professionalId": {
            "type": [
              "null",
              "string"
            ]
          },
          "specialtyId": {
            "type": [
              "null",
              "string"
            ]
          },
          "practiceId": {
            "type": [
              "null",
              "string"
            ]
          },
          "coverageId": {
            "type": [
              "null",
              "string"
            ]
          },
          "coverageMemberId": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          },
          "client": {
            "type": "object",
            "properties": {
              "identityType": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "identityNumber": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "firstName": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "lastName": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "email": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "mobile": {
                "type": [
                  "null",
                  "string"
                ]
              }
            }
          }
        }
      },
      "ManageAppointmentStepRequest": {
        "type": "object",
        "properties": {
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ManageAppointmentUpdateRequest": {
        "type": "object",
        "properties": {
          "start": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "minutes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "ManageBlockDto": {
        "required": [
          "id",
          "schedule",
          "type",
          "start",
          "end",
          "notes"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "schedule": {
            "$ref": "#/components/schemas/ManageRefDto"
          },
          "type": {
            "$ref": "#/components/schemas/ManageBlockType"
          },
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "format": "date-time"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ManageBlockRequest": {
        "type": "object",
        "properties": {
          "scheduleId": {
            "type": [
              "null",
              "string"
            ]
          },
          "type": {
            "enum": [
              "LICENSE",
              "MEETING",
              "OTHER",
              null
            ]
          },
          "start": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "end": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ManageBlockType": {
        "enum": [
          "LICENSE",
          "MEETING",
          "OTHER"
        ]
      },
      "ManageBlockUpdateRequest": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "LICENSE",
              "MEETING",
              "OTHER",
              null
            ]
          },
          "start": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "end": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ManageBranchDto": {
        "required": [
          "id",
          "name",
          "city"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "city": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ManageClientDto": {
        "required": [
          "firstName",
          "lastName",
          "identityType",
          "identityNumber",
          "email",
          "mobile"
        ],
        "type": "object",
        "properties": {
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "identityType": {
            "type": [
              "null",
              "string"
            ]
          },
          "identityNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "mobile": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ManageRefDto": {
        "required": [
          "id",
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "ManageScheduleDto": {
        "required": [
          "id",
          "name",
          "state",
          "timeZone",
          "branch",
          "professionals",
          "specialties"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/States"
              }
            ]
          },
          "timeZone": {
            "type": "string"
          },
          "branch": {
            "$ref": "#/components/schemas/ManageBranchDto"
          },
          "professionals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManageRefDto"
            }
          },
          "specialties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManageRefDto"
            }
          }
        }
      },
      "ManageSlotDto": {
        "required": [
          "start",
          "end"
        ],
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MeAccessDto": {
        "required": [
          "plan",
          "key"
        ],
        "type": "object",
        "properties": {
          "plan": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "key": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "MeDto": {
        "required": [
          "tenant",
          "key",
          "user",
          "access"
        ],
        "type": "object",
        "properties": {
          "tenant": {
            "$ref": "#/components/schemas/MeTenantDto"
          },
          "key": {
            "$ref": "#/components/schemas/MeKeyDto"
          },
          "user": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MeUserDto"
              }
            ]
          },
          "access": {
            "$ref": "#/components/schemas/MeAccessDto"
          }
        }
      },
      "MeKeyDto": {
        "required": [
          "id",
          "name",
          "prefix"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          }
        }
      },
      "MeTenantDto": {
        "required": [
          "id",
          "name",
          "type",
          "state"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "state": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/States"
              }
            ]
          }
        }
      },
      "MeUserDto": {
        "required": [
          "id",
          "name",
          "roles"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "detail": {
            "type": [
              "null",
              "string"
            ]
          },
          "instance": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RefusedStartsMembers": {
        "required": [
          "starts"
        ],
        "type": "object",
        "properties": {
          "starts": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            }
          }
        }
      },
      "States": {
        "enum": [
          "NONE",
          "ACTIVE",
          "SUSPENDED",
          null
        ]
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "vit_<prefix>_<secret>",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "ApiKey": [ ]
    }
  ],
  "tags": [
    {
      "name": "me"
    },
    {
      "name": "booking"
    },
    {
      "name": "manage"
    }
  ]
}