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

# List Relations



## OpenAPI

````yaml /openapi.json get /relations
openapi: 3.1.0
info:
  title: Fidly API
  version: 1.0.0
servers:
  - url: https://api.fidly.be
    description: Production
security: []
paths:
  /relations:
    get:
      tags:
        - relations
      summary: List Relations
      operationId: list_relations_relations_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Max items returned (1–100).
            default: 50
            title: Limit
          description: Max items returned (1–100).
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            maximum: 10000
            minimum: 0
            description: Number of items to skip (pagination). Capped at 10000.
            default: 0
            title: Offset
          description: Number of items to skip (pagination). Capped at 10000.
        - name: type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: 'Filter by relation type: `company` or `contact`.'
            title: Type
          description: 'Filter by relation type: `company` or `contact`.'
        - name: is_customer
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Filter companies that are (not) customers. Excludes contacts.
            title: Is Customer
          description: Filter companies that are (not) customers. Excludes contacts.
        - name: is_supplier
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Filter companies that are (not) suppliers. Excludes contacts.
            title: Is Supplier
          description: Filter companies that are (not) suppliers. Excludes contacts.
        - name: vat
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Exact VAT number match (companies only).
            title: Vat
          description: Exact VAT number match (companies only).
        - name: identifier
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Exact legal identifier match (companies only).
            title: Identifier
          description: Exact legal identifier match (companies only).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelationPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    RelationPage:
      properties:
        items:
          items:
            oneOf:
              - $ref: '#/components/schemas/CompanyRelationOut'
              - $ref: '#/components/schemas/ContactRelationOut'
            discriminator:
              propertyName: type
              mapping:
                company:
                  $ref: '#/components/schemas/CompanyRelationOut'
                contact:
                  $ref: '#/components/schemas/ContactRelationOut'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
        - items
        - total
        - limit
        - offset
      title: RelationPage
      description: >-
        A page of relations, mixing both types.


        Named subclass of `Page` only so the schema is called `RelationPage` in
        the docs: a

        generic parametrised with an annotated union gets an unreadable
        generated name.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CompanyRelationOut:
      properties:
        id:
          type: string
          title: Id
          description: Opaque unique identifier of the relation.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Display name. Company name for `company`, full name for `contact`.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Primary email address.
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
          description: Phone number.
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: Preferred language, one of ['fr', 'en', 'nl', 'de'].
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressOut'
            - type: 'null'
          description: Postal address, if known.
        type:
          type: string
          const: company
          title: Type
          description: Relation type, always `company` here.
        vat:
          anyOf:
            - type: string
            - type: 'null'
          title: Vat
          description: VAT number, prefixed with the ISO country code.
        identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Identifier
          description: Legal registration / party identifier.
        electronic_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Electronic Address
          description: Electronic address used to send invoices over Peppol.
        is_customer:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Customer
          description: '`true` if this company is a customer.'
        is_supplier:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Supplier
          description: '`true` if this company is a supplier.'
      additionalProperties: true
      type: object
      required:
        - id
        - type
      title: CompanyRelationOut
      description: >-
        A business third party. Carries the fields an individual has no
        equivalent of

        (`vat`, `identifier`, `electronic_address`, `is_customer`,
        `is_supplier`), and none of

        the contact-only ones — `first_name`/`last_name` are simply absent from
        the response.
    ContactRelationOut:
      properties:
        id:
          type: string
          title: Id
          description: Opaque unique identifier of the relation.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Display name. Company name for `company`, full name for `contact`.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Primary email address.
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
          description: Phone number.
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: Preferred language, one of ['fr', 'en', 'nl', 'de'].
        address:
          anyOf:
            - $ref: '#/components/schemas/AddressOut'
            - type: 'null'
          description: Postal address, if known.
        type:
          type: string
          const: contact
          title: Type
          description: Relation type, always `contact` here.
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
          description: First name.
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
          description: Last name.
      additionalProperties: true
      type: object
      required:
        - id
        - type
      title: ContactRelationOut
      description: >-
        An individual. `name` is derived from `last_name` + `first_name` and is
        read-only;

        the company-only fields (`vat`, `identifier`, `electronic_address`,
        `is_customer`,

        `is_supplier`) are absent from the response.
    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
    AddressOut:
      properties:
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
          description: Street name.
        street_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Street Number
          description: Street/house number.
        street2:
          anyOf:
            - type: string
            - type: 'null'
          title: Street2
          description: Additional address line.
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
          description: Postal/ZIP code.
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: City.
        province:
          anyOf:
            - type: string
            - type: 'null'
          title: Province
          description: Province, state or region.
        country_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Code
          description: ISO 3166-1 alpha-2 country code (e.g. `BE`).
      type: object
      title: AddressOut
      description: >-
        Postal address of a relation. The object itself is `null` when none is
        stored.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````