> ## Documentation Index
> Fetch the complete documentation index at: https://api-doc.fidly.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Document

> Delete a document the company issued (droit `document:d`). Definitive.

Two conditions, and they are not negotiable. The document must be the **last of its
numbering sequence** — its (journal, type) — because deleting any other would leave a hole
in a numbering the law requires continuous; the whole deletion runs under the same named
lock a creation takes, so a creation running alongside cannot slip a number in between.
And it must have **gone nowhere**: not sent by mail or over Peppol, not handed to the
accounting — the same guard that governs a correction, for the same reason. A document
that left is issued, and the way back is a credit note.

Refused with `409 document_in_use` when something would be silently damaged: a bank
reconciliation, an invoiced timesheet line or a payment intent attached to it. The
database would not object — its two foreign keys erase or blank those rows without a word.

What goes with it: its public identity, and its timeline events. A received document is
not deletable (`409`), it is not ours.



## OpenAPI

````yaml /openapi.json delete /documents/{document_uuid}
openapi: 3.1.0
info:
  title: Fidly API
  version: 1.0.0
servers:
  - url: https://api.fidly.be
    description: Production
security: []
paths:
  /documents/{document_uuid}:
    delete:
      tags:
        - documents
      summary: Delete Document
      description: >-
        Delete a document the company issued (droit `document:d`). Definitive.


        Two conditions, and they are not negotiable. The document must be the
        **last of its

        numbering sequence** — its (journal, type) — because deleting any other
        would leave a hole

        in a numbering the law requires continuous; the whole deletion runs
        under the same named

        lock a creation takes, so a creation running alongside cannot slip a
        number in between.

        And it must have **gone nowhere**: not sent by mail or over Peppol, not
        handed to the

        accounting — the same guard that governs a correction, for the same
        reason. A document

        that left is issued, and the way back is a credit note.


        Refused with `409 document_in_use` when something would be silently
        damaged: a bank

        reconciliation, an invoiced timesheet line or a payment intent attached
        to it. The

        database would not object — its two foreign keys erase or blank those
        rows without a word.


        What goes with it: its public identity, and its timeline events. A
        received document is

        not deletable (`409`), it is not ours.
      operationId: delete_document_documents__document_uuid__delete
      parameters:
        - name: document_uuid
          in: path
          required: true
          schema:
            type: string
            title: Document Uuid
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````