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

# Delete location



## OpenAPI

````yaml /api-reference/openapi.yaml delete /locations/{locationId}
openapi: 3.0.0
info:
  title: OpenFiskal fiscalization API
  description: >-
    OpenFiskal exposes a server-to-server fiscalization API for merchant
    onboarding,

    register setup, and operation handling.


    The `v1` contract uses server-issued resource versions and conditional

    writes through `If-Match` for safe concurrent mutation handling.
  version: 1.1.0
  contact: {}
  license:
    name: Proprietary
servers:
  - url: https://api.openfiskal.com/v1
    description: Production
  - url: https://sandbox.api.openfiskal.com/v1
    description: Sandbox
security: []
tags:
  - name: Merchants
    description: Create and manage merchant merchants.
  - name: Locations
    description: Create and manage merchant locations.
  - name: Registers
    description: Create and manage registers or terminals.
  - name: Operations
    description: Start, update, complete, cancel, list, and read operations.
paths:
  /locations/{locationId}:
    delete:
      tags:
        - Locations
      summary: Delete location
      operationId: LocationsController_delete
      parameters:
        - name: X-OpenFiskal-Merchant
          in: header
          description: Merchant identifier returned by the merchants resource.
          required: true
          schema:
            type: string
        - name: locationId
          required: true
          in: path
          schema:
            type: string
      responses:
        '204':
          description: Location deleted
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: unauthorized
                  value:
                    code: unauthorized
                    message: Authentication failed.
                    retryable: false
        '403':
          description: >-
            Authenticated caller is not allowed to access the requested tenant,
            country, or merchant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: forbidden
                  value:
                    code: forbidden
                    message: The authenticated caller cannot access this resource.
                    retryable: false
        '404':
          description: Location not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: not_found
                  value:
                    code: not_found
                    message: The requested resource does not exist.
                    retryable: false
        '409':
          description: Location has registers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: location_has_registers
                  value:
                    code: location_has_registers
                    message: Cannot delete a location that has registers.
                    retryable: false
      security:
        - BearerAuth: []
components:
  schemas:
    ErrorDto:
      type: object
      properties:
        code:
          type: string
          description: Stable machine-readable error code.
          example: invalid_request
        message:
          type: string
          description: Human-readable explanation of the error.
        retryable:
          type: boolean
          description: Whether retrying the request is safe.
        details:
          type: object
          description: Additional structured context for the error.
          additionalProperties: true
      required:
        - code
        - message
        - retryable
  securitySchemes:
    BearerAuth:
      scheme: bearer
      bearerFormat: API key
      type: http

````