> ## 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 Relation

> Delete a third party. For good — Fidly has no archived state to fall back on.

Refused with `409 relation_in_use` as soon as anything still points at it: a document it
issued or received, a subscription, a subscription invoice, a timesheet line, a project, or
the mapping that pairs it with the client's accounting system. The message says which one.
Nothing in the database enforces this — there is not a single foreign key on the third-party
tables — so this check is the only thing standing between the delete and a record left
pointing at nothing.

What belongs to the third party goes with it: its addresses, its bank details (stored on the
row itself), the links tying a company to its contacts, and its public identifier. Deleting
a company never deletes the contacts it was linked to, only those links.

Returns `204` with no body. In sandbox mode the same three answers are given — deletable,
in use, unknown — but nothing is ever removed: the fixture relations stay listed.



## OpenAPI

````yaml /openapi.json delete /relations/{relation_uuid}
openapi: 3.1.0
info:
  title: Fidly API
  version: 1.0.0
servers:
  - url: https://api.fidly.be
    description: Production
security: []
paths:
  /relations/{relation_uuid}:
    delete:
      tags:
        - relations
      summary: Delete Relation
      description: >-
        Delete a third party. For good — Fidly has no archived state to fall
        back on.


        Refused with `409 relation_in_use` as soon as anything still points at
        it: a document it

        issued or received, a subscription, a subscription invoice, a timesheet
        line, a project, or

        the mapping that pairs it with the client's accounting system. The
        message says which one.

        Nothing in the database enforces this — there is not a single foreign
        key on the third-party

        tables — so this check is the only thing standing between the delete and
        a record left

        pointing at nothing.


        What belongs to the third party goes with it: its addresses, its bank
        details (stored on the

        row itself), the links tying a company to its contacts, and its public
        identifier. Deleting

        a company never deletes the contacts it was linked to, only those links.


        Returns `204` with no body. In sandbox mode the same three answers are
        given — deletable,

        in use, unknown — but nothing is ever removed: the fixture relations
        stay listed.
      operationId: delete_relation_relations__relation_uuid__delete
      parameters:
        - name: relation_uuid
          in: path
          required: true
          schema:
            type: string
            title: Relation 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

````