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

# Mass removal of seats from the hall

> Deletes one or more seats from a hall. This endpoint supports two modes of operation based on the request body:
- **To delete specific seats:** Provide a JSON object with an array of `seat_ids`.
- **To delete ALL seats in the hall:** Provide a JSON object with a `delete_all: true` flag. This is a destructive operation.




## OpenAPI

````yaml api-reference/openapi.json post /api/halls/{hall_id}/seats/delete
openapi: 3.0.0
info:
  title: Tandem IT API
  version: 1.0.0
  description: API for tandem it backend
servers:
  - url: https://tandem.hlofiys.xyz
    description: Production server
security: []
tags:
  - name: Documentation
    description: API documentation endpoint
paths:
  /api/halls/{hall_id}/seats/delete:
    parameters:
      - name: hall_id
        in: path
        required: true
        schema:
          type: integer
          format: int64
    post:
      tags:
        - 'Admin: Seats'
      summary: Mass removal of seats from the hall
      description: >
        Deletes one or more seats from a hall. This endpoint supports two modes
        of operation based on the request body:

        - **To delete specific seats:** Provide a JSON object with an array of
        `seat_ids`.

        - **To delete ALL seats in the hall:** Provide a JSON object with a
        `delete_all: true` flag. This is a destructive operation.
      operationId: deleteSeats
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/DeleteSpecificSeatsRequest'
                - $ref: '#/components/schemas/DeleteAllSeatsRequest'
      responses:
        '204':
          description: Seats successfully removed
        '400':
          description: >-
            Validation error. For example, the ids parameter is missing or
            contains incorrect values
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '401':
          description: >-
            Unauthorized. Authentication credentials were not provided or are
            invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Access denied. The user does not have permission to perform this
            action
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The hall or one of the specified seats was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    DeleteSpecificSeatsRequest:
      type: object
      description: Schema for deleting a specific list of seats by their IDs.
      required:
        - seat_ids
      properties:
        seat_ids:
          type: array
          items:
            type: integer
            format: int64
          description: An array of unique identifiers for the seats to be deleted.
          example:
            - 101
            - 102
            - 105
    DeleteAllSeatsRequest:
      type: object
      description: Schema for deleting all seats within a specific hall.
      required:
        - delete_all
      properties:
        delete_all:
          type: boolean
          description: >-
            A flag that must be set to `true` to confirm the deletion of all
            seats.
          enum:
            - true
    ValidationError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: Validation failed
        errors:
          type: object
          description: A map of field names to their respective error messages.
          additionalProperties:
            type: string
          example:
            name: The name field is required.
            price: The price must be a valid number.
            hall_id: A valid hall_id is required.
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````