> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.sesametime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Days Off from Vacation Calendar

> Removes one or more days off from a specific vacation calendar.

## Overview
This endpoint allows authorized users to delete multiple days off in a single request by providing an array of day off IDs.
## Important Behavior
- **Atomic Operation**: The deletion is atomic - if any validation fails, no days off will be deleted. This ensures data consistency.
- **Ownership Validation**: Each day off ID must belong to the specified vacation calendar. Days off that exist but belong to a different calendar will cause the entire operation to fail.
- **Empty Response**: On success, the endpoint returns an empty response with HTTP 200 status code.



## OpenAPI

````yaml DELETE /schedule/v1/vacation-calendars/{id}/days-off
openapi: 3.0.0
info:
  description: ''
  version: 3.0.0
  title: Sesame Public API
servers:
  - url: https://api-{region}.sesametime.com
    variables:
      region:
        default: eu1
security: []
tags: []
paths:
  /schedule/v1/vacation-calendars/{id}/days-off:
    delete:
      tags:
        - Vacation Calendars
      summary: Delete Days Off from Vacation Calendar
      description: >-
        Removes one or more days off from a specific vacation calendar.


        ## Overview

        This endpoint allows authorized users to delete multiple days off in a
        single request by providing an array of day off IDs.

        ## Important Behavior

        - **Atomic Operation**: The deletion is atomic - if any validation
        fails, no days off will be deleted. This ensures data consistency.

        - **Ownership Validation**: Each day off ID must belong to the specified
        vacation calendar. Days off that exist but belong to a different
        calendar will cause the entire operation to fail.

        - **Empty Response**: On success, the endpoint returns an empty response
        with HTTP 200 status code.
      operationId: DeleteDaysOffFromVacationCalendar
      parameters:
        - in: path
          name: id
          description: >-
            The unique identifier (UUID v4) of the vacation calendar from which
            days off will be deleted.


            **Requirements:**

            - Must be a valid UUID v4 format

            - The calendar must exist in the system

            - The authenticated user must have permission to modify this
            calendar
          required: true
          schema:
            type: string
            format: uuid
          example: a3d4e5f6-1234-5678-9abc-def012345678
      requestBody:
        description: >-
          Request body containing the array of day off IDs to be deleted from
          the vacation calendar.


          **Note:** All day off IDs must belong to the vacation calendar
          specified in the path parameter.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - dayOffIds
              properties:
                dayOffIds:
                  type: array
                  description: >-
                    Array of day off UUIDs to remove from the vacation calendar.


                    **Validation Rules:**

                    - Must be an array (can be empty)

                    - Each element must be a valid UUID v4 string

                    - Each UUID must correspond to an existing day off in the
                    system

                    - Each day off must belong to the vacation calendar
                    specified in the path parameter


                    **Behavior:**

                    - Empty arrays are allowed and result in no changes

                    - Order of IDs does not affect the operation
                  minItems: 0
                  items:
                    type: string
                    format: uuid
                    description: Unique identifier (UUID v4) of the day off to delete
                  example:
                    - b4c5d6e7-2345-6789-0abc-def123456789
                    - c5d6e7f8-3456-7890-1bcd-ef2345678901
              additionalProperties: false
            examples:
              single_day_off:
                summary: Delete a single day off
                description: >-
                  Example request to delete a single day off from a vacation
                  calendar
                value:
                  dayOffIds:
                    - b4c5d6e7-2345-6789-0abc-def123456789
              multiple_days_off:
                summary: Delete multiple days off
                description: >-
                  Example request to delete multiple days off from a vacation
                  calendar in a single operation
                value:
                  dayOffIds:
                    - b4c5d6e7-2345-6789-0abc-def123456789
                    - c5d6e7f8-3456-7890-1bcd-ef2345678901
                    - d6e7f8a9-4567-8901-2cde-f34567890123
              empty_array:
                summary: Empty array (no-op)
                description: >-
                  Example request with an empty array - this is valid and
                  results in no changes
                value:
                  dayOffIds: []
      responses:
        '200':
          description: Object
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: string
                    example: ''
                  meta:
                    type: object
                    properties:
                      currentPage:
                        type: integer
                        example: 1
                      lastPage:
                        type: integer
                        example: 1
                      total:
                        type: integer
                        example: 1
                      perPage:
                        type: integer
                        example: 1
        '401':
          description: >-
            **Unauthorized** - Authentication failed or token is
            missing/invalid.


            Possible causes:

            - Missing Authorization header

            - Invalid or expired Bearer token

            - Token does not have required scopes
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized
        '422':
          description: >-
            **Unprocessable Entity** - Validation failed for the provided data.


            The request was well-formed but contained semantic errors. This
            occurs when:

            - The vacation calendar ID is invalid or not found

            - Any day off ID is invalid, not found, or doesn't belong to the
            specified vacation calendar

            - Required fields are missing or have incorrect types


            **Important:** When validation fails, no days off are deleted
            (atomic operation).
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: General error message indicating validation failure
                    example: Validation failed
                  errors:
                    type: array
                    description: >-
                      List of specific validation errors. Each error indicates
                      which field failed validation and why.
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: >-
                            The field that caused the validation error. For
                            array items, includes the index (e.g.,
                            'dayOffIds[0]').
                        message:
                          type: string
                          description: >-
                            Specific error message for the field, which may be a
                            translation key or a human-readable message.
                      required:
                        - field
                        - message
                required:
                  - message
                  - errors
              examples:
                vacation_calendar_not_found:
                  summary: Vacation calendar not found
                  description: >-
                    The specified vacation calendar ID does not exist in the
                    system. Verify the calendar ID is correct and that it hasn't
                    been deleted.
                  value:
                    message: Validation failed
                    errors:
                      - field: vacationCalendarId
                        message: validator.calendar_not_found
                invalid_vacation_calendar_uuid:
                  summary: Invalid vacation calendar UUID format
                  description: >-
                    The vacation calendar ID provided is not a valid UUID
                    format. UUIDs must follow the format:
                    xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
                  value:
                    message: Validation failed
                    errors:
                      - field: vacationCalendarId
                        message: This value is not a valid UUID.
                day_off_not_found:
                  summary: Day off not found
                  description: >-
                    One or more of the specified day off IDs do not exist in the
                    system. The index in the field name indicates which ID
                    failed validation.
                  value:
                    message: Validation failed
                    errors:
                      - field: dayOffIds[0]
                        message: validator.day_off_not_found
                invalid_day_off_uuid:
                  summary: Invalid day off UUID format
                  description: >-
                    One or more day off IDs are not in valid UUID format. Each
                    ID must be a valid UUID v4.
                  value:
                    message: Validation failed
                    errors:
                      - field: dayOffIds[0]
                        message: This value is not a valid UUID.
                day_off_ids_required:
                  summary: dayOffIds field is required
                  description: >-
                    The dayOffIds field is missing from the request body or is
                    null. This field is required even if empty.
                  value:
                    message: Validation failed
                    errors:
                      - field: dayOffIds
                        message: This value should not be null.
                day_off_ids_must_be_array:
                  summary: dayOffIds must be an array
                  description: >-
                    The dayOffIds field must be an array type, not a string,
                    object, or other type.
                  value:
                    message: Validation failed
                    errors:
                      - field: dayOffIds
                        message: This value should be of type array.
                day_off_id_must_be_string:
                  summary: Day off ID must be a string
                  description: >-
                    Each element in the dayOffIds array must be a string.
                    Numbers, objects, or other types are not accepted.
                  value:
                    message: Validation failed
                    errors:
                      - field: dayOffIds[0]
                        message: This value should be of type string.
                day_off_not_belongs_to_vacation_calendar:
                  summary: Day off does not belong to vacation calendar
                  description: >-
                    One or more of the specified day off IDs exist in the system
                    but do not belong to the specified vacation calendar. This
                    validation ensures that only days off that are actually
                    associated with the given vacation calendar can be deleted
                    through this endpoint. Verify that the day off IDs
                    correspond to the correct vacation calendar.
                  value:
                    message: Validation failed
                    errors:
                      - field: dayOffIdsvacationCalendarId
                        message: validator.invalid_days_off_id_for_calendar
                multiple_errors:
                  summary: Multiple validation errors
                  description: >-
                    Example showing multiple validation errors returned in a
                    single response. All errors are reported together to help
                    with debugging.
                  value:
                    message: Validation failed
                    errors:
                      - field: dayOffIds[0]
                        message: This value is not a valid UUID.
                      - field: dayOffIds[2]
                        message: validator.day_off_not_found
      security:
        - Bearer: []
      x-code-samples:
        - lang: cURL
          label: cURL
          source: >-
            curl -X DELETE
            'https://api.sesamehr.com/schedule/v1/vacation-calendars/a3d4e5f6-1234-5678-9abc-def012345678/days-off'
            \
              -H 'Authorization: Bearer {access_token}' \
              -H 'Content-Type: application/json' \
              -d '{
                "dayOffIds": [
                  "b4c5d6e7-2345-6789-0abc-def123456789",
                  "c5d6e7f8-3456-7890-1bcd-ef2345678901"
                ]
              }'
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````