openapi: 3.0.3
info:
  title: Monitr API
  description: Monitr's API
  version: 1.2.0
  termsOfService: https://monitr.be/terms/
  contact:
    name: Engineering Team
    email: engineering@monitr.be
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas: {}
paths:
  /annual-accounts/{countryCode}/{versionType}/{versionModel}/reporting-lines:
    get:
      summary: Get the reporting lines for annual accounts by model and type.
      tags:
        - Annual Accounts
      parameters:
        - schema:
            maxLength: 2
            type: string
          in: path
          name: countryCode
          required: true
        - schema:
            type: string
          in: path
          name: versionType
          required: true
        - schema:
            type: string
          in: path
          name: versionModel
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    parentId:
                      format: uuid
                      type: string
                      nullable: true
                    name:
                      type: string
                    report:
                      anyOf:
                        - type: string
                          enum:
                            - PL
                        - type: string
                          enum:
                            - BS
                    top:
                      type: boolean
                    rank:
                      type: number
                  required:
                    - id
                    - parentId
                    - name
                    - report
                    - top
                    - rank
  /annual-accounts/{countryCode}/{versionType}/{versionModel}/notes:
    get:
      summary: Get the notes for annual accounts by model and type.
      tags:
        - Annual Accounts
      parameters:
        - schema:
            maxLength: 2
            type: string
          in: path
          name: countryCode
          required: true
        - schema:
            type: string
          in: path
          name: versionType
          required: true
        - schema:
            type: string
          in: path
          name: versionModel
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    annualAccountsReportingLineIds:
                      type: array
                      items:
                        format: uuid
                        type: string
                      nullable: true
                    category:
                      type: string
                    name:
                      type: string
                    rank:
                      type: number
                  required:
                    - id
                    - annualAccountsReportingLineIds
                    - category
                    - name
                    - rank
  /budget-versions/budget-types:
    get:
      summary: Get a list of budget types
      tags:
        - Budgets
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  budgetTypes:
                    type: array
                    items:
                      type: string
                required:
                  - budgetTypes
  /entities/{entityId}:
    get:
      summary: Get details for a specific business entity
      tags:
        - Entity
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          code:
                            type: string
                            nullable: true
                          name:
                            type: string
                            nullable: true
                          settings:
                            additionalProperties: true
                            type: object
                            properties: {}
                          axis:
                            format: uuid
                            type: string
                            nullable: true
                          status:
                            anyOf:
                              - type: string
                                enum:
                                  - active
                              - type: string
                                enum:
                                  - not_found
                              - type: string
                                enum:
                                  - deleted
                          currency:
                            anyOf:
                              - type: string
                                enum:
                                  - EUR
                              - type: string
                                enum:
                                  - USD
                              - type: string
                                enum:
                                  - GBP
                              - type: string
                                enum:
                                  - AUD
                              - type: string
                                enum:
                                  - SEK
                              - type: string
                                enum:
                                  - BRL
                        required:
                          - id
                          - code
                          - name
                          - settings
                          - axis
                          - status
                          - currency
                      - type: object
                        properties:
                          organisation_id:
                            format: uuid
                            type: string
                          ytd_start:
                            format: date
                            type: string
                            nullable: true
                          last_date_actuals:
                            format: date
                            type: string
                            nullable: true
                          ytg_end:
                            format: date
                            type: string
                            nullable: true
                          budget_account_id_receivable:
                            format: uuid
                            type: string
                            nullable: true
                          budget_account_id_payable:
                            format: uuid
                            type: string
                            nullable: true
                          vat_number:
                            type: string
                            nullable: true
                          deleted_at:
                            format: date-time
                            type: string
                            nullable: true
                          onboarding_status:
                            anyOf:
                              - type: string
                                enum:
                                  - not_started
                              - type: string
                                enum:
                                  - dates
                              - type: string
                                enum:
                                  - reporting
                              - type: string
                                enum:
                                  - mapping
                              - type: string
                                enum:
                                  - dashboard
                              - type: string
                                enum:
                                  - done
                          country_code:
                            type: string
                        required:
                          - organisation_id
                          - ytd_start
                          - last_date_actuals
                          - ytg_end
                          - budget_account_id_receivable
                          - budget_account_id_payable
                          - vat_number
                          - deleted_at
                          - onboarding_status
                          - country_code
                  - type: object
                    properties:
                      integration:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          integrationProviderId:
                            anyOf:
                              - type: string
                                enum:
                                  - yuki
                              - type: string
                                enum:
                                  - exact
                              - type: string
                                enum:
                                  - octopus
                              - type: string
                                enum:
                                  - xero
                              - type: string
                                enum:
                                  - odoo
                              - type: string
                                enum:
                                  - twinfield
                              - type: string
                                enum:
                                  - quickbooks
                              - type: string
                                enum:
                                  - moneybird
                              - type: string
                                enum:
                                  - horus
                              - type: string
                                enum:
                                  - monitr
                              - type: string
                                enum:
                                  - exact:nl
                              - type: string
                                enum:
                                  - hubspot
                              - type: string
                                enum:
                                  - teamleader
                              - type: string
                                enum:
                                  - stripe
                              - type: string
                                enum:
                                  - csv
                              - type: string
                                enum:
                                  - afas
                              - type: string
                                enum:
                                  - nmbrs
                              - type: string
                                enum:
                                  - finteqx
                          integrationType:
                            anyOf:
                              - type: string
                                enum:
                                  - bookkeeping
                              - type: string
                                enum:
                                  - crm
                              - type: string
                                enum:
                                  - subscription
                              - type: string
                                enum:
                                  - inventory
                              - type: string
                                enum:
                                  - project
                              - type: string
                                enum:
                                  - historic-outstanding-item
                              - type: string
                                enum:
                                  - other
                              - type: string
                                enum:
                                  - personnel-costs
                              - type: string
                                enum:
                                  - annual-accounts-filing
                              - type: string
                                enum:
                                  - fixed-assets
                        required:
                          - id
                          - integrationProviderId
                          - integrationType
                        nullable: true
                      integrations:
                        type: array
                        items:
                          type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                                organisationId:
                                  format: uuid
                                  type: string
                                entityId:
                                  format: uuid
                                  type: string
                                  nullable: true
                                settings:
                                  additionalProperties: true
                                  type: object
                                  properties: {}
                                integrationProviderId:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - yuki
                                    - type: string
                                      enum:
                                        - exact
                                    - type: string
                                      enum:
                                        - octopus
                                    - type: string
                                      enum:
                                        - xero
                                    - type: string
                                      enum:
                                        - odoo
                                    - type: string
                                      enum:
                                        - twinfield
                                    - type: string
                                      enum:
                                        - quickbooks
                                    - type: string
                                      enum:
                                        - moneybird
                                    - type: string
                                      enum:
                                        - horus
                                    - type: string
                                      enum:
                                        - monitr
                                    - type: string
                                      enum:
                                        - exact:nl
                                    - type: string
                                      enum:
                                        - hubspot
                                    - type: string
                                      enum:
                                        - teamleader
                                    - type: string
                                      enum:
                                        - stripe
                                    - type: string
                                      enum:
                                        - csv
                                    - type: string
                                      enum:
                                        - afas
                                    - type: string
                                      enum:
                                        - nmbrs
                                    - type: string
                                      enum:
                                        - finteqx
                                integrationType:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - bookkeeping
                                    - type: string
                                      enum:
                                        - crm
                                    - type: string
                                      enum:
                                        - subscription
                                    - type: string
                                      enum:
                                        - inventory
                                    - type: string
                                      enum:
                                        - project
                                    - type: string
                                      enum:
                                        - historic-outstanding-item
                                    - type: string
                                      enum:
                                        - other
                                    - type: string
                                      enum:
                                        - personnel-costs
                                    - type: string
                                      enum:
                                        - annual-accounts-filing
                                    - type: string
                                      enum:
                                        - fixed-assets
                              required:
                                - id
                                - organisationId
                                - entityId
                                - settings
                                - integrationProviderId
                                - integrationType
                            - type: object
                              properties:
                                integrationProvider:
                                  type: object
                                  properties:
                                    id:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - yuki
                                        - type: string
                                          enum:
                                            - exact
                                        - type: string
                                          enum:
                                            - octopus
                                        - type: string
                                          enum:
                                            - xero
                                        - type: string
                                          enum:
                                            - odoo
                                        - type: string
                                          enum:
                                            - twinfield
                                        - type: string
                                          enum:
                                            - quickbooks
                                        - type: string
                                          enum:
                                            - moneybird
                                        - type: string
                                          enum:
                                            - horus
                                        - type: string
                                          enum:
                                            - monitr
                                        - type: string
                                          enum:
                                            - exact:nl
                                        - type: string
                                          enum:
                                            - hubspot
                                        - type: string
                                          enum:
                                            - teamleader
                                        - type: string
                                          enum:
                                            - stripe
                                        - type: string
                                          enum:
                                            - csv
                                        - type: string
                                          enum:
                                            - afas
                                        - type: string
                                          enum:
                                            - nmbrs
                                        - type: string
                                          enum:
                                            - finteqx
                                    name:
                                      type: string
                                    author:
                                      type: string
                                    icon:
                                      format: uri
                                      type: string
                                  required:
                                    - id
                                    - name
                                    - author
                                    - icon
                        nullable: true
                    required:
                      - integration
                      - integrations
    put:
      summary: Update an entity's details
      tags:
        - Entity
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                yearToDateStart:
                  format: date
                  type: string
                lastDateActuals:
                  format: date
                  type: string
                yearToGoEnd:
                  format: date
                  type: string
                axis:
                  type: string
                  nullable: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      code:
                        type: string
                        nullable: true
                      name:
                        type: string
                        nullable: true
                      settings:
                        additionalProperties: true
                        type: object
                        properties: {}
                      axis:
                        format: uuid
                        type: string
                        nullable: true
                      status:
                        anyOf:
                          - type: string
                            enum:
                              - active
                          - type: string
                            enum:
                              - not_found
                          - type: string
                            enum:
                              - deleted
                      currency:
                        anyOf:
                          - type: string
                            enum:
                              - EUR
                          - type: string
                            enum:
                              - USD
                          - type: string
                            enum:
                              - GBP
                          - type: string
                            enum:
                              - AUD
                          - type: string
                            enum:
                              - SEK
                          - type: string
                            enum:
                              - BRL
                    required:
                      - id
                      - code
                      - name
                      - settings
                      - axis
                      - status
                      - currency
                  - type: object
                    properties:
                      organisation_id:
                        format: uuid
                        type: string
                      ytd_start:
                        format: date
                        type: string
                        nullable: true
                      last_date_actuals:
                        format: date
                        type: string
                        nullable: true
                      ytg_end:
                        format: date
                        type: string
                        nullable: true
                      budget_account_id_receivable:
                        format: uuid
                        type: string
                        nullable: true
                      budget_account_id_payable:
                        format: uuid
                        type: string
                        nullable: true
                      vat_number:
                        type: string
                        nullable: true
                      deleted_at:
                        format: date-time
                        type: string
                        nullable: true
                      onboarding_status:
                        anyOf:
                          - type: string
                            enum:
                              - not_started
                          - type: string
                            enum:
                              - dates
                          - type: string
                            enum:
                              - reporting
                          - type: string
                            enum:
                              - mapping
                          - type: string
                            enum:
                              - dashboard
                          - type: string
                            enum:
                              - done
                      country_code:
                        type: string
                    required:
                      - organisation_id
                      - ytd_start
                      - last_date_actuals
                      - ytg_end
                      - budget_account_id_receivable
                      - budget_account_id_payable
                      - vat_number
                      - deleted_at
                      - onboarding_status
                      - country_code
    patch:
      summary: Update the deleted status of an entity. Setting the status to deleted
        marks teh entity for deletion. Entitities marked for deletion can be
        restored by resetting the status to not found.
      tags:
        - Entity
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  anyOf:
                    - type: string
                      enum:
                        - active
                    - type: string
                      enum:
                        - not_found
                    - type: string
                      enum:
                        - deleted
                onboardingStatus:
                  anyOf:
                    - type: string
                      enum:
                        - not_started
                    - type: string
                      enum:
                        - dates
                    - type: string
                      enum:
                        - reporting
                    - type: string
                      enum:
                        - mapping
                    - type: string
                      enum:
                        - dashboard
                    - type: string
                      enum:
                        - done
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/settings:
    put:
      summary: Update an entity's settings
      tags:
        - Entity
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                exactImport:
                  type: object
                  properties: {}
                company_settings:
                  type: object
                  properties:
                    budget_account_for_debt:
                      type: string
                    salary:
                      type: object
                      properties:
                        amount:
                          type: number
                        period:
                          format: date-time
                          type: string
                    social_security:
                      type: number
                    13_month:
                      type: boolean
                    vacation_money:
                      type: object
                      properties:
                        amount:
                          type: number
                        period:
                          format: date-time
                          type: string
                        type:
                          anyOf:
                            - type: string
                              enum:
                                - spread
                            - type: string
                              enum:
                                - single_month
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/accounts:
    get:
      summary: Get all general ledger accounts for a specific business entity
      tags:
        - Accounts
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    account_number:
                      type: string
                    account_name:
                      type: string
                    is_active:
                      type: boolean
                  required:
                    - id
                    - account_number
                    - account_name
                    - is_active
  /entities/{entityId}/analytical-axes:
    get:
      summary: Get all analytical axes for a specific business entity
      tags:
        - Analytical Axes
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: axis
          required: false
        - schema:
            type: boolean
          in: query
          name: used
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    account:
                      type: string
                    description:
                      type: string
                    axis:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        vendorId:
                          type: string
                        name:
                          type: string
                      required:
                        - id
                        - vendorId
                        - name
                    used:
                      type: boolean
                  required:
                    - id
                    - account
                    - description
                    - axis
                    - used
  /entities/{entityId}/axes:
    get:
      summary: Get all axes for a specific business entity
      tags:
        - Analytical Axes
      parameters:
        - schema:
            type: boolean
          in: query
          name: used
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    vendorId:
                      type: string
                    name:
                      type: string
                  required:
                    - id
                    - vendorId
                    - name
  /entities/{entityId}/general-ledgers/years:
    get:
      summary: Get the unique years for which we have data in the general ledger for a
        specific business entity
      tags:
        - General Ledger
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    year:
                      type: number
                  required:
                    - year
  /entities/{entityId}/general-ledgers/relation:
    get:
      summary: Get all general ledger transactions by relation id
      tags:
        - General Ledger
      parameters:
        - schema:
            type: string
            enum:
              - PL
              - BS
          in: query
          name: report
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: relationId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    date_period:
                      format: date
                      type: string
                    amount:
                      type: number
                    account_number:
                      type: string
                    description:
                      type: string
                  required:
                    - date_period
                    - amount
                    - account_number
                    - description
  /entities/{entityId}/general-ledgers/mapping-ids:
    post:
      summary: Get all general ledger transactions by mapping ids
      tags:
        - General Ledger
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                mappingIds:
                  anyOf:
                    - type: array
                      items:
                        type: string
                    - type: string
              required:
                - mappingIds
        required: true
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  additionalProperties: false
                  type: object
                  properties:
                    mappingId:
                      type: string
                    datePeriod:
                      format: date
                      type: string
                    amount:
                      type: number
                  required:
                    - mappingId
                    - datePeriod
                    - amount
  /entities/{entityId}/general-ledgers/reporting-line-ids:
    get:
      summary: Get all general ledger transactions by reporting line ids
      tags:
        - General Ledger
      parameters:
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: reportingLineIds
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  additionalProperties: false
                  type: object
                  properties:
                    reportingLine:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                      required:
                        - id
                        - name
                    month:
                      format: date
                      type: string
                    amount:
                      type: number
                  required:
                    - reportingLine
                    - month
                    - amount
  /entities/{entityId}/general-ledgers/booking/{generalLedgerId}:
    get:
      summary: Get a booking for a specific general ledger transaction
      tags:
        - Booking
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            type: string
          in: path
          name: generalLedgerId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    nullable: true
                  dateBooking:
                    format: date
                    type: string
                  userBookingName:
                    type: string
                    nullable: true
                  journal:
                    type: object
                    properties:
                      code:
                        type: string
                        nullable: true
                      description:
                        type: string
                        nullable: true
                    required:
                      - code
                      - description
                  transactions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        datePeriod:
                          type: string
                        description:
                          type: string
                          nullable: true
                        relationName:
                          type: string
                          nullable: true
                        amount:
                          type: string
                        account:
                          type: object
                          properties:
                            number:
                              type: string
                            name:
                              type: string
                          required:
                            - number
                            - name
                        axes:
                          type: array
                          items:
                            type: object
                            properties:
                              account:
                                type: string
                              description:
                                type: string
                            required:
                              - account
                              - description
                      required:
                        - id
                        - datePeriod
                        - description
                        - relationName
                        - amount
                        - account
                        - axes
                required:
                  - code
                  - dateBooking
                  - userBookingName
                  - journal
                  - transactions
  /entities/{entityId}/general-ledgers/booking/{generalLedgerId}/attachments:
    get:
      summary: Get a booking's attachments for a specific general ledger transaction
      tags:
        - Booking
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            type: string
          in: path
          name: generalLedgerId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    meta:
                      type: object
                      properties:
                        documentId:
                          type: string
                        documentType:
                          anyOf:
                            - type: string
                              enum:
                                - financial_mutation
                            - type: string
                              enum:
                                - general_journal_document
                            - type: string
                              enum:
                                - receipt
                            - type: string
                              enum:
                                - purchase_invoice
                            - type: string
                              enum:
                                - sales_invoice
                            - type: string
                              enum:
                                - external_sales_invoice
                      required:
                        - documentId
                        - documentType
                  required:
                    - id
                    - name
  /entities/{entityId}/general-ledgers/booking/{generalLedgerId}/attachments/{attachmentId}:
    get:
      summary: Get the attachment for a booking as a binary file
      tags:
        - Booking
      parameters:
        - schema:
            type: string
          in: query
          name: token
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - financial_mutation
              - type: string
                enum:
                  - general_journal_document
              - type: string
                enum:
                  - receipt
              - type: string
                enum:
                  - purchase_invoice
              - type: string
                enum:
                  - sales_invoice
              - type: string
                enum:
                  - external_sales_invoice
          in: query
          name: documentType
          required: false
        - schema:
            type: string
          in: query
          name: documentId
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            type: string
          in: path
          name: generalLedgerId
          required: true
        - schema:
            type: string
          in: path
          name: attachmentId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  minimum: 0
                  maximum: 255
                  type: number
  /entities/{entityId}/general-ledgers:
    get:
      summary: Get a list of transactions providing a general ledger account and an
        analytical axis.
      tags:
        - General Ledger
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: accountId
          required: true
        - schema:
            type: boolean
          in: query
          name: includeAnalyticalAxisFilter
          required: true
        - schema:
            format: uuid
            type: string
          in: query
          name: analyticalAxisId
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        id:
                          type: string
                        description:
                          type: string
                          nullable: true
                        relationName:
                          type: string
                          nullable: true
                        amount:
                          type: string
                      required:
                        - id
                        - description
                        - relationName
                        - amount
                    - type: object
                      properties:
                        datePeriod:
                          format: date
                          type: string
                      required:
                        - datePeriod
    patch:
      tags:
        - Import
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                mapping:
                  type: object
                  additionalProperties:
                    type: object
                    properties:
                      field:
                        type: string
                      type:
                        type: string
                        enum:
                          - string
                          - number
                          - date
                    required:
                      - field
                      - type
                delimiter:
                  minLength: 1
                  maxLength: 4
                  type: string
                decimalSeparator:
                  minLength: 1
                  maxLength: 1
                  type: string
                thousandsSeparator:
                  minLength: 1
                  maxLength: 1
                  type: string
                dateFormat:
                  type: string
                replace:
                  type: object
                  properties:
                    from:
                      format: date
                      type: string
                    to:
                      format: date
                      type: string
                  required:
                    - from
                    - to
              required:
                - mapping
                - delimiter
                - decimalSeparator
                - dateFormat
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                required:
                  - url
  /entities/{entityId}/general-ledgers/accounts-analytical-axes:
    get:
      summary: Get a list of general ledger account id and analytical axis id
        combinations from the general ledger
      tags:
        - General Ledger
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    accountId:
                      format: uuid
                      type: string
                    analyticalAxisId:
                      format: uuid
                      type: string
                      nullable: true
                  required:
                    - accountId
                    - analyticalAxisId
  /entities/{entityId}/general-ledgers/accounts:
    get:
      summary: Get a list of general ledger account id from the general ledger
      tags:
        - General Ledger
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    accountId:
                      format: uuid
                      type: string
                    analyticalAxisId:
                      format: uuid
                      type: string
                      nullable: true
                  required:
                    - accountId
                    - analyticalAxisId
  /entities/{entityId}/cash-flow-reporting-lines:
    get:
      summary: Get a list of reporting lines for the cash flow report
      tags:
        - Reporting Lines
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    rank:
                      type: number
                    parentId:
                      type: string
                      nullable: true
                    top:
                      type: boolean
                    entityId:
                      type: string
                      nullable: true
                    organisationId:
                      type: string
                      nullable: true
                  required:
                    - id
                    - name
                    - rank
                    - parentId
                    - top
                    - entityId
                    - organisationId
    put:
      summary: Set the list of reporting lines for the cash flow report
      tags:
        - Reporting Lines
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      rank:
                        type: number
                      top:
                        type: boolean
                    required:
                      - id
                      - name
                      - rank
                      - top
                  - type: object
                    properties:
                      parentId:
                        type: string
                        nullable: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/reporting-lines:
    get:
      summary: Get a list of reporting lines for the profit & loss and balance sheet
        reports
      tags:
        - Reporting Lines
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/reporting-lines/{report}:
    get:
      summary: Get a list of reporting lines for a specific report
      tags:
        - Reporting Lines
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: entityId
          required: true
        - schema:
            type: string
            enum:
              - PL
              - BS
            example: PL
          in: path
          name: report
          required: true
      responses:
        "200":
          description: Default Response
    put:
      summary: Set the list of reporting lines for a specific report
      tags:
        - Reporting Lines
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - reportingLines
              properties:
                reportingLines:
                  type: array
                  items:
                    type: object
                    additionalProperties: false
                    required:
                      - id
                      - name
                      - rank
                      - top
                    properties:
                      id:
                        type: string
                        example: 00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000
                      name:
                        type: string
                        example: My Reporting Line
                      rank:
                        type: integer
                        minimum: 0
                        example: 1
                      top:
                        type: boolean
                      parent_id:
                        type:
                          - "null"
                          - string
                        example: 00000000-0000-0000-0000-000000000000_11111111-1111-1111-1111-111111111111
                      cash_flow_reporting_line_id:
                        type:
                          - "null"
                          - string
                        example: null
        required: true
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: entityId
          required: true
        - schema:
            type: string
            enum:
              - PL
              - BS
            example: PL
          in: path
          name: report
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/mappings:
    get:
      summary: Get all mappings for a specific business entity
      tags:
        - Mappings
      parameters:
        - schema:
            type: boolean
          in: query
          name: ignoreEntityAxis
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    accountAnalyticalAxisId:
                      format: uuid
                      type: string
                    accountAnalyticalAxis:
                      type: object
                      properties:
                        accountId:
                          format: uuid
                          type: string
                        analyticalAxisId:
                          format: uuid
                          type: string
                          nullable: true
                        budgetAccounts:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              name:
                                type: string
                              accountAnalyticalAxisId:
                                type: string
                                nullable: true
                              managedByBudgetType:
                                anyOf:
                                  - type: string
                                    enum:
                                      - budget
                                  - type: string
                                    enum:
                                      - crm
                                  - type: string
                                    enum:
                                      - personnel_costs
                                  - type: string
                                    enum:
                                      - recurring_revenue
                                  - type: string
                                    enum:
                                      - vat
                                  - type: string
                                    enum:
                                      - project_revenue
                                  - type: string
                                    enum:
                                      - pxq
                                  - type: string
                                    enum:
                                      - cogs
                                  - type: string
                                    enum:
                                      - inventory
                                  - type: string
                                    enum:
                                      - outstanding_items
                                  - type: string
                                    enum:
                                      - fixed-assets
                                  - type: string
                                    enum:
                                      - loans
                              entityId:
                                format: uuid
                                type: string
                            required:
                              - id
                              - name
                              - accountAnalyticalAxisId
                              - managedByBudgetType
                              - entityId
                          nullable: true
                        account:
                          type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            account_number:
                              type: string
                            account_name:
                              type: string
                          required:
                            - id
                            - account_number
                            - account_name
                          nullable: true
                        analyticalAxis:
                          type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            account:
                              type: string
                            description:
                              type: string
                          required:
                            - id
                            - account
                            - description
                          nullable: true
                      required:
                        - accountId
                        - analyticalAxisId
                    reportingLineId:
                      type: string
                      nullable: true
                    organisationReportingLineId:
                      type: string
                      nullable: true
                    entityId:
                      format: uuid
                      type: string
                    reportingLine:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        rank:
                          type: number
                        parent_id:
                          type: string
                          nullable: true
                        report:
                          type: string
                        top:
                          type: boolean
                        cash_flow_reporting_line_id:
                          type: string
                          nullable: true
                        entity_id:
                          format: uuid
                          type: string
                          nullable: true
                        organisation_id:
                          format: uuid
                          type: string
                          nullable: true
                      required:
                        - id
                        - name
                        - rank
                        - parent_id
                        - report
                        - top
                        - cash_flow_reporting_line_id
                        - entity_id
                        - organisation_id
                      nullable: true
                    organisationReportingLine:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        rank:
                          type: number
                        parent_id:
                          type: string
                          nullable: true
                        report:
                          type: string
                        top:
                          type: boolean
                        cash_flow_reporting_line_id:
                          type: string
                          nullable: true
                        entity_id:
                          format: uuid
                          type: string
                          nullable: true
                        organisation_id:
                          format: uuid
                          type: string
                          nullable: true
                      required:
                        - id
                        - name
                        - rank
                        - parent_id
                        - report
                        - top
                        - cash_flow_reporting_line_id
                        - entity_id
                        - organisation_id
                      nullable: true
                  required:
                    - id
                    - accountAnalyticalAxisId
                    - reportingLineId
                    - organisationReportingLineId
                    - entityId
  /entities/{entityId}/mappings/batch:
    patch:
      summary: Patch mappings for a specific business entity
      tags:
        - Mappings
      requestBody:
        content:
          application/json:
            schema:
              minItems: 1
              type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      action:
                        type: string
                        enum:
                          - DELETE
                    required:
                      - id
                      - action
                  - type: object
                    allOf:
                      - type: object
                        properties:
                          accountId:
                            format: uuid
                            type: string
                          analyticalAxisId:
                            format: uuid
                            type: string
                            nullable: true
                          action:
                            type: string
                            enum:
                              - CREATE
                        required:
                          - accountId
                          - analyticalAxisId
                          - action
                      - type: object
                        properties:
                          reportingLineId:
                            type: string
                        required:
                          - reportingLineId
                  - type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          action:
                            type: string
                            enum:
                              - UPDATE
                        required:
                          - id
                          - action
                      - type: object
                        properties:
                          reportingLineId:
                            type: string
                            nullable: true
                        required:
                          - reportingLineId
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - type: object
                      properties:
                        action:
                          anyOf:
                            - type: string
                              enum:
                                - UPDATE
                            - type: string
                              enum:
                                - DELETE
                        id:
                          format: uuid
                          type: string
                      required:
                        - action
                        - id
                    - type: object
                      properties:
                        action:
                          type: string
                          enum:
                            - CREATE
                        id:
                          format: uuid
                          type: string
                        mapping:
                          type: object
                          properties:
                            accountAnalyticalAxis:
                              type: object
                              properties:
                                accountId:
                                  format: uuid
                                  type: string
                                analyticalAxisId:
                                  format: uuid
                                  type: string
                                  nullable: true
                              required:
                                - accountId
                                - analyticalAxisId
                            reportingLineId:
                              type: string
                          required:
                            - accountAnalyticalAxis
                            - reportingLineId
                      required:
                        - action
                        - id
                        - mapping
  /entities/{entityId}/mappings/copy/{sourceEntityId}:
    post:
      summary: Copy unmapped account - analytical axes combinations from one entity to
        another
      tags:
        - Mappings
      requestBody:
        content:
          application/json:
            schema:
              minItems: 1
              type: array
              items:
                type: object
                properties:
                  accountId:
                    format: uuid
                    type: string
                  analyticalAxisId:
                    format: uuid
                    type: string
                    nullable: true
                required:
                  - accountId
                  - analyticalAxisId
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: sourceEntityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions:
    get:
      summary: Get a list of budget versions
      tags:
        - Budgets
      parameters:
        - schema:
            anyOf:
              - anyOf:
                  - type: string
                    enum:
                      - budget
                  - type: string
                    enum:
                      - crm
                  - type: string
                    enum:
                      - personnel_costs
                  - type: string
                    enum:
                      - recurring_revenue
                  - type: string
                    enum:
                      - vat
                  - type: string
                    enum:
                      - project_revenue
                  - type: string
                    enum:
                      - pxq
                  - type: string
                    enum:
                      - cogs
                  - type: string
                    enum:
                      - inventory
                  - type: string
                    enum:
                      - outstanding_items
                  - type: string
                    enum:
                      - fixed-assets
                  - type: string
                    enum:
                      - loans
              - type: array
                items:
                  anyOf:
                    - type: string
                      enum:
                        - budget
                    - type: string
                      enum:
                        - crm
                    - type: string
                      enum:
                        - personnel_costs
                    - type: string
                      enum:
                        - recurring_revenue
                    - type: string
                      enum:
                        - vat
                    - type: string
                      enum:
                        - project_revenue
                    - type: string
                      enum:
                        - pxq
                    - type: string
                      enum:
                        - cogs
                    - type: string
                      enum:
                        - inventory
                    - type: string
                      enum:
                        - outstanding_items
                    - type: string
                      enum:
                        - fixed-assets
                    - type: string
                      enum:
                        - loans
          in: query
          name: type
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions/{budgetVersionId}:
    delete:
      summary: Delete a budget version
      tags:
        - Budgets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "204":
          description: Succesfully deleted budget version
    patch:
      summary: Update a specific budget version
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                active:
                  type: boolean
                initial:
                  type: boolean
                name:
                  minLength: 1
                  maxLength: 255
                  type: string
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "204":
          description: Succesfully updated the budget version
  /entities/{entityId}/budget-versions/crm:
    post:
      summary: Create a new CRM budget version
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                name:
                  type: string
                integrationId:
                  format: uuid
                  type: string
                settings:
                  anyOf:
                    - type: object
                      properties:
                        budgetingType:
                          type: string
                          enum:
                            - acrossProducts
                        accountAnalyticalAxisId:
                          type: string
                      required:
                        - budgetingType
                        - accountAnalyticalAxisId
                    - type: object
                      properties:
                        budgetingType:
                          type: string
                          enum:
                            - perProduct
                        accountAnalyticalAxisIdByProductId:
                          type: object
                          additionalProperties:
                            type: string
                      required:
                        - budgetingType
                        - accountAnalyticalAxisIdByProductId
                parameters:
                  anyOf:
                    - type: object
                      properties:
                        rollingWindow:
                          minimum: 1
                          type: number
                        valueMethod:
                          type: string
                          enum:
                            - weightedAverage
                      required:
                        - rollingWindow
                        - valueMethod
                    - type: object
                      properties:
                        rollingWindow:
                          minimum: 1
                          type: number
                        valueMethod:
                          type: string
                          enum:
                            - probabilityThreshold
                        probabilityThreshold:
                          type: number
                      required:
                        - rollingWindow
                        - valueMethod
                        - probabilityThreshold
              required:
                - name
                - integrationId
                - settings
                - parameters
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions/crm/{budgetVersionId}:
    put:
      summary: Create a new CRM budget version
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                name:
                  type: string
                integrationId:
                  format: uuid
                  type: string
                settings:
                  anyOf:
                    - type: object
                      properties:
                        budgetingType:
                          type: string
                          enum:
                            - acrossProducts
                        accountAnalyticalAxisId:
                          type: string
                      required:
                        - budgetingType
                        - accountAnalyticalAxisId
                    - type: object
                      properties:
                        budgetingType:
                          type: string
                          enum:
                            - perProduct
                        accountAnalyticalAxisIdByProductId:
                          type: object
                          additionalProperties:
                            type: string
                      required:
                        - budgetingType
                        - accountAnalyticalAxisIdByProductId
                parameters:
                  anyOf:
                    - type: object
                      properties:
                        rollingWindow:
                          minimum: 1
                          type: number
                        valueMethod:
                          type: string
                          enum:
                            - weightedAverage
                      required:
                        - rollingWindow
                        - valueMethod
                    - type: object
                      properties:
                        rollingWindow:
                          minimum: 1
                          type: number
                        valueMethod:
                          type: string
                          enum:
                            - probabilityThreshold
                        probabilityThreshold:
                          type: number
                      required:
                        - rollingWindow
                        - valueMethod
                        - probabilityThreshold
              required:
                - name
                - integrationId
                - settings
                - parameters
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions/vat:
    post:
      summary: Create a new VAT budget version
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                settings:
                  type: object
                  properties:
                    general:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - split
                            receivableReportingLine:
                              type: object
                              properties:
                                id:
                                  type: string
                              required:
                                - id
                            payableReportingLine:
                              type: object
                              properties:
                                id:
                                  type: string
                              required:
                                - id
                            generatedVatReceivableBudgetAccount:
                              type: object
                              properties:
                                name:
                                  type: string
                                accountAnalyticalAxis:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                              required:
                                - name
                                - accountAnalyticalAxis
                            vatSettlementsReceivableBudgetAccount:
                              type: object
                              properties:
                                name:
                                  type: string
                                accountAnalyticalAxis:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                              required:
                                - name
                                - accountAnalyticalAxis
                            generatedVatPayableBudgetAccount:
                              type: object
                              properties:
                                name:
                                  type: string
                                accountAnalyticalAxis:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                              required:
                                - name
                                - accountAnalyticalAxis
                            vatSettlementsPayableBudgetAccount:
                              type: object
                              properties:
                                name:
                                  type: string
                                accountAnalyticalAxis:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                              required:
                                - name
                                - accountAnalyticalAxis
                          required:
                            - type
                            - receivableReportingLine
                            - payableReportingLine
                            - generatedVatReceivableBudgetAccount
                            - vatSettlementsReceivableBudgetAccount
                            - generatedVatPayableBudgetAccount
                            - vatSettlementsPayableBudgetAccount
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - unified
                            reportingLine:
                              type: object
                              properties:
                                id:
                                  type: string
                              required:
                                - id
                            generatedVatBudgetAccount:
                              type: object
                              properties:
                                name:
                                  type: string
                                accountAnalyticalAxis:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                              required:
                                - name
                                - accountAnalyticalAxis
                            vatSettlementsBudgetAccount:
                              type: object
                              properties:
                                name:
                                  type: string
                                accountAnalyticalAxis:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                              required:
                                - name
                                - accountAnalyticalAxis
                          required:
                            - type
                            - reportingLine
                            - generatedVatBudgetAccount
                            - vatSettlementsBudgetAccount
                    rates:
                      type: array
                      items:
                        type: object
                        properties:
                          month:
                            format: date
                            type: string
                            nullable: true
                          budgetAccount:
                            type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                          rate:
                            type: number
                        required:
                          - month
                          - budgetAccount
                          - rate
                    years:
                      minItems: 1
                      type: array
                      items:
                        type: object
                        properties:
                          year:
                            type: number
                          periods:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                startDate:
                                  format: date
                                  type: string
                                endDate:
                                  format: date
                                  type: string
                                paymentDate:
                                  format: date
                                  type: string
                                refundDate:
                                  format: date
                                  type: string
                              required:
                                - name
                                - startDate
                                - endDate
                                - paymentDate
                                - refundDate
                        required:
                          - year
                          - periods
                  required:
                    - general
                    - rates
                    - years
              required:
                - name
                - settings
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions/vat/{budgetVersionId}/settings:
    patch:
      summary: Update the config of an existing VAT budget version
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                general:
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - split
                        receivableReportingLine:
                          type: object
                          properties:
                            id:
                              type: string
                          required:
                            - id
                        payableReportingLine:
                          type: object
                          properties:
                            id:
                              type: string
                          required:
                            - id
                        generatedVatReceivableBudgetAccount:
                          type: object
                          properties:
                            name:
                              type: string
                            accountAnalyticalAxis:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                              required:
                                - id
                          required:
                            - name
                            - accountAnalyticalAxis
                        vatSettlementsReceivableBudgetAccount:
                          type: object
                          properties:
                            name:
                              type: string
                            accountAnalyticalAxis:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                              required:
                                - id
                          required:
                            - name
                            - accountAnalyticalAxis
                        generatedVatPayableBudgetAccount:
                          type: object
                          properties:
                            name:
                              type: string
                            accountAnalyticalAxis:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                              required:
                                - id
                          required:
                            - name
                            - accountAnalyticalAxis
                        vatSettlementsPayableBudgetAccount:
                          type: object
                          properties:
                            name:
                              type: string
                            accountAnalyticalAxis:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                              required:
                                - id
                          required:
                            - name
                            - accountAnalyticalAxis
                      required:
                        - type
                        - receivableReportingLine
                        - payableReportingLine
                        - generatedVatReceivableBudgetAccount
                        - vatSettlementsReceivableBudgetAccount
                        - generatedVatPayableBudgetAccount
                        - vatSettlementsPayableBudgetAccount
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - unified
                        reportingLine:
                          type: object
                          properties:
                            id:
                              type: string
                          required:
                            - id
                        generatedVatBudgetAccount:
                          type: object
                          properties:
                            name:
                              type: string
                            accountAnalyticalAxis:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                              required:
                                - id
                          required:
                            - name
                            - accountAnalyticalAxis
                        vatSettlementsBudgetAccount:
                          type: object
                          properties:
                            name:
                              type: string
                            accountAnalyticalAxis:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                              required:
                                - id
                          required:
                            - name
                            - accountAnalyticalAxis
                      required:
                        - type
                        - reportingLine
                        - generatedVatBudgetAccount
                        - vatSettlementsBudgetAccount
                rates:
                  type: array
                  items:
                    type: object
                    properties:
                      month:
                        format: date
                        type: string
                        nullable: true
                      budgetAccount:
                        type: object
                        properties:
                          id:
                            type: string
                        required:
                          - id
                      rate:
                        type: number
                    required:
                      - month
                      - budgetAccount
                      - rate
                years:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      year:
                        type: number
                      periods:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            startDate:
                              format: date
                              type: string
                            endDate:
                              format: date
                              type: string
                            paymentDate:
                              format: date
                              type: string
                            refundDate:
                              format: date
                              type: string
                          required:
                            - name
                            - startDate
                            - endDate
                            - paymentDate
                            - refundDate
                    required:
                      - year
                      - periods
              required:
                - general
                - rates
                - years
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
    get:
      summary: Get the settings for a VAT budget version
      tags:
        - Budgets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  general:
                    anyOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - split
                          receivableReportingLine:
                            type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                          payableReportingLine:
                            type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                          generatedVatReceivableBudgetAccount:
                            type: object
                            properties:
                              name:
                                type: string
                              accountAnalyticalAxis:
                                type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                required:
                                  - id
                            required:
                              - name
                          vatSettlementsReceivableBudgetAccount:
                            type: object
                            properties:
                              name:
                                type: string
                              accountAnalyticalAxis:
                                type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                required:
                                  - id
                            required:
                              - name
                          generatedVatPayableBudgetAccount:
                            type: object
                            properties:
                              name:
                                type: string
                              accountAnalyticalAxis:
                                type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                required:
                                  - id
                            required:
                              - name
                          vatSettlementsPayableBudgetAccount:
                            type: object
                            properties:
                              name:
                                type: string
                              accountAnalyticalAxis:
                                type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                required:
                                  - id
                            required:
                              - name
                        required:
                          - type
                          - generatedVatReceivableBudgetAccount
                          - vatSettlementsReceivableBudgetAccount
                          - generatedVatPayableBudgetAccount
                          - vatSettlementsPayableBudgetAccount
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - unified
                          reportingLine:
                            type: object
                            properties:
                              id:
                                type: string
                            required:
                              - id
                          generatedVatBudgetAccount:
                            type: object
                            properties:
                              name:
                                type: string
                              accountAnalyticalAxis:
                                type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                required:
                                  - id
                            required:
                              - name
                          vatSettlementsBudgetAccount:
                            type: object
                            properties:
                              name:
                                type: string
                              accountAnalyticalAxis:
                                type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                required:
                                  - id
                            required:
                              - name
                        required:
                          - type
                          - generatedVatBudgetAccount
                          - vatSettlementsBudgetAccount
                  rates:
                    type: array
                    items:
                      type: object
                      properties:
                        month:
                          format: date
                          type: string
                          nullable: true
                        budgetAccount:
                          type: object
                          properties:
                            id:
                              type: string
                          required:
                            - id
                        rate:
                          type: number
                      required:
                        - month
                        - budgetAccount
                        - rate
                  years:
                    minItems: 1
                    type: array
                    items:
                      type: object
                      properties:
                        year:
                          type: number
                        periods:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                              startDate:
                                format: date
                                type: string
                              endDate:
                                format: date
                                type: string
                              paymentDate:
                                format: date
                                type: string
                              refundDate:
                                format: date
                                type: string
                            required:
                              - name
                              - startDate
                              - endDate
                              - paymentDate
                              - refundDate
                      required:
                        - year
                        - periods
                required:
                  - general
                  - rates
                  - years
  /entities/{entityId}/budget-versions/outstanding-items:
    post:
      summary: Create a new outstanding items budget version
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                name:
                  minLength: 1
                  type: string
                settings:
                  type: object
                  properties:
                    manualUnwindingItems:
                      type: array
                      items:
                        type: object
                        properties:
                          outstandingItemId:
                            format: uuid
                            type: string
                          paymentDate:
                            format: date
                            type: string
                          enabled:
                            type: boolean
                        required:
                          - outstandingItemId
                          - paymentDate
                          - enabled
                    automaticUnwindingSettings:
                      type: object
                      properties:
                        payable:
                          type: object
                          properties:
                            pending:
                              type: array
                              items:
                                type: object
                                properties:
                                  paymentDelay:
                                    minimum: 0
                                    type: number
                                  weight:
                                    minimum: 0
                                    maximum: 1
                                    type: number
                                  enabled:
                                    type: boolean
                                required:
                                  - paymentDelay
                                  - weight
                                  - enabled
                            overdue:
                              type: array
                              items:
                                type: object
                                properties:
                                  paymentDelay:
                                    minimum: 0
                                    type: number
                                  weight:
                                    minimum: 0
                                    maximum: 1
                                    type: number
                                  enabled:
                                    type: boolean
                                required:
                                  - paymentDelay
                                  - weight
                                  - enabled
                          required:
                            - pending
                            - overdue
                        receivable:
                          type: object
                          properties:
                            pending:
                              type: array
                              items:
                                type: object
                                properties:
                                  paymentDelay:
                                    minimum: 0
                                    type: number
                                  weight:
                                    minimum: 0
                                    maximum: 1
                                    type: number
                                  enabled:
                                    type: boolean
                                required:
                                  - paymentDelay
                                  - weight
                                  - enabled
                            overdue:
                              type: array
                              items:
                                type: object
                                properties:
                                  paymentDelay:
                                    minimum: 0
                                    type: number
                                  weight:
                                    minimum: 0
                                    maximum: 1
                                    type: number
                                  enabled:
                                    type: boolean
                                required:
                                  - paymentDelay
                                  - weight
                                  - enabled
                          required:
                            - pending
                            - overdue
                      required:
                        - payable
                        - receivable
                    forecastPaymentTerms:
                      type: array
                      items:
                        type: object
                        properties:
                          budgetAccountId:
                            type: string
                          itemType:
                            anyOf:
                              - type: string
                                enum:
                                  - payable
                              - type: string
                                enum:
                                  - receivable
                          paymentDelay:
                            minimum: 1
                            type: number
                        required:
                          - budgetAccountId
                          - itemType
                          - paymentDelay
                    unwindBudgetAccounts:
                      type: object
                      properties:
                        payable:
                          type: object
                          properties:
                            manual:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                            automatic:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                            forecast:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                          required:
                            - manual
                            - automatic
                            - forecast
                        receivable:
                          type: object
                          properties:
                            manual:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                            automatic:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                            forecast:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                          required:
                            - manual
                            - automatic
                            - forecast
                      required:
                        - payable
                        - receivable
                  required:
                    - manualUnwindingItems
                    - automaticUnwindingSettings
                    - forecastPaymentTerms
                    - unwindBudgetAccounts
              required:
                - name
                - settings
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions/outstanding-items/{budgetVersionId}:
    patch:
      summary: Update an outstanding items budget version
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                settings:
                  type: object
                  properties:
                    manualUnwindingItems:
                      type: array
                      items:
                        type: object
                        properties:
                          outstandingItemId:
                            format: uuid
                            type: string
                          paymentDate:
                            format: date
                            type: string
                          enabled:
                            type: boolean
                        required:
                          - outstandingItemId
                          - paymentDate
                          - enabled
                    automaticUnwindingSettings:
                      type: object
                      properties:
                        payable:
                          type: object
                          properties:
                            pending:
                              type: array
                              items:
                                type: object
                                properties:
                                  paymentDelay:
                                    minimum: 0
                                    type: number
                                  weight:
                                    minimum: 0
                                    maximum: 1
                                    type: number
                                  enabled:
                                    type: boolean
                                required:
                                  - paymentDelay
                                  - weight
                                  - enabled
                            overdue:
                              type: array
                              items:
                                type: object
                                properties:
                                  paymentDelay:
                                    minimum: 0
                                    type: number
                                  weight:
                                    minimum: 0
                                    maximum: 1
                                    type: number
                                  enabled:
                                    type: boolean
                                required:
                                  - paymentDelay
                                  - weight
                                  - enabled
                          required:
                            - pending
                            - overdue
                        receivable:
                          type: object
                          properties:
                            pending:
                              type: array
                              items:
                                type: object
                                properties:
                                  paymentDelay:
                                    minimum: 0
                                    type: number
                                  weight:
                                    minimum: 0
                                    maximum: 1
                                    type: number
                                  enabled:
                                    type: boolean
                                required:
                                  - paymentDelay
                                  - weight
                                  - enabled
                            overdue:
                              type: array
                              items:
                                type: object
                                properties:
                                  paymentDelay:
                                    minimum: 0
                                    type: number
                                  weight:
                                    minimum: 0
                                    maximum: 1
                                    type: number
                                  enabled:
                                    type: boolean
                                required:
                                  - paymentDelay
                                  - weight
                                  - enabled
                          required:
                            - pending
                            - overdue
                      required:
                        - payable
                        - receivable
                    forecastPaymentTerms:
                      type: array
                      items:
                        type: object
                        properties:
                          budgetAccountId:
                            type: string
                          itemType:
                            anyOf:
                              - type: string
                                enum:
                                  - payable
                              - type: string
                                enum:
                                  - receivable
                          paymentDelay:
                            minimum: 1
                            type: number
                        required:
                          - budgetAccountId
                          - itemType
                          - paymentDelay
                    unwindBudgetAccounts:
                      type: object
                      properties:
                        payable:
                          type: object
                          properties:
                            manual:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                            automatic:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                            forecast:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                          required:
                            - manual
                            - automatic
                            - forecast
                        receivable:
                          type: object
                          properties:
                            manual:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                            automatic:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                            forecast:
                              type: object
                              properties:
                                accountAnalyticalAxisId:
                                  type: string
                                name:
                                  type: string
                              required:
                                - accountAnalyticalAxisId
                                - name
                          required:
                            - manual
                            - automatic
                            - forecast
                      required:
                        - payable
                        - receivable
              required:
                - settings
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions/outstanding-items/{budgetVersionId}/settings:
    get:
      summary: Get outstanding items budget version settings
      tags:
        - Budgets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  manualUnwindingItems:
                    type: array
                    items:
                      type: object
                      properties:
                        outstandingItemId:
                          format: uuid
                          type: string
                        paymentDate:
                          format: date
                          type: string
                        enabled:
                          type: boolean
                      required:
                        - outstandingItemId
                        - paymentDate
                        - enabled
                  automaticUnwindingSettings:
                    type: object
                    properties:
                      payable:
                        type: object
                        properties:
                          pending:
                            type: array
                            items:
                              type: object
                              properties:
                                paymentDelay:
                                  minimum: 0
                                  type: number
                                weight:
                                  minimum: 0
                                  maximum: 1
                                  type: number
                                enabled:
                                  type: boolean
                              required:
                                - paymentDelay
                                - weight
                                - enabled
                          overdue:
                            type: array
                            items:
                              type: object
                              properties:
                                paymentDelay:
                                  minimum: 0
                                  type: number
                                weight:
                                  minimum: 0
                                  maximum: 1
                                  type: number
                                enabled:
                                  type: boolean
                              required:
                                - paymentDelay
                                - weight
                                - enabled
                        required:
                          - pending
                          - overdue
                      receivable:
                        type: object
                        properties:
                          pending:
                            type: array
                            items:
                              type: object
                              properties:
                                paymentDelay:
                                  minimum: 0
                                  type: number
                                weight:
                                  minimum: 0
                                  maximum: 1
                                  type: number
                                enabled:
                                  type: boolean
                              required:
                                - paymentDelay
                                - weight
                                - enabled
                          overdue:
                            type: array
                            items:
                              type: object
                              properties:
                                paymentDelay:
                                  minimum: 0
                                  type: number
                                weight:
                                  minimum: 0
                                  maximum: 1
                                  type: number
                                enabled:
                                  type: boolean
                              required:
                                - paymentDelay
                                - weight
                                - enabled
                        required:
                          - pending
                          - overdue
                    required:
                      - payable
                      - receivable
                  forecastPaymentTerms:
                    type: array
                    items:
                      type: object
                      properties:
                        budgetAccountId:
                          type: string
                        itemType:
                          anyOf:
                            - type: string
                              enum:
                                - payable
                            - type: string
                              enum:
                                - receivable
                        paymentDelay:
                          minimum: 1
                          type: number
                      required:
                        - budgetAccountId
                        - itemType
                        - paymentDelay
                  unwindBudgetAccounts:
                    type: object
                    properties:
                      payable:
                        type: object
                        properties:
                          manual:
                            type: object
                            properties:
                              accountAnalyticalAxisId:
                                type: string
                                nullable: true
                              name:
                                type: string
                            required:
                              - accountAnalyticalAxisId
                              - name
                          automatic:
                            type: object
                            properties:
                              accountAnalyticalAxisId:
                                type: string
                                nullable: true
                              name:
                                type: string
                            required:
                              - accountAnalyticalAxisId
                              - name
                          forecast:
                            type: object
                            properties:
                              accountAnalyticalAxisId:
                                type: string
                                nullable: true
                              name:
                                type: string
                            required:
                              - accountAnalyticalAxisId
                              - name
                        required:
                          - manual
                          - automatic
                          - forecast
                      receivable:
                        type: object
                        properties:
                          manual:
                            type: object
                            properties:
                              accountAnalyticalAxisId:
                                type: string
                                nullable: true
                              name:
                                type: string
                            required:
                              - accountAnalyticalAxisId
                              - name
                          automatic:
                            type: object
                            properties:
                              accountAnalyticalAxisId:
                                type: string
                                nullable: true
                              name:
                                type: string
                            required:
                              - accountAnalyticalAxisId
                              - name
                          forecast:
                            type: object
                            properties:
                              accountAnalyticalAxisId:
                                type: string
                                nullable: true
                              name:
                                type: string
                            required:
                              - accountAnalyticalAxisId
                              - name
                        required:
                          - manual
                          - automatic
                          - forecast
                    required:
                      - payable
                      - receivable
                required:
                  - manualUnwindingItems
                  - automaticUnwindingSettings
                  - forecastPaymentTerms
                  - unwindBudgetAccounts
  /entities/{entityId}/budget-accounts:
    get:
      summary: Get a list of budget accounts
      tags:
        - Budgets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    accountAnalyticalAxisId:
                      type: string
                      nullable: true
                    managedByBudgetType:
                      anyOf:
                        - type: string
                          enum:
                            - budget
                        - type: string
                          enum:
                            - crm
                        - type: string
                          enum:
                            - personnel_costs
                        - type: string
                          enum:
                            - recurring_revenue
                        - type: string
                          enum:
                            - vat
                        - type: string
                          enum:
                            - project_revenue
                        - type: string
                          enum:
                            - pxq
                        - type: string
                          enum:
                            - cogs
                        - type: string
                          enum:
                            - inventory
                        - type: string
                          enum:
                            - outstanding_items
                        - type: string
                          enum:
                            - fixed-assets
                        - type: string
                          enum:
                            - loans
                    entityId:
                      format: uuid
                      type: string
                  required:
                    - id
                    - name
                    - accountAnalyticalAxisId
                    - managedByBudgetType
                    - entityId
    put:
      summary: Set the list of budget accounts
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  accountAnalyticalAxisId:
                    type: string
                  managedByBudgetType:
                    anyOf:
                      - type: string
                        enum:
                          - budget
                      - type: string
                        enum:
                          - crm
                      - type: string
                        enum:
                          - personnel_costs
                      - type: string
                        enum:
                          - recurring_revenue
                      - type: string
                        enum:
                          - vat
                      - type: string
                        enum:
                          - project_revenue
                      - type: string
                        enum:
                          - pxq
                      - type: string
                        enum:
                          - cogs
                      - type: string
                        enum:
                          - inventory
                      - type: string
                        enum:
                          - outstanding_items
                      - type: string
                        enum:
                          - fixed-assets
                      - type: string
                        enum:
                          - loans
                required:
                  - id
                  - name
                  - accountAnalyticalAxisId
                  - managedByBudgetType
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budgets:
    get:
      summary: Get all the budgets for a specific business entity, optionally filtered
        by budget version
      tags:
        - Budgets
      parameters:
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: budgetVersionId
          required: true
        - schema:
            format: date
            type: string
            nullable: true
          in: query
          name: startDate
          required: true
        - schema:
            format: date
            type: string
            nullable: true
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
            nullable: true
          in: query
          name: endDate
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    budgetVersionId:
                      format: uuid
                      type: string
                    budgetAccountId:
                      type: string
                    period:
                      format: date
                      type: string
                    entityId:
                      format: uuid
                      type: string
                    amount:
                      type: number
                    budgetType:
                      anyOf:
                        - type: string
                          enum:
                            - budget
                        - type: string
                          enum:
                            - crm
                        - type: string
                          enum:
                            - personnel_costs
                        - type: string
                          enum:
                            - recurring_revenue
                        - type: string
                          enum:
                            - vat
                        - type: string
                          enum:
                            - project_revenue
                        - type: string
                          enum:
                            - pxq
                        - type: string
                          enum:
                            - cogs
                        - type: string
                          enum:
                            - inventory
                        - type: string
                          enum:
                            - outstanding_items
                        - type: string
                          enum:
                            - fixed-assets
                        - type: string
                          enum:
                            - loans
                  required:
                    - budgetVersionId
                    - budgetAccountId
                    - period
                    - entityId
                    - amount
                    - budgetType
  /entities/{entityId}/budget-versions/{budgetVersionId}/budgets:
    post:
      summary: Get all the budget lines from a budget version for a specific budget
        account id
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                budgetAccountIds:
                  anyOf:
                    - type: array
                      items:
                        type: string
                    - type: string
              required:
                - budgetAccountIds
        required: true
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  additionalProperties: false
                  type: object
                  properties:
                    budgetAccountId:
                      type: string
                    datePeriod:
                      format: date
                      type: string
                    amount:
                      type: number
                  required:
                    - budgetAccountId
                    - datePeriod
                    - amount
  /entities/{entityId}/custom-metrics:
    get:
      summary: Get a list of custom metrics
      tags:
        - Custom Metrics
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        customMetricType:
                          anyOf:
                            - type: string
                              enum:
                                - net_result
                            - type: string
                              enum:
                                - revenue
                            - type: string
                              enum:
                                - cash_and_bank
                            - type: string
                              enum:
                                - total_balance_sheet
                            - type: string
                              enum:
                                - sales_and_marketing_costs
                            - type: string
                              enum:
                                - result_carried_forward
                            - type: string
                              enum:
                                - bank
                            - type: string
                              enum:
                                - equity
                            - type: string
                              enum:
                                - fx_rate_difference_bs
                            - type: string
                              enum:
                                - fx_rate_difference_pl
                        reportingLineId:
                          type: string
                          nullable: true
                        report:
                          type: string
                          enum:
                            - PL
                            - BS
                        entityId:
                          format: uuid
                          type: string
                      required:
                        - id
                        - customMetricType
                        - reportingLineId
                        - report
                        - entityId
                    - type: object
                      properties:
                        default:
                          type: boolean
                        mandatory:
                          type: boolean
                      required:
                        - default
                        - mandatory
    put:
      summary: Set the list of custom metrics
      tags:
        - Custom Metrics
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  customMetricType:
                    anyOf:
                      - type: string
                        enum:
                          - net_result
                      - type: string
                        enum:
                          - revenue
                      - type: string
                        enum:
                          - cash_and_bank
                      - type: string
                        enum:
                          - total_balance_sheet
                      - type: string
                        enum:
                          - sales_and_marketing_costs
                      - type: string
                        enum:
                          - result_carried_forward
                      - type: string
                        enum:
                          - bank
                      - type: string
                        enum:
                          - equity
                      - type: string
                        enum:
                          - fx_rate_difference_bs
                      - type: string
                        enum:
                          - fx_rate_difference_pl
                  reportingLineId:
                    type: string
                    nullable: true
                  report:
                    type: string
                    enum:
                      - PL
                      - BS
                required:
                  - id
                  - customMetricType
                  - reportingLineId
                  - report
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/adjusting-entries:
    get:
      summary: Get a list of adjusting entries
      tags:
        - Adjusting Entries
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    datePeriod:
                      format: date
                      type: string
                    description:
                      type: string
                      nullable: true
                    accountId:
                      format: uuid
                      type: string
                    analyticalAxisId:
                      format: uuid
                      type: string
                      nullable: true
                    amount:
                      type: number
                    user:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        fullName:
                          type: string
                      required:
                        - id
                        - fullName
                  required:
                    - id
                    - datePeriod
                    - description
                    - accountId
                    - analyticalAxisId
                    - amount
                    - user
    put:
      summary: Set the list of adjusting entries
      tags:
        - Adjusting Entries
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                      datePeriod:
                        format: date
                        type: string
                      description:
                        type: string
                        nullable: true
                      accountId:
                        format: uuid
                        type: string
                      analyticalAxisId:
                        format: uuid
                        type: string
                        nullable: true
                      amount:
                        type: number
                    required:
                      - id
                      - datePeriod
                      - description
                      - accountId
                      - analyticalAxisId
                      - amount
                  - type: object
                    properties:
                      userId:
                        format: uuid
                        type: string
                    required:
                      - userId
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/outstanding-items/receivable:
    get:
      summary: Get a list of all outstanding receivables
      tags:
        - Outstanding Items
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    transaction_code:
                      type: string
                      nullable: true
                    due_date:
                      format: date
                      type: string
                      nullable: true
                    relation_name:
                      type: string
                      nullable: true
                    amount:
                      anyOf:
                        - type: string
                        - type: number
                    amount_outstanding:
                      anyOf:
                        - type: string
                        - type: number
                        - type: "null"
                    general_ledger:
                      type: object
                      properties:
                        transaction_code:
                          type: string
                          nullable: true
                      nullable: true
                  required:
                    - id
                    - transaction_code
                    - due_date
                    - relation_name
                    - amount
                    - amount_outstanding
                    - general_ledger
  /entities/{entityId}/outstanding-items/payable:
    get:
      summary: Get a list of all outstanding payables
      tags:
        - Outstanding Items
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    transaction_code:
                      type: string
                      nullable: true
                    due_date:
                      format: date
                      type: string
                      nullable: true
                    relation_name:
                      type: string
                      nullable: true
                    amount:
                      anyOf:
                        - type: string
                        - type: number
                    amount_outstanding:
                      anyOf:
                        - type: string
                        - type: number
                        - type: "null"
                    general_ledger:
                      type: object
                      properties:
                        transaction_code:
                          type: string
                          nullable: true
                      nullable: true
                  required:
                    - id
                    - transaction_code
                    - due_date
                    - relation_name
                    - amount
                    - amount_outstanding
                    - general_ledger
  /entities/{entityId}/integrations/fixed-assets/{integrationProviderId}/{integrationId}/categories:
    get:
      summary: Get a list of all fixed assets categories by integration ID.
      tags:
        - Fixed Assets
      parameters:
        - schema:
            type: boolean
          in: query
          name: hasAssetsOnly
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: path
          name: integrationProviderId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    capitalisationAccountId:
                      format: uuid
                      type: string
                    depreciationPlAccountId:
                      format: uuid
                      type: string
                    depreciationBsAccountId:
                      format: uuid
                      type: string
                    method:
                      anyOf:
                        - type: "null"
                        - anyOf:
                            - type: string
                              enum:
                                - linear
                            - type: string
                              enum:
                                - degressive
                    maxPercentage:
                      minimum: 0
                      maximum: 10000
                      type: number
                      nullable: true
                    percentageLinear:
                      minimum: 0
                      maximum: 10000
                      type: number
                      nullable: true
                    percentageDegressive:
                      minimum: 0
                      maximum: 10000
                      type: number
                      nullable: true
                    interval:
                      anyOf:
                        - type: "null"
                        - anyOf:
                            - type: string
                              enum:
                                - day
                            - type: string
                              enum:
                                - week
                            - type: string
                              enum:
                                - month
                            - type: string
                              enum:
                                - quarter
                            - type: string
                              enum:
                                - year
                    integrationId:
                      format: uuid
                      type: string
                    hasAssets:
                      type: boolean
                  required:
                    - id
                    - name
                    - capitalisationAccountId
                    - depreciationPlAccountId
                    - depreciationBsAccountId
                    - method
                    - maxPercentage
                    - percentageLinear
                    - percentageDegressive
                    - interval
                    - integrationId
                    - hasAssets
  /entities/{entityId}/integrations/fixed-assets/{integrationProviderId}/{integrationId}/categories/{categoryId}/items:
    get:
      summary: Get a list of all fixed assets items by integration and category ID.
      tags:
        - Fixed Assets
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: false
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: path
          name: integrationProviderId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: categoryId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    categoryId:
                      format: uuid
                      type: string
                    name:
                      type: string
                    method:
                      anyOf:
                        - type: string
                          enum:
                            - linear
                        - type: string
                          enum:
                            - degressive
                    maxPercentage:
                      minimum: 0
                      maximum: 10000
                      type: number
                      nullable: true
                    percentageLinear:
                      minimum: 0
                      maximum: 10000
                      type: number
                    percentageDegressive:
                      minimum: 0
                      maximum: 10000
                      type: number
                      nullable: true
                    interval:
                      anyOf:
                        - type: string
                          enum:
                            - day
                        - type: string
                          enum:
                            - week
                        - type: string
                          enum:
                            - month
                        - type: string
                          enum:
                            - quarter
                        - type: string
                          enum:
                            - year
                    startDate:
                      format: date
                      type: string
                    amount:
                      type: number
                    residualValue:
                      type: number
                    integrationId:
                      format: uuid
                      type: string
                  required:
                    - id
                    - categoryId
                    - name
                    - method
                    - maxPercentage
                    - percentageLinear
                    - percentageDegressive
                    - interval
                    - startDate
                    - amount
                    - residualValue
                    - integrationId
  /entities/{entityId}/budget-versions/fixed-assets/{budgetVersionId}/categories:
    get:
      summary: Get a list of all fixed assets categories by integration ID.
      tags:
        - Fixed Assets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        name:
                          type: string
                        method:
                          anyOf:
                            - type: "null"
                            - anyOf:
                                - type: string
                                  enum:
                                    - linear
                                - type: string
                                  enum:
                                    - degressive
                        maxPercentage:
                          minimum: 0
                          maximum: 10000
                          type: number
                          nullable: true
                        percentageLinear:
                          minimum: 0
                          maximum: 10000
                          type: number
                          nullable: true
                        percentageDegressive:
                          minimum: 0
                          maximum: 10000
                          type: number
                          nullable: true
                        interval:
                          anyOf:
                            - type: "null"
                            - anyOf:
                                - type: string
                                  enum:
                                    - day
                                - type: string
                                  enum:
                                    - week
                                - type: string
                                  enum:
                                    - month
                                - type: string
                                  enum:
                                    - quarter
                                - type: string
                                  enum:
                                    - year
                      required:
                        - id
                        - name
                        - method
                        - maxPercentage
                        - percentageLinear
                        - percentageDegressive
                        - interval
                    - type: object
                      properties:
                        fixedAssetsIntegrationCategoryId:
                          format: uuid
                          type: string
                          nullable: true
                        capitalisationMappingId:
                          format: uuid
                          type: string
                        depreciationPlMappingId:
                          format: uuid
                          type: string
                        depreciationBsMappingId:
                          format: uuid
                          type: string
                        budgetVersionId:
                          format: uuid
                          type: string
                      required:
                        - fixedAssetsIntegrationCategoryId
                        - capitalisationMappingId
                        - depreciationPlMappingId
                        - depreciationBsMappingId
                        - budgetVersionId
  /entities/{entityId}/budget-versions/fixed-assets/{budgetVersionId}/categories/{categoryId}/items:
    get:
      summary: Get a list of all fixed assets items by budget version and category ID.
      tags:
        - Fixed Assets
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: false
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: categoryId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        categoryId:
                          format: uuid
                          type: string
                        name:
                          type: string
                        method:
                          anyOf:
                            - type: string
                              enum:
                                - linear
                            - type: string
                              enum:
                                - degressive
                        maxPercentage:
                          minimum: 0
                          maximum: 10000
                          type: number
                          nullable: true
                        percentageLinear:
                          minimum: 0
                          maximum: 10000
                          type: number
                        percentageDegressive:
                          minimum: 0
                          maximum: 10000
                          type: number
                          nullable: true
                        interval:
                          anyOf:
                            - type: string
                              enum:
                                - day
                            - type: string
                              enum:
                                - week
                            - type: string
                              enum:
                                - month
                            - type: string
                              enum:
                                - quarter
                            - type: string
                              enum:
                                - year
                        startDate:
                          format: date
                          type: string
                        amount:
                          type: number
                        residualValue:
                          type: number
                      required:
                        - id
                        - categoryId
                        - name
                        - method
                        - maxPercentage
                        - percentageLinear
                        - percentageDegressive
                        - interval
                        - startDate
                        - amount
                        - residualValue
                    - type: object
                      properties:
                        fixedAssetsIntegrationItemId:
                          format: uuid
                          type: string
                          nullable: true
                        hasConnectedLoan:
                          type: boolean
                        budgetVersionId:
                          format: uuid
                          type: string
                      required:
                        - fixedAssetsIntegrationItemId
                        - hasConnectedLoan
                        - budgetVersionId
  /entities/{entityId}/budget-versions/fixed-assets/{budgetVersionId}/items:
    get:
      summary: Get a list of all fixed assets items by budget version.
      tags:
        - Fixed Assets
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: false
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            categoryId:
                              format: uuid
                              type: string
                            name:
                              type: string
                            method:
                              anyOf:
                                - type: string
                                  enum:
                                    - linear
                                - type: string
                                  enum:
                                    - degressive
                            maxPercentage:
                              minimum: 0
                              maximum: 10000
                              type: number
                              nullable: true
                            percentageLinear:
                              minimum: 0
                              maximum: 10000
                              type: number
                            percentageDegressive:
                              minimum: 0
                              maximum: 10000
                              type: number
                              nullable: true
                            interval:
                              anyOf:
                                - type: string
                                  enum:
                                    - day
                                - type: string
                                  enum:
                                    - week
                                - type: string
                                  enum:
                                    - month
                                - type: string
                                  enum:
                                    - quarter
                                - type: string
                                  enum:
                                    - year
                            startDate:
                              format: date
                              type: string
                            amount:
                              type: number
                            residualValue:
                              type: number
                          required:
                            - id
                            - categoryId
                            - name
                            - method
                            - maxPercentage
                            - percentageLinear
                            - percentageDegressive
                            - interval
                            - startDate
                            - amount
                            - residualValue
                        - type: object
                          properties:
                            fixedAssetsIntegrationItemId:
                              format: uuid
                              type: string
                              nullable: true
                            hasConnectedLoan:
                              type: boolean
                            budgetVersionId:
                              format: uuid
                              type: string
                          required:
                            - fixedAssetsIntegrationItemId
                            - hasConnectedLoan
                            - budgetVersionId
                    - type: object
                      properties:
                        categoryName:
                          type: string
                      required:
                        - categoryName
  /entities/{entityId}/budget-versions/loans/{budgetVersionId}/loans:
    get:
      summary: Get a list of all loans by budget version.
      tags:
        - Loans
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    loanType:
                      anyOf:
                        - type: string
                          enum:
                            - term_loan
                        - type: string
                          enum:
                            - straight_loan
                        - type: string
                          enum:
                            - bullet_loan
                    interestRate:
                      type: number
                    duration:
                      type: number
                    repaymentDetails:
                      type: object
                      properties:
                        startDate:
                          format: date
                          type: string
                        startDateType:
                          anyOf:
                            - type: string
                              enum:
                                - fixed
                            - type: string
                              enum:
                                - drawdownCompleted
                        periodicity:
                          anyOf:
                            - type: string
                              enum:
                                - day
                            - type: string
                              enum:
                                - week
                            - type: string
                              enum:
                                - month
                            - type: string
                              enum:
                                - quarter
                            - type: string
                              enum:
                                - year
                        payBackLoanedAmount:
                          type: boolean
                        payInterestDuringRepayment:
                          type: boolean
                      required:
                        - startDate
                        - startDateType
                        - periodicity
                        - payBackLoanedAmount
                        - payInterestDuringRepayment
                    drawdownDetails:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - single
                            startDate:
                              format: date
                              type: string
                            amount:
                              type: number
                          required:
                            - type
                            - startDate
                            - amount
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - multiple
                            drawdowns:
                              type: array
                              items:
                                type: object
                                properties:
                                  date:
                                    format: date
                                    type: string
                                  amount:
                                    type: number
                                required:
                                  - date
                                  - amount
                            reservationInterestRate:
                              type: number
                          required:
                            - type
                            - drawdowns
                            - reservationInterestRate
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - asset
                            startDate:
                              format: date
                              type: string
                            percentage:
                              type: number
                            totalAssetValue:
                              type: number
                          required:
                            - type
                            - startDate
                            - percentage
                            - totalAssetValue
                    gracePeriods:
                      type: array
                      items:
                        type: object
                        properties:
                          startDate:
                            format: date
                            type: string
                          endDate:
                            format: date
                            type: string
                          interestRate:
                            type: number
                          paymentOfInterest:
                            anyOf:
                              - type: string
                                enum:
                                  - duringGracePeriod
                              - type: string
                                enum:
                                  - afterGracePeriod
                              - type: string
                                enum:
                                  - partOfDrawdown
                          partOfRepaymentPeriod:
                            type: boolean
                        required:
                          - startDate
                          - endDate
                          - interestRate
                          - paymentOfInterest
                          - partOfRepaymentPeriod
                      nullable: true
                    fixedAssetsItemId:
                      format: uuid
                      type: string
                      nullable: true
                    principalMappingId:
                      format: uuid
                      type: string
                    interestMappingId:
                      format: uuid
                      type: string
                    reservationInterestMappingId:
                      format: uuid
                      type: string
                      nullable: true
                    budgetVersionId:
                      format: uuid
                      type: string
                    entityId:
                      format: uuid
                      type: string
                  required:
                    - id
                    - name
                    - loanType
                    - interestRate
                    - duration
                    - repaymentDetails
                    - drawdownDetails
                    - gracePeriods
                    - fixedAssetsItemId
                    - principalMappingId
                    - interestMappingId
                    - reservationInterestMappingId
                    - budgetVersionId
                    - entityId
  /entities/{entityId}/products:
    get:
      summary: Get a list of products for a specific business entity
      tags:
        - Products
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - bookkeeping
              - type: string
                enum:
                  - crm
              - type: string
                enum:
                  - subscription
              - type: string
                enum:
                  - inventory
              - type: string
                enum:
                  - project
              - type: string
                enum:
                  - historic-outstanding-item
              - type: string
                enum:
                  - other
              - type: string
                enum:
                  - personnel-costs
              - type: string
                enum:
                  - annual-accounts-filing
              - type: string
                enum:
                  - fixed-assets
          in: query
          name: integrationType
          required: false
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - crm
              - type: string
                enum:
                  - personnel_costs
              - type: string
                enum:
                  - recurring_revenue
              - type: string
                enum:
                  - vat
              - type: string
                enum:
                  - project_revenue
              - type: string
                enum:
                  - pxq
              - type: string
                enum:
                  - cogs
              - type: string
                enum:
                  - inventory
              - type: string
                enum:
                  - outstanding_items
              - type: string
                enum:
                  - fixed-assets
              - type: string
                enum:
                  - loans
          in: query
          name: budgetType
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    vendorId:
                      type: string
                      nullable: true
                    name:
                      type: string
                    description:
                      type: string
                      nullable: true
                    unitCost:
                      type: number
                      nullable: true
                    price:
                      type: number
                      nullable: true
                    recurring:
                      type: boolean
                    archived:
                      type: boolean
                    createdAt:
                      format: date-time
                      type: string
                    updatedAt:
                      format: date-time
                      type: string
                    entityId:
                      format: uuid
                      type: string
                    integrationId:
                      format: uuid
                      type: string
                      nullable: true
                    budgetAccountId:
                      type: string
                      nullable: true
                    recurringRevenueProducts:
                      type: array
                      items:
                        type: object
                        allOf:
                          - type: object
                            properties:
                              budgetVersionId:
                                format: uuid
                                type: string
                              productId:
                                format: uuid
                                type: string
                              newCustomers:
                                type: number
                                nullable: true
                              monthlyGrowth:
                                type: number
                                nullable: true
                              churn:
                                type: number
                              startDate:
                                format: date
                                type: string
                                nullable: true
                              endDate:
                                format: date
                                type: string
                                nullable: true
                              periods:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    period:
                                      type: string
                                    interval:
                                      type: number
                                    distribution:
                                      type: number
                                    avgRevenue:
                                      type: number
                                  required:
                                    - period
                                    - interval
                                    - distribution
                                    - avgRevenue
                              type:
                                anyOf:
                                  - type: string
                                    enum:
                                      - management
                                  - type: string
                                    enum:
                                      - model
                            required:
                              - budgetVersionId
                              - productId
                              - newCustomers
                              - monthlyGrowth
                              - churn
                              - startDate
                              - endDate
                              - periods
                              - type
                          - type: object
                            properties:
                              recurringRevenueBudgetAccountId:
                                type: string
                              revenueRecognitionBudgetAccountId:
                                type: string
                              recurringRevenueAccountAnalyticalAxisId:
                                format: uuid
                                type: string
                                nullable: true
                              revenueRecognitionAccountAnalyticalAxisId:
                                format: uuid
                                type: string
                                nullable: true
                            required:
                              - recurringRevenueBudgetAccountId
                              - revenueRecognitionBudgetAccountId
                    productRevenues:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          budgetVersionId:
                            format: uuid
                            type: string
                          productId:
                            format: uuid
                            type: string
                          entityId:
                            format: uuid
                            type: string
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                          productsRevenueChannels:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                                productRevenueId:
                                  format: uuid
                                  type: string
                                revenueChannel:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    budgetVersionId:
                                      format: uuid
                                      type: string
                                    entityId:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                                    - name
                                    - budgetVersionId
                                    - entityId
                                  nullable: true
                                productsRevenueItems:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      productRevenueId:
                                        format: uuid
                                        type: string
                                      productsRevenueChannelId:
                                        format: uuid
                                        type: string
                                      datePeriod:
                                        format: date
                                        type: string
                                      price:
                                        type: number
                                      quantity:
                                        type: number
                                      entityId:
                                        format: uuid
                                        type: string
                                      createdAt:
                                        type: string
                                      updatedAt:
                                        type: string
                                    required:
                                      - productRevenueId
                                      - productsRevenueChannelId
                                      - datePeriod
                                      - price
                                      - quantity
                                      - entityId
                                      - createdAt
                                      - updatedAt
                                budgetAccountId:
                                  type: string
                                entityId:
                                  format: uuid
                                  type: string
                                createdAt:
                                  type: string
                                updatedAt:
                                  type: string
                                accountAnalyticalAxisId:
                                  format: uuid
                                  type: string
                                  nullable: true
                              required:
                                - id
                                - productRevenueId
                                - revenueChannel
                                - productsRevenueItems
                                - budgetAccountId
                                - entityId
                                - createdAt
                                - updatedAt
                        required:
                          - id
                          - budgetVersionId
                          - productId
                          - entityId
                          - createdAt
                          - updatedAt
                          - productsRevenueChannels
                  required:
                    - id
                    - vendorId
                    - name
                    - description
                    - unitCost
                    - price
                    - recurring
                    - archived
                    - createdAt
                    - updatedAt
                    - entityId
                    - integrationId
                    - budgetAccountId
    patch:
      summary: Associate budget accounts with products
      tags:
        - Products
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                products:
                  minItems: 1
                  type: array
                  items:
                    additionalProperties: false
                    type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      budgetAccountId:
                        type: string
                        nullable: true
                    required:
                      - id
                      - budgetAccountId
              required:
                - products
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions/recurring-revenue/{budgetVersionId}/products:
    get:
      summary: Get the products for a specific budget version
      tags:
        - Budgets
        - Products
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - management
              - type: string
                enum:
                  - model
          in: query
          name: type
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    vendorId:
                      type: string
                      nullable: true
                    name:
                      type: string
                    description:
                      type: string
                      nullable: true
                    unitCost:
                      type: number
                      nullable: true
                    price:
                      type: number
                      nullable: true
                    recurring:
                      type: boolean
                    archived:
                      type: boolean
                    createdAt:
                      format: date-time
                      type: string
                    updatedAt:
                      format: date-time
                      type: string
                    entityId:
                      format: uuid
                      type: string
                    integrationId:
                      format: uuid
                      type: string
                      nullable: true
                    budgetAccountId:
                      type: string
                      nullable: true
                    recurringRevenueProducts:
                      type: array
                      items:
                        type: object
                        allOf:
                          - type: object
                            properties:
                              budgetVersionId:
                                format: uuid
                                type: string
                              productId:
                                format: uuid
                                type: string
                              newCustomers:
                                type: number
                                nullable: true
                              monthlyGrowth:
                                type: number
                                nullable: true
                              churn:
                                type: number
                              startDate:
                                format: date
                                type: string
                                nullable: true
                              endDate:
                                format: date
                                type: string
                                nullable: true
                              periods:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    period:
                                      type: string
                                    interval:
                                      type: number
                                    distribution:
                                      type: number
                                    avgRevenue:
                                      type: number
                                  required:
                                    - period
                                    - interval
                                    - distribution
                                    - avgRevenue
                              type:
                                anyOf:
                                  - type: string
                                    enum:
                                      - management
                                  - type: string
                                    enum:
                                      - model
                            required:
                              - budgetVersionId
                              - productId
                              - newCustomers
                              - monthlyGrowth
                              - churn
                              - startDate
                              - endDate
                              - periods
                              - type
                          - type: object
                            properties:
                              recurringRevenueBudgetAccountId:
                                type: string
                              revenueRecognitionBudgetAccountId:
                                type: string
                              recurringRevenueAccountAnalyticalAxisId:
                                format: uuid
                                type: string
                                nullable: true
                              revenueRecognitionAccountAnalyticalAxisId:
                                format: uuid
                                type: string
                                nullable: true
                            required:
                              - recurringRevenueBudgetAccountId
                              - revenueRecognitionBudgetAccountId
                    productRevenues:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          budgetVersionId:
                            format: uuid
                            type: string
                          productId:
                            format: uuid
                            type: string
                          entityId:
                            format: uuid
                            type: string
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                          productsRevenueChannels:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                                productRevenueId:
                                  format: uuid
                                  type: string
                                revenueChannel:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    budgetVersionId:
                                      format: uuid
                                      type: string
                                    entityId:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                                    - name
                                    - budgetVersionId
                                    - entityId
                                  nullable: true
                                productsRevenueItems:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      productRevenueId:
                                        format: uuid
                                        type: string
                                      productsRevenueChannelId:
                                        format: uuid
                                        type: string
                                      datePeriod:
                                        format: date
                                        type: string
                                      price:
                                        type: number
                                      quantity:
                                        type: number
                                      entityId:
                                        format: uuid
                                        type: string
                                      createdAt:
                                        type: string
                                      updatedAt:
                                        type: string
                                    required:
                                      - productRevenueId
                                      - productsRevenueChannelId
                                      - datePeriod
                                      - price
                                      - quantity
                                      - entityId
                                      - createdAt
                                      - updatedAt
                                budgetAccountId:
                                  type: string
                                entityId:
                                  format: uuid
                                  type: string
                                createdAt:
                                  type: string
                                updatedAt:
                                  type: string
                                accountAnalyticalAxisId:
                                  format: uuid
                                  type: string
                                  nullable: true
                              required:
                                - id
                                - productRevenueId
                                - revenueChannel
                                - productsRevenueItems
                                - budgetAccountId
                                - entityId
                                - createdAt
                                - updatedAt
                        required:
                          - id
                          - budgetVersionId
                          - productId
                          - entityId
                          - createdAt
                          - updatedAt
                          - productsRevenueChannels
                  required:
                    - id
                    - vendorId
                    - name
                    - description
                    - unitCost
                    - price
                    - recurring
                    - archived
                    - createdAt
                    - updatedAt
                    - entityId
                    - integrationId
                    - budgetAccountId
  /entities/{entityId}/budget-versions/pxq/{budgetVersionId}/products:
    get:
      summary: Get the products for a specific budget version
      tags:
        - Budgets
        - Products
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    vendorId:
                      type: string
                      nullable: true
                    name:
                      type: string
                    description:
                      type: string
                      nullable: true
                    unitCost:
                      type: number
                      nullable: true
                    price:
                      type: number
                      nullable: true
                    recurring:
                      type: boolean
                    archived:
                      type: boolean
                    createdAt:
                      format: date-time
                      type: string
                    updatedAt:
                      format: date-time
                      type: string
                    entityId:
                      format: uuid
                      type: string
                    integrationId:
                      format: uuid
                      type: string
                      nullable: true
                    budgetAccountId:
                      type: string
                      nullable: true
                    recurringRevenueProducts:
                      type: array
                      items:
                        type: object
                        allOf:
                          - type: object
                            properties:
                              budgetVersionId:
                                format: uuid
                                type: string
                              productId:
                                format: uuid
                                type: string
                              newCustomers:
                                type: number
                                nullable: true
                              monthlyGrowth:
                                type: number
                                nullable: true
                              churn:
                                type: number
                              startDate:
                                format: date
                                type: string
                                nullable: true
                              endDate:
                                format: date
                                type: string
                                nullable: true
                              periods:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    period:
                                      type: string
                                    interval:
                                      type: number
                                    distribution:
                                      type: number
                                    avgRevenue:
                                      type: number
                                  required:
                                    - period
                                    - interval
                                    - distribution
                                    - avgRevenue
                              type:
                                anyOf:
                                  - type: string
                                    enum:
                                      - management
                                  - type: string
                                    enum:
                                      - model
                            required:
                              - budgetVersionId
                              - productId
                              - newCustomers
                              - monthlyGrowth
                              - churn
                              - startDate
                              - endDate
                              - periods
                              - type
                          - type: object
                            properties:
                              recurringRevenueBudgetAccountId:
                                type: string
                              revenueRecognitionBudgetAccountId:
                                type: string
                              recurringRevenueAccountAnalyticalAxisId:
                                format: uuid
                                type: string
                                nullable: true
                              revenueRecognitionAccountAnalyticalAxisId:
                                format: uuid
                                type: string
                                nullable: true
                            required:
                              - recurringRevenueBudgetAccountId
                              - revenueRecognitionBudgetAccountId
                    productRevenues:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          budgetVersionId:
                            format: uuid
                            type: string
                          productId:
                            format: uuid
                            type: string
                          entityId:
                            format: uuid
                            type: string
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                          productsRevenueChannels:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                                productRevenueId:
                                  format: uuid
                                  type: string
                                revenueChannel:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    budgetVersionId:
                                      format: uuid
                                      type: string
                                    entityId:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                                    - name
                                    - budgetVersionId
                                    - entityId
                                  nullable: true
                                productsRevenueItems:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      productRevenueId:
                                        format: uuid
                                        type: string
                                      productsRevenueChannelId:
                                        format: uuid
                                        type: string
                                      datePeriod:
                                        format: date
                                        type: string
                                      price:
                                        type: number
                                      quantity:
                                        type: number
                                      entityId:
                                        format: uuid
                                        type: string
                                      createdAt:
                                        type: string
                                      updatedAt:
                                        type: string
                                    required:
                                      - productRevenueId
                                      - productsRevenueChannelId
                                      - datePeriod
                                      - price
                                      - quantity
                                      - entityId
                                      - createdAt
                                      - updatedAt
                                budgetAccountId:
                                  type: string
                                entityId:
                                  format: uuid
                                  type: string
                                createdAt:
                                  type: string
                                updatedAt:
                                  type: string
                                accountAnalyticalAxisId:
                                  format: uuid
                                  type: string
                                  nullable: true
                              required:
                                - id
                                - productRevenueId
                                - revenueChannel
                                - productsRevenueItems
                                - budgetAccountId
                                - entityId
                                - createdAt
                                - updatedAt
                        required:
                          - id
                          - budgetVersionId
                          - productId
                          - entityId
                          - createdAt
                          - updatedAt
                          - productsRevenueChannels
                  required:
                    - id
                    - vendorId
                    - name
                    - description
                    - unitCost
                    - price
                    - recurring
                    - archived
                    - createdAt
                    - updatedAt
                    - entityId
                    - integrationId
                    - budgetAccountId
  /entities/{entityId}/budget-versions/cogs/{budgetVersionId}/products:
    get:
      summary: Get the products for a specific budget version
      tags:
        - Budgets
        - Products
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        productRevenueId:
                          format: uuid
                          type: string
                        productName:
                          type: string
                        productValues:
                          type: array
                          items:
                            type: object
                            properties:
                              datePeriod:
                                format: date
                                type: string
                              avgPrice:
                                type: number
                              quantity:
                                type: number
                            required:
                              - datePeriod
                              - avgPrice
                              - quantity
                      required:
                        - productRevenueId
                        - productName
                        - productValues
                    - type: object
                      properties:
                        categories:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                required:
                                  - id
                              - type: object
                                properties:
                                  name:
                                    type: string
                                  dateItems:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        datePeriod:
                                          format: date
                                          type: string
                                        value:
                                          type: number
                                      required:
                                        - datePeriod
                                        - value
                                  accountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                required:
                                  - name
                                  - dateItems
                                  - accountAnalyticalAxisId
                      required:
                        - categories
  /entities/{entityId}/budget-versions/inventory/{budgetVersionId}/products:
    get:
      summary: Get the products for a specific budget version
      tags:
        - Budgets
        - Products
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - additionalProperties: false
                      type: object
                      properties:
                        cogsProductId:
                          format: uuid
                          type: string
                        productName:
                          type: string
                        productValues:
                          type: array
                          items:
                            type: object
                            properties:
                              datePeriod:
                                format: date
                                type: string
                              avgPrice:
                                type: number
                              quantity:
                                type: number
                            required:
                              - datePeriod
                              - avgPrice
                              - quantity
                        category:
                          type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                              required:
                                - id
                            - type: object
                              properties:
                                name:
                                  type: string
                                dateItems:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      datePeriod:
                                        format: date
                                        type: string
                                      value:
                                        type: number
                                    required:
                                      - datePeriod
                                      - value
                                accountAnalyticalAxisId:
                                  format: uuid
                                  type: string
                              required:
                                - name
                                - dateItems
                                - accountAnalyticalAxisId
                        productInventoryTransactions:
                          type: array
                          items:
                            additionalProperties: false
                            type: object
                            properties:
                              datePeriod:
                                format: date
                                type: string
                              purchaseAmount:
                                type: number
                            required:
                              - datePeriod
                              - purchaseAmount
                        startBalance:
                          type: number
                        safetyStock:
                          type: number
                        prepayments:
                          type: array
                          items:
                            additionalProperties: false
                            type: object
                            properties:
                              monthsBefore:
                                type: number
                              percentage:
                                maximum: 10000
                                type: number
                            required:
                              - monthsBefore
                              - percentage
                        inventoryAccountAnalyticalAxisId:
                          format: uuid
                          type: string
                        prepaymentAccountAnalyticalAxisId:
                          format: uuid
                          type: string
                      required:
                        - cogsProductId
                        - productName
                        - productValues
                        - category
                        - productInventoryTransactions
                        - startBalance
                        - safetyStock
                        - prepayments
                        - inventoryAccountAnalyticalAxisId
                        - prepaymentAccountAnalyticalAxisId
                    - type: object
                      properties:
                        productRevenueId:
                          format: uuid
                          type: string
                        allCategories:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                required:
                                  - id
                              - type: object
                                properties:
                                  name:
                                    type: string
                                  dateItems:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        datePeriod:
                                          format: date
                                          type: string
                                        value:
                                          type: number
                                      required:
                                        - datePeriod
                                        - value
                                  accountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                required:
                                  - name
                                  - dateItems
                                  - accountAnalyticalAxisId
                      required:
                        - productRevenueId
                        - allCategories
  /entities/{entityId}/budget-versions/recurring-revenue/dashboard/graphs:
    get:
      summary: Get the recurring revenue dashboard graphs
      tags:
        - Budgets
        - Dashboard
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: budgetVersionId
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - product
              - type: string
                enum:
                  - productGroup
          in: query
          name: groupBy
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  recurringRevenue:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          format: date
                          type: string
                        values:
                          type: object
                          additionalProperties:
                            type: object
                            properties:
                              productName:
                                type: string
                              value:
                                type: number
                            required:
                              - productName
                              - value
                      required:
                        - date
                        - values
                  cashFlow:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          format: date
                          type: string
                        values:
                          type: object
                          additionalProperties:
                            type: object
                            properties:
                              productName:
                                type: string
                              value:
                                type: number
                            required:
                              - productName
                              - value
                      required:
                        - date
                        - values
                  netMrr:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            date:
                              format: date
                              type: string
                          required:
                            - date
                        - type: object
                          properties:
                            downgradeRevenue:
                              type: number
                            churnRevenue:
                              type: number
                            newRevenue:
                              type: number
                            upsellRevenue:
                              type: number
                            totalRevenue:
                              type: number
                          required:
                            - downgradeRevenue
                            - churnRevenue
                            - newRevenue
                            - upsellRevenue
                            - totalRevenue
                  metrics:
                    type: object
                    properties:
                      cumulativeData:
                        type: object
                        properties:
                          customers:
                            type: number
                          revenue:
                            type: number
                        required:
                          - customers
                          - revenue
                      monthlyData:
                        type: array
                        items:
                          type: object
                          allOf:
                            - type: object
                              properties:
                                date:
                                  format: date
                                  type: string
                              required:
                                - date
                            - type: object
                              properties:
                                newCustomers:
                                  type: number
                                churnedCustomers:
                                  type: number
                              required:
                                - newCustomers
                                - churnedCustomers
                    required:
                      - cumulativeData
                      - monthlyData
                required:
                  - recurringRevenue
                  - cashFlow
                  - netMrr
                  - metrics
  /entities/{entityId}/budget-versions/recurring-revenue/{budgetVersionId}/dashboard/transactions:
    get:
      summary: Get the recurring revenue dashboard transactions
      tags:
        - Budgets
        - Dashboard
      parameters:
        - schema:
            type: string
          in: query
          name: productId
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: date
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - product
              - type: string
                enum:
                  - productGroup
          in: query
          name: groupBy
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - actuals
              - type: string
                enum:
                  - forecast
          in: query
          name: periodType
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    subscriptionNumber:
                      type: string
                    relationName:
                      type: string
                    subscriptionItemStartDate:
                      type: string
                    subscriptionItemEndDate:
                      type: string
                    interval:
                      type: string
                    intervalCount:
                      type: number
                    recurringRevenueAmount:
                      type: number
                    cashFlowAmount:
                      type: number
                    recurringRevenueBudgetType:
                      anyOf:
                        - type: string
                          enum:
                            - model
                        - type: string
                          enum:
                            - management
                  required:
                    - interval
                    - intervalCount
                    - recurringRevenueAmount
                    - cashFlowAmount
                    - recurringRevenueBudgetType
  /entities/{entityId}/budget-versions/recurring-revenue/{budgetVersionId}/dashboard/mrr-transactions:
    get:
      summary: Get the recurring revenue dashboard Net MRR transactions
      tags:
        - Budgets
        - Dashboard
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: date
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - actuals
              - type: string
                enum:
                  - forecast
          in: query
          name: periodType
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        subscriptionNumber:
                          type: string
                        relationName:
                          type: string
                        subscriptionItemStartDate:
                          type: string
                        subscriptionItemEndDate:
                          type: string
                        interval:
                          type: string
                        intervalCount:
                          type: number
                        recurringRevenueAmount:
                          type: number
                        recurringRevenueBudgetType:
                          anyOf:
                            - type: string
                              enum:
                                - model
                            - type: string
                              enum:
                                - management
                      required:
                        - interval
                        - intervalCount
                        - recurringRevenueAmount
                        - recurringRevenueBudgetType
                    - type: object
                      properties:
                        amountType:
                          anyOf:
                            - type: string
                              enum:
                                - downgrade
                            - type: string
                              enum:
                                - churn
                            - type: string
                              enum:
                                - new
                            - type: string
                              enum:
                                - upsell
                      required:
                        - amountType
  /entities/{entityId}/budget-versions/pxq/dashboard:
    get:
      summary: Get the PxQ v COGS dashboard information
      tags:
        - Budgets
        - Dashboard
        - Revenue
      parameters:
        - schema:
            anyOf:
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  additionalProperties: false
                  type: object
                  properties:
                    datePeriod:
                      format: date
                      type: string
                    type:
                      anyOf:
                        - type: string
                          enum:
                            - budget
                        - type: string
                          enum:
                            - actuals
                    budgetType:
                      anyOf:
                        - type: string
                          enum:
                            - pxq
                        - type: string
                          enum:
                            - cogs
                    productId:
                      format: uuid
                      type: string
                    productName:
                      type: string
                    channelId:
                      type: string
                      nullable: true
                    channelName:
                      type: string
                      nullable: true
                    categoryName:
                      type: string
                      nullable: true
                    linkedActualsCategoryName:
                      type: string
                      nullable: true
                    price:
                      type: number
                    quantity:
                      type: number
                      nullable: true
                    revenue:
                      type: number
                      nullable: true
                    cost:
                      type: number
                      nullable: true
                  required:
                    - datePeriod
                    - type
                    - budgetType
                    - productId
                    - productName
                    - channelId
                    - channelName
                    - categoryName
                    - linkedActualsCategoryName
                    - price
                    - quantity
                    - revenue
                    - cost
  /entities/{entityId}/budget-versions/inventory/dashboard:
    get:
      summary: Get the inventory dashboard information
      tags:
        - Budgets
        - Dashboard
        - Inventory
      parameters:
        - schema:
            anyOf:
              - minItems: 1
                type: array
                items:
                  type: string
              - type: string
          in: query
          name: budgetVersionIds
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  additionalProperties: false
                  type: object
                  properties:
                    productId:
                      format: uuid
                      type: string
                    productName:
                      type: string
                    inventoryId:
                      format: uuid
                      type: string
                    datePeriod:
                      format: date
                      type: string
                    inventorySafetyStock:
                      type: number
                    inventoryStartBalance:
                      type: number
                    inventoryPurchased:
                      type: number
                    quantitySold:
                      type: number
                    inventoryEndBalance:
                      type: number
                    costGoods:
                      type: number
                    avgCostGoods:
                      type: number
                    revenue:
                      type: number
                  required:
                    - productId
                    - productName
                    - inventoryId
                    - datePeriod
                    - inventorySafetyStock
                    - inventoryStartBalance
                    - inventoryPurchased
                    - quantitySold
                    - inventoryEndBalance
                    - costGoods
                    - avgCostGoods
                    - revenue
  /entities/{entityId}/historic-outstanding-items:
    get:
      summary: Get historic outstanding items by reference date
      tags:
        - Outstanding Items
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: referenceDate
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - payable
              - type: string
                enum:
                  - receivable
          in: query
          name: itemType
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  additionalProperties: false
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    relationName:
                      type: string
                    dueDate:
                      format: date
                      type: string
                    amount:
                      type: number
                    itemType:
                      anyOf:
                        - type: string
                          enum:
                            - payable
                        - type: string
                          enum:
                            - receivable
                  required:
                    - id
                    - name
                    - relationName
                    - dueDate
                    - amount
                    - itemType
  /entities/{entityId}/reports/PL/actuals:
    get:
      summary: Get Profit & Loss Actuals report
      tags: &a1
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            type: string
            enum:
              - analyticalAxis
          in: query
          name: aggregationType
          required: true
        - schema:
            format: uuid
            type: string
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                      columnIds:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/PL/actuals:
    get:
      summary: Get Profit & Loss Actuals report
      tags: *a1
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            type: string
            enum:
              - analyticalAxis
          in: query
          name: aggregationType
          required: true
        - schema:
            format: uuid
            type: string
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                      columnIds:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports/PL/forecast:
    get:
      summary: Get Profit & Loss Forecast report
      tags: &a2
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/PL/forecast:
    get:
      summary: Get Profit & Loss Forecast report
      tags: *a2
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports/PL/delta:
    get:
      summary: Get Profit & Loss Delta report
      tags: &a3
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
              - type: string
                enum:
                  - scenario
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  additionalProperties:
                                    type: object
                                    properties:
                                      actual:
                                        type: string
                                      budget:
                                        type: string
                                      delta:
                                        type: string
                                    required:
                                      - actual
                                      - budget
                                      - delta
                              required:
                                - columns
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  properties:
                                    YTD:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            actual:
                                              type: string
                                          required:
                                            - actual
                                    YTG:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                    TOTAL:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                  required:
                                    - YTD
                                    - YTG
                                    - TOTAL
                              required:
                                - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/PL/delta:
    get:
      summary: Get Profit & Loss Delta report
      tags: *a3
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
              - type: string
                enum:
                  - scenario
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  additionalProperties:
                                    type: object
                                    properties:
                                      actual:
                                        type: string
                                      budget:
                                        type: string
                                      delta:
                                        type: string
                                    required:
                                      - actual
                                      - budget
                                      - delta
                              required:
                                - columns
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  properties:
                                    YTD:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            actual:
                                              type: string
                                          required:
                                            - actual
                                    YTG:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                    TOTAL:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                  required:
                                    - YTD
                                    - YTG
                                    - TOTAL
                              required:
                                - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports/BS/actuals:
    get:
      summary: Get Balance Sheet Actuals report
      tags: &a4
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                                nullable: true
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/BS/actuals:
    get:
      summary: Get Balance Sheet Actuals report
      tags: *a4
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                                nullable: true
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports/BS/forecast:
    get:
      summary: Get Balance Sheet Forecast report
      tags: &a5
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                                nullable: true
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/BS/forecast:
    get:
      summary: Get Balance Sheet Forecast report
      tags: *a5
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                                nullable: true
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports/BS/delta:
    get:
      summary: Get Balance Sheet Delta report
      tags: &a6
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
              - type: string
                enum:
                  - scenario
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  additionalProperties:
                                    type: object
                                    properties:
                                      actual:
                                        type: string
                                      budget:
                                        type: string
                                      delta:
                                        type: string
                                    required:
                                      - actual
                                      - budget
                                      - delta
                              required:
                                - columns
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  properties:
                                    YTD:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            actual:
                                              type: string
                                          required:
                                            - actual
                                    YTG:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                    TOTAL:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                  required:
                                    - YTD
                                    - YTG
                                    - TOTAL
                              required:
                                - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/BS/delta:
    get:
      summary: Get Balance Sheet Delta report
      tags: *a6
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
              - type: string
                enum:
                  - scenario
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  additionalProperties:
                                    type: object
                                    properties:
                                      actual:
                                        type: string
                                      budget:
                                        type: string
                                      delta:
                                        type: string
                                    required:
                                      - actual
                                      - budget
                                      - delta
                              required:
                                - columns
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  properties:
                                    YTD:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            actual:
                                              type: string
                                          required:
                                            - actual
                                    YTG:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                    TOTAL:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                  required:
                                    - YTD
                                    - YTG
                                    - TOTAL
                              required:
                                - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports/CF/actuals:
    get:
      summary: Get Cash Flow Actuals report
      tags: &a7
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                      columnIds:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/CF/actuals:
    get:
      summary: Get Cash Flow Actuals report
      tags: *a7
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                      columnIds:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports/CF/forecast:
    get:
      summary: Get Cash Flow Forecast report
      tags: &a8
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/CF/forecast:
    get:
      summary: Get Cash Flow Forecast report
      tags: *a8
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports/CF/delta:
    get:
      summary: Get Cash Flow Delta report
      tags: &a9
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
              - type: string
                enum:
                  - scenario
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  additionalProperties:
                                    type: object
                                    properties:
                                      actual:
                                        type: string
                                      budget:
                                        type: string
                                      delta:
                                        type: string
                                    required:
                                      - actual
                                      - budget
                                      - delta
                              required:
                                - columns
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  properties:
                                    YTD:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            actual:
                                              type: string
                                          required:
                                            - actual
                                    YTG:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                    TOTAL:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                  required:
                                    - YTD
                                    - YTG
                                    - TOTAL
                              required:
                                - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/CF/delta:
    get:
      summary: Get Cash Flow Delta report
      tags: *a9
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
              - type: string
                enum:
                  - scenario
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  additionalProperties:
                                    type: object
                                    properties:
                                      actual:
                                        type: string
                                      budget:
                                        type: string
                                      delta:
                                        type: string
                                    required:
                                      - actual
                                      - budget
                                      - delta
                              required:
                                - columns
                        - type: object
                          allOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                rank:
                                  type: number
                                top:
                                  type: boolean
                                parent_id:
                                  type: string
                                  nullable: true
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - reporting_line
                                    - type: string
                                      enum:
                                        - mapping
                              required:
                                - id
                                - name
                                - rank
                                - top
                                - parent_id
                                - type
                            - type: object
                              properties:
                                columns:
                                  type: object
                                  properties:
                                    YTD:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            actual:
                                              type: string
                                          required:
                                            - actual
                                    YTG:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                    TOTAL:
                                      type: object
                                      allOf:
                                        - type: object
                                          properties:
                                            budget:
                                              type: string
                                            delta:
                                              type: string
                                            delta_%:
                                              type: string
                                              nullable: true
                                          required:
                                            - budget
                                            - delta
                                            - delta_%
                                        - type: object
                                          properties:
                                            forecast:
                                              type: string
                                          required:
                                            - forecast
                                  required:
                                    - YTD
                                    - YTG
                                    - TOTAL
                              required:
                                - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports/relations:
    get:
      summary: Get Relations report
      tags: &a10
        - Reporting
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            minimum: 1
            maximum: 100
            default: 100
            type: number
          in: query
          name: limit
          required: true
        - schema:
            minimum: 0
            default: 0
            type: number
          in: query
          name: offset
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                      columnIds:
                        type: array
                        items:
                          type: string
                      totalCount:
                        type: number
                    required:
                      - columnFormat
                      - columns
                      - totalCount
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/reports-with-mappings/relations:
    get:
      summary: Get Relations report
      tags: *a10
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: string
            enum:
              - period
          in: query
          name: aggregationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
              - type: string
                enum:
                  - year
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: true
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            minimum: 1
            maximum: 100
            default: 100
            type: number
          in: query
          name: limit
          required: true
        - schema:
            minimum: 0
            default: 0
            type: number
          in: query
          name: offset
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                      columnIds:
                        type: array
                        items:
                          type: string
                      totalCount:
                        type: number
                    required:
                      - columnFormat
                      - columns
                      - totalCount
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                            parent_id:
                              type: string
                              nullable: true
                            type:
                              anyOf:
                                - type: string
                                  enum:
                                    - reporting_line
                                - type: string
                                  enum:
                                    - mapping
                          required:
                            - id
                            - name
                            - rank
                            - top
                            - parent_id
                            - type
                        - type: object
                          properties:
                            columns:
                              type: object
                              additionalProperties:
                                type: string
                          required:
                            - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/graphs/KPI:
    get:
      summary: Get the graph data for the KPI graph
      tags:
        - Graphs
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
              - type: string
                enum:
                  - scenario
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            type: boolean
          in: query
          name: list
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    title:
                      type: string
                    rank:
                      type: number
                    data:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                          dateToMatch:
                            format: date
                            type: string
                          originalDate:
                            format: date
                            type: string
                        required:
                          - value
                          - dateToMatch
                          - originalDate
                    prevData:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                          dateToMatch:
                            format: date
                            type: string
                          originalDate:
                            format: date
                            type: string
                        required:
                          - value
                          - dateToMatch
                          - originalDate
                  required:
                    - id
                    - title
                    - rank
                    - data
                    - prevData
  /entities/{entityId}/graphs/percentage:
    get:
      summary: Get the graph data for the percentage graph
      tags:
        - Graphs
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
              - type: string
                enum:
                  - scenario
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            type: boolean
          in: query
          name: list
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        rank:
                          type: number
                      required:
                        - id
                        - title
                        - rank
                    - type: object
                      properties:
                        data:
                          type: array
                          items:
                            type: object
                            properties:
                              value:
                                type: string
                                nullable: true
                              dateToMatch:
                                format: date
                                type: string
                              originalDate:
                                format: date
                                type: string
                            required:
                              - value
                              - dateToMatch
                              - originalDate
                        prevData:
                          type: array
                          items:
                            type: object
                            properties:
                              value:
                                type: string
                                nullable: true
                              dateToMatch:
                                format: date
                                type: string
                              originalDate:
                                format: date
                                type: string
                            required:
                              - value
                              - dateToMatch
                              - originalDate
                      required:
                        - data
                        - prevData
                nullable: true
  /entities/{entityId}/graphs/waterfall:
    get:
      summary: Get the graph data for the waterfall graph
      tags:
        - Graphs
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
              - type: string
                enum:
                  - scenario
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            type: boolean
          in: query
          name: list
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    title:
                      type: string
                    rank:
                      type: number
                    data:
                      type: number
                  required:
                    - title
                    - data
                nullable: true
  /entities/{entityId}/validations/status:
    get:
      summary: Get the validation status of an entity
      tags:
        - Entity
      description: This endpoint will perform a set of validations to make sure your
        reports will be reliable.
      externalDocs:
        url: https://docs.monitr.be/validations/validations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  checkBS:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          format: date
                          type: string
                        amount:
                          type: string
                        amountPL:
                          anyOf:
                            - type: string
                            - type: "null"
                        delta:
                          type: string
                          nullable: true
                        bool:
                          type: boolean
                      required:
                        - date
                        - amount
                        - amountPL
                        - delta
                        - bool
                  checkCFvBS:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          format: date
                          type: string
                        amount:
                          anyOf:
                            - type: string
                            - type: "null"
                        amountBSBank:
                          type: string
                        delta:
                          type: string
                          nullable: true
                        bool:
                          type: boolean
                      required:
                        - date
                        - amount
                        - amountBSBank
                        - delta
                        - bool
                  hasUnmappedAccounts:
                    type: boolean
                  unmappedProducts:
                    type: array
                    items:
                      additionalProperties: false
                      type: object
                      properties:
                        name:
                          type: string
                        icon:
                          type: string
                        products:
                          type: array
                          items:
                            additionalProperties: false
                            type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              name:
                                type: string
                            required:
                              - id
                              - name
                      required:
                        - name
                        - icon
                        - products
                    nullable: true
                  budgetAccountsWithoutVatRates:
                    type: array
                    items:
                      additionalProperties: false
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                      required:
                        - id
                        - name
                    nullable: true
                  unbudgetedFixedAssets:
                    type: array
                    items:
                      additionalProperties: false
                      type: object
                      properties:
                        id:
                          type: string
                        icon:
                          type: string
                        category:
                          type: string
                        name:
                          type: string
                      required:
                        - id
                        - icon
                        - category
                        - name
                    nullable: true
                required:
                  - checkBS
                  - checkCFvBS
                  - hasUnmappedAccounts
                  - unmappedProducts
                  - budgetAccountsWithoutVatRates
                  - unbudgetedFixedAssets
  /entities/{entityId}/imports:
    get:
      tags:
        - Import
      parameters:
        - schema:
            type: array
            items:
              format: uuid
              type: string
          in: query
          name: integrationIds
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    startedAt:
                      format: date-time
                      type: string
                      nullable: true
                    finishedAt:
                      format: date-time
                      type: string
                      nullable: true
                    lastSuccessAt:
                      format: date-time
                      type: string
                      nullable: true
                    status:
                      type: string
                      enum:
                        - waiting
                        - in_progress
                        - succeeded
                        - failed
                    integrationId:
                      format: uuid
                      type: string
                    entityId:
                      format: uuid
                      type: string
                  required:
                    - startedAt
                    - finishedAt
                    - lastSuccessAt
                    - status
                    - integrationId
                    - entityId
  /entities/{entityId}/import:
    post:
      summary: Sync now with a specific entity
      tags:
        - Import
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "202":
          description: Default Response
  /entities/{entityId}/integrations/{integrationType}/{providerId}/{integrationId}/import:
    post:
      summary: Start integration import for a specific entity
      tags:
        - Import
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - bookkeeping
              - type: string
                enum:
                  - crm
              - type: string
                enum:
                  - subscription
              - type: string
                enum:
                  - inventory
              - type: string
                enum:
                  - project
              - type: string
                enum:
                  - historic-outstanding-item
              - type: string
                enum:
                  - other
              - type: string
                enum:
                  - personnel-costs
              - type: string
                enum:
                  - annual-accounts-filing
              - type: string
                enum:
                  - fixed-assets
          in: path
          name: integrationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: path
          name: providerId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "202":
          description: Default Response
  /entities/{entityId}/integrations/bookkeeping/{providerId}/{integrationId}/financial-periods:
    get:
      summary: Get the financial periods for a specific integration
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
          in: path
          name: providerId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/bookkeeping/{providerId}/{integrationId}/supported-schemas:
    get:
      summary: Get the supported schemas for a specific integration
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
          in: path
          name: providerId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/crm/hubspot/import:
    post:
      summary: Sync all data with HubSpot
      tags:
        - Import
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                paymentDueDate:
                  type: string
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: integrationId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/crm/hubspot/{integrationId}/custom-fields:
    get:
      summary: Get custom fields from HubSpot
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/crm/teamleader:
    post:
      summary: Create a Teamleader CRM integration
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  integrationId:
                    format: uuid
                    type: string
                required:
                  - integrationId
  /entities/{entityId}/integrations/crm/teamleader/import:
    post:
      summary: Sync all Teamleader CRM data with Monitr
      tags:
        - Import
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                departmentId:
                  type: string
                invoiceDateField:
                  anyOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - builtin
                        key:
                          anyOf:
                            - type: string
                              enum:
                                - closingDate
                            - type: string
                              enum:
                                - estimatedClosingDate
                      required:
                        - type
                        - key
                    - type: object
                      properties:
                        type:
                          type: string
                          enum:
                            - custom
                        id:
                          type: string
                      required:
                        - type
                        - id
              required:
                - departmentId
                - invoiceDateField
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: integrationId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/crm/teamleader/{integrationId}/custom-fields:
    get:
      summary: Get custom fields from Teamleader
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    label:
                      type: string
                    type:
                      type: string
                  required:
                    - id
                    - label
                    - type
  /entities/{entityId}/integrations/crm/teamleader/{integrationId}/deals:
    get:
      summary: Get the newest 20 deals from teamleader
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  additionalProperties: false
                  type: object
                  properties:
                    id:
                      type: string
                    title:
                      type: string
                    reference:
                      type: string
                    estimatedValue:
                      type: number
                    estimatedClosingDate:
                      type: string
                      nullable: true
                    closedAt:
                      type: string
                      nullable: true
                    customFields:
                      type: array
                      items:
                        type: object
                        properties:
                          definition:
                            type: object
                            properties:
                              id:
                                type: string
                              type:
                                type: string
                                enum:
                                  - date
                            required:
                              - id
                              - type
                          value:
                            type: string
                            nullable: true
                        required:
                          - definition
                          - value
                  required:
                    - id
                    - title
                    - reference
                    - estimatedValue
                    - estimatedClosingDate
                    - closedAt
                    - customFields
  /entities/{entityId}/integrations/crm/teamleader/{integrationId}/departments:
    get:
      summary: Get the departments from teamleader. Departments are used to split
        quotations and invoices for different legal entities or within one
        organisation.
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    vatNumber:
                      type: string
                    status:
                      anyOf:
                        - type: string
                          enum:
                            - active
                        - type: string
                          enum:
                            - archived
                  required:
                    - id
                    - name
                    - vatNumber
                    - status
  /entities/{entityId}/integrations/subscription/teamleader:
    post:
      summary: Create a Teamleader subscription integration
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  integrationId:
                    format: uuid
                    type: string
                required:
                  - integrationId
  /entities/{entityId}/integrations/subscription/teamleader/import:
    post:
      summary: Sync all Teamleader subscription data with Monitr
      tags:
        - Import
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: integrationId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/subscription/exact:
    post:
      summary: Create an Exact Online subscription integration and, if successful,
        immediately start the import
      tags:
        - Integrations
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - exact:nl
          in: query
          name: exactProviderId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/project/exact:
    post:
      summary: Create an Exact Online projects integration and, if successful,
        immediately start the import
      tags:
        - Integrations
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - exact:nl
          in: query
          name: exactProviderId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/historic-outstanding-item/exact:
    post:
      summary: Create an Exact Online historic outstanding items integration and, if
        successful, immediately start the import
      tags:
        - Integrations
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - exact:nl
          in: query
          name: exactProviderId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/fixed-assets/exact:
    post:
      summary: Create an Exact Online fixed assets integration and, if successful,
        immediately start the import
      tags:
        - Integrations
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - exact:nl
          in: query
          name: exactProviderId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/historic-outstanding-item/odoo:
    post:
      summary: Create an Odoo historic outstanding items integration and, if
        successful, immediately start the import
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/historic-outstanding-item/yuki:
    post:
      summary: Create an Yuki historic outstanding items integration and, if
        successful, immediately start the import
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/integrations/personnel-costs/nmbrs/{integrationId}/companies:
    get:
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  additionalProperties: false
                  type: object
                  properties:
                    debtorId:
                      format: uuid
                      type: string
                    debtorName:
                      type: string
                    companies:
                      type: array
                      items:
                        additionalProperties: false
                        type: object
                        properties:
                          companyId:
                            format: "uuid "
                            type: string
                          number:
                            type: string
                          name:
                            type: string
                          debtorId:
                            format: "uuid "
                            type: string
                        required:
                          - companyId
                          - number
                          - name
                          - debtorId
                  required:
                    - debtorId
                    - debtorName
                    - companies
  /entities/{entityId}/integrations/personnel-costs/nmbrs/data:
    get:
      tags:
        - Integrations
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: start
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: end
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        name:
                          type: string
                        vendorId:
                          format: uuid
                          type: string
                          nullable: true
                        integrationId:
                          format: uuid
                          type: string
                          nullable: true
                      required:
                        - name
                        - vendorId
                        - integrationId
                    - type: object
                      properties:
                        employees:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  firstName:
                                    type: string
                                  lastName:
                                    type: string
                                  jobTitle:
                                    type: string
                                    nullable: true
                                  perks:
                                    type: array
                                    items:
                                      anyOf:
                                        - type: object
                                          properties:
                                            name:
                                              type: string
                                            amount:
                                              type: number
                                            paymentType:
                                              type: string
                                              enum:
                                                - recurring
                                            period:
                                              type: object
                                              properties:
                                                start:
                                                  format: date
                                                  type: string
                                                end:
                                                  format: date
                                                  type: string
                                              required:
                                                - start
                                                - end
                                          required:
                                            - name
                                            - amount
                                            - paymentType
                                            - period
                                        - type: object
                                          properties:
                                            name:
                                              type: string
                                            amount:
                                              type: number
                                            paymentType:
                                              type: string
                                              enum:
                                                - one-time
                                            month:
                                              format: date
                                              type: string
                                          required:
                                            - name
                                            - amount
                                            - paymentType
                                            - month
                                  employmentStart:
                                    format: date
                                    type: string
                                  employmentEnd:
                                    format: date
                                    type: string
                                  vendorId:
                                    format: uuid
                                    type: string
                                    nullable: true
                                  integrationId:
                                    format: uuid
                                    type: string
                                    nullable: true
                                required:
                                  - firstName
                                  - lastName
                                  - jobTitle
                                  - perks
                                  - employmentStart
                                  - employmentEnd
                                  - vendorId
                                  - integrationId
                              - type: object
                                properties:
                                  wage:
                                    type: object
                                    properties:
                                      raises:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            month:
                                              format: date
                                              type: string
                                            percentage:
                                              min: 0
                                              type: number
                                          required:
                                            - month
                                            - percentage
                                      baseAmount:
                                        min: 0
                                        type: number
                                      type:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - payroll
                                          - type: string
                                            enum:
                                              - freelance
                                    required:
                                      - raises
                                      - baseAmount
                                      - type
                                required:
                                  - wage
                      required:
                        - employees
  /entities/{entityId}/integrations/personnel-costs/nmbrs/{integrationId}/validate:
    delete:
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/templates/reporting/bookkeeping:
    get:
      summary: Get a list of available reporting templates for the integrations
      tags:
        - Templates
        - Integration
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    meta:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        description:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        autoMapped:
                          type: boolean
                        dashboard:
                          type: boolean
                        customMetrics:
                          type: boolean
                        imageSrc:
                          type: string
                      required:
                        - id
                        - title
                        - autoMapped
                        - imageSrc
                    definitions:
                      type: object
                      properties:
                        PL:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-0"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                            title: pl-reporting-line
                        BS:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-1"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                            title: bs-reporting-line
                        CF:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-2"
                            title: cf-reporting-line
                      required:
                        - PL
                        - BS
                  required:
                    - meta
                    - definitions
  /entities/{entityId}/templates/reporting/{type}:
    get:
      summary: Get a list of available reporting templates
      tags:
        - Templates
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - entity
              - type: string
                enum:
                  - standard
          in: path
          name: type
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    meta:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        description:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        autoMapped:
                          type: boolean
                        dashboard:
                          type: boolean
                        customMetrics:
                          type: boolean
                        imageSrc:
                          type: string
                      required:
                        - id
                        - title
                        - autoMapped
                        - imageSrc
                    definitions:
                      type: object
                      properties:
                        PL:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-0"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        BS:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-1"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        CF:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-2"
                      required:
                        - PL
                        - BS
                  required:
                    - meta
                    - definitions
  /entities/{entityId}/templates/reporting/accountants/{type}:
    get:
      summary: Get all reporting templates created by an accountancy or accountant
      tags:
        - Templates
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - user
              - type: string
                enum:
                  - organisation
          in: path
          name: type
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    meta:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        description:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        autoMapped:
                          type: boolean
                        dashboard:
                          type: boolean
                        customMetrics:
                          type: boolean
                        imageSrc:
                          type: string
                      required:
                        - id
                        - title
                        - autoMapped
                        - imageSrc
                    definitions:
                      type: object
                      properties:
                        PL:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-0"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        BS:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-1"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        CF:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-2"
                      required:
                        - PL
                        - BS
                  required:
                    - meta
                    - definitions
  /entities/{entityId}/templates/reporting:
    post:
      summary: Specify the reporting template you want to use, replaces all reporting
        configurations
      tags:
        - Reporting Lines
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                template:
                  type: object
                  properties:
                    meta:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        description:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        autoMapped:
                          type: boolean
                        dashboard:
                          type: boolean
                        customMetrics:
                          type: boolean
                        imageSrc:
                          type: string
                      required:
                        - id
                        - title
                        - autoMapped
                        - imageSrc
                    definitions:
                      type: object
                      properties:
                        PL:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-0"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        BS:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-1"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        CF:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-2"
                      required:
                        - PL
                        - BS
                  required:
                    - meta
                    - definitions
              required:
                - template
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/transaction-tables:
    get:
      summary: Get all transactions and budgets
      tags:
        - General Ledger
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - PL
              - type: string
                enum:
                  - BS
              - type: string
                enum:
                  - CF
              - type: string
                enum:
                  - relations
          in: query
          name: report
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - actuals
              - type: string
                enum:
                  - forecast
              - type: string
                enum:
                  - delta
          in: query
          name: reportType
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: string
          in: query
          name: reportingLineId
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: mappingId
          required: false
        - schema:
            type: string
          in: query
          name: relationId
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: axisIdsToExclude
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: analyticalAxisIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: string
                enum:
                  - general_ledger
              - type: string
                enum:
                  - adjusting_entry
          in: query
          name: transactionType
          required: false
        - schema:
            minimum: 1
            maximum: 1000
            default: 1000
            type: number
          in: query
          name: limit
          required: true
        - schema:
            minimum: 0
            default: 0
            type: number
          in: query
          name: offset
          required: true
        - schema:
            pattern: ^([a-zA-Z-_]+):(ASC|DESC)$
            default: datePeriod:ASC
            type: string
          in: query
          name: orderBy
          required: true
        - schema:
            anyOf:
              - format: date
                type: string
              - minItems: 1
                type: array
                items:
                  format: date
                  type: string
          in: query
          name: filterPeriod
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: filterAccountNumber
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: filterAnalyticalAxis
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: filterRelation
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        datePeriod:
                          type: string
                        description:
                          type: string
                          nullable: true
                        relationName:
                          type: string
                          nullable: true
                        accountNumber:
                          type: string
                        accountName:
                          type: string
                        analyticalAxisId:
                          type: string
                          nullable: true
                        analyticalAxisAccount:
                          type: string
                          nullable: true
                        analyticalAxisDescription:
                          type: string
                          nullable: true
                        amount:
                          type: number
                        type:
                          type: string
                      required:
                        - id
                        - datePeriod
                        - description
                        - relationName
                        - accountNumber
                        - accountName
                        - analyticalAxisId
                        - analyticalAxisAccount
                        - analyticalAxisDescription
                        - amount
                        - type
                  meta:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          totalCount:
                            type: number
                          totalAmount:
                            type: number
                        required:
                          - totalCount
                          - totalAmount
                      - type: object
                        properties:
                          filterOptions:
                            type: object
                            properties:
                              datePeriod:
                                type: array
                                items:
                                  format: date
                                  type: string
                              accountNumber:
                                type: array
                                items:
                                  type: string
                              analyticalAxisAccount:
                                type: array
                                items:
                                  type: string
                              relationName:
                                type: array
                                items:
                                  type: string
                        required:
                          - filterOptions
                required:
                  - data
                  - meta
  /entities/{entityId}/annotations:
    post:
      summary: Create a new annotation
      tags:
        - Annotations
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                reportingLineId:
                  type: string
                month:
                  format: date
                  type: string
              required:
                - content
                - month
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  content:
                    type: string
                  createdBy:
                    anyOf:
                      - type: object
                        properties:
                          firstName:
                            type: string
                          lastName:
                            type: string
                          email:
                            type: string
                        required:
                          - firstName
                          - lastName
                          - email
                      - type: "null"
                  lastEditedBy:
                    anyOf:
                      - type: object
                        properties:
                          firstName:
                            type: string
                          lastName:
                            type: string
                          email:
                            type: string
                        required:
                          - firstName
                          - lastName
                          - email
                      - type: "null"
                  reportingLine:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                        required:
                          - id
                          - name
                      - type: "null"
                  month:
                    format: date
                    type: string
                  createdAt:
                    format: date-time
                    type: string
                  updatedAt:
                    format: date-time
                    type: string
                required:
                  - id
                  - content
                  - createdBy
                  - lastEditedBy
                  - reportingLine
                  - month
                  - createdAt
                  - updatedAt
    get:
      summary: Get all annotations for a range of months
      tags:
        - Annotations
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    content:
                      type: string
                    createdBy:
                      anyOf:
                        - type: object
                          properties:
                            firstName:
                              type: string
                            lastName:
                              type: string
                            email:
                              type: string
                          required:
                            - firstName
                            - lastName
                            - email
                        - type: "null"
                    lastEditedBy:
                      anyOf:
                        - type: object
                          properties:
                            firstName:
                              type: string
                            lastName:
                              type: string
                            email:
                              type: string
                          required:
                            - firstName
                            - lastName
                            - email
                        - type: "null"
                    reportingLine:
                      anyOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - name
                        - type: "null"
                    month:
                      format: date
                      type: string
                    createdAt:
                      format: date-time
                      type: string
                    updatedAt:
                      format: date-time
                      type: string
                  required:
                    - id
                    - content
                    - createdBy
                    - lastEditedBy
                    - reportingLine
                    - month
                    - createdAt
                    - updatedAt
  /entities/{entityId}/reporting-lines/annotations:
    get:
      summary: Get all global annotations and all annotations on the given reporting
        lines for a range of months
      tags:
        - Annotations
      description: Returns all global and reporting line specific annotations in the
        period between the start and end month, grouped by the given reporting
        line IDs (global annotations are in the group where reportingLineId is
        null). Optionally includes annotations on descendant reporting lines.
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
              - uniqueItems: true
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: true
        - schema:
            default: false
            type: boolean
          in: query
          name: includeDescendantReportingLines
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    reportingLineId:
                      anyOf:
                        - type: "null"
                        - type: string
                    annotations:
                      type: array
                      items:
                        type: object
                        allOf:
                          - type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              content:
                                type: string
                              createdBy:
                                anyOf:
                                  - type: object
                                    properties:
                                      firstName:
                                        type: string
                                      lastName:
                                        type: string
                                      email:
                                        type: string
                                    required:
                                      - firstName
                                      - lastName
                                      - email
                                  - type: "null"
                              lastEditedBy:
                                anyOf:
                                  - type: object
                                    properties:
                                      firstName:
                                        type: string
                                      lastName:
                                        type: string
                                      email:
                                        type: string
                                    required:
                                      - firstName
                                      - lastName
                                      - email
                                  - type: "null"
                              reportingLine:
                                anyOf:
                                  - type: object
                                    properties:
                                      id:
                                        type: string
                                      name:
                                        type: string
                                    required:
                                      - id
                                      - name
                                  - type: "null"
                              month:
                                format: date
                                type: string
                              createdAt:
                                format: date-time
                                type: string
                              updatedAt:
                                format: date-time
                                type: string
                            required:
                              - id
                              - content
                              - createdBy
                              - lastEditedBy
                              - reportingLine
                              - month
                              - createdAt
                              - updatedAt
                          - type: object
                            properties:
                              isLowestLevel:
                                type: boolean
                            required:
                              - isLowestLevel
                  required:
                    - reportingLineId
                    - annotations
  /entities/{entityId}/annotations/{annotationId}:
    patch:
      summary: Update the content of an annotation
      tags:
        - Annotations
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
              required:
                - content
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: annotationId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  content:
                    type: string
                  createdBy:
                    anyOf:
                      - type: object
                        properties:
                          firstName:
                            type: string
                          lastName:
                            type: string
                          email:
                            type: string
                        required:
                          - firstName
                          - lastName
                          - email
                      - type: "null"
                  lastEditedBy:
                    anyOf:
                      - type: object
                        properties:
                          firstName:
                            type: string
                          lastName:
                            type: string
                          email:
                            type: string
                        required:
                          - firstName
                          - lastName
                          - email
                      - type: "null"
                  reportingLine:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                        required:
                          - id
                          - name
                      - type: "null"
                  month:
                    format: date
                    type: string
                  createdAt:
                    format: date-time
                    type: string
                  updatedAt:
                    format: date-time
                    type: string
                required:
                  - id
                  - content
                  - createdBy
                  - lastEditedBy
                  - reportingLine
                  - month
                  - createdAt
                  - updatedAt
    delete:
      summary: Delete an annotation
      tags:
        - Annotations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: annotationId
          required: true
      responses:
        "204":
          description: Succesfully deleted annotation
  /entities/{entityId}/subscriptions:
    get:
      summary: Get all subscriptions by entity ID
      tags:
        - Subscriptions
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: budgetVersionId
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                      nullable: true
                    subscriptionNumber:
                      type: string
                      nullable: true
                    relationName:
                      type: string
                      nullable: true
                    description:
                      type: string
                      nullable: true
                    entityId:
                      format: uuid
                      type: string
                    subscriptionItems:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          subscriptionId:
                            format: uuid
                            type: string
                          productId:
                            format: uuid
                            type: string
                            nullable: true
                          startDate:
                            format: date
                            type: string
                          endDate:
                            format: date
                            type: string
                            nullable: true
                          interval:
                            anyOf:
                              - type: string
                                enum:
                                  - day
                              - type: string
                                enum:
                                  - week
                              - type: string
                                enum:
                                  - month
                              - type: string
                                enum:
                                  - quarter
                              - type: string
                                enum:
                                  - year
                          intervalCount:
                            type: number
                          unitPrice:
                            type: number
                            nullable: true
                          amount:
                            type: number
                          discount:
                            type: number
                            nullable: true
                          discountPercentage:
                            type: number
                            nullable: true
                          product:
                            type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              vendorId:
                                type: string
                                nullable: true
                              name:
                                type: string
                              description:
                                type: string
                                nullable: true
                              unitCost:
                                type: number
                                nullable: true
                              price:
                                type: number
                                nullable: true
                              recurring:
                                type: boolean
                              archived:
                                type: boolean
                              entityId:
                                format: uuid
                                type: string
                              integrationId:
                                format: uuid
                                type: string
                                nullable: true
                              budgetAccountId:
                                type: string
                                nullable: true
                              recurringRevenueProducts:
                                type: array
                                items:
                                  type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        budgetVersionId:
                                          format: uuid
                                          type: string
                                        productId:
                                          format: uuid
                                          type: string
                                        newCustomers:
                                          type: number
                                          nullable: true
                                        monthlyGrowth:
                                          type: number
                                          nullable: true
                                        churn:
                                          type: number
                                        startDate:
                                          format: date
                                          type: string
                                          nullable: true
                                        endDate:
                                          format: date
                                          type: string
                                          nullable: true
                                        periods:
                                          type: array
                                          items:
                                            type: object
                                            properties:
                                              period:
                                                type: string
                                              interval:
                                                type: number
                                              distribution:
                                                type: number
                                              avgRevenue:
                                                type: number
                                            required:
                                              - period
                                              - interval
                                              - distribution
                                              - avgRevenue
                                        type:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - management
                                            - type: string
                                              enum:
                                                - model
                                      required:
                                        - budgetVersionId
                                        - productId
                                        - newCustomers
                                        - monthlyGrowth
                                        - churn
                                        - startDate
                                        - endDate
                                        - periods
                                        - type
                                    - type: object
                                      properties:
                                        recurringRevenueBudgetAccountId:
                                          type: string
                                        revenueRecognitionBudgetAccountId:
                                          type: string
                                        recurringRevenueAccountAnalyticalAxisId:
                                          format: uuid
                                          type: string
                                          nullable: true
                                        revenueRecognitionAccountAnalyticalAxisId:
                                          format: uuid
                                          type: string
                                          nullable: true
                                      required:
                                        - recurringRevenueBudgetAccountId
                                        - revenueRecognitionBudgetAccountId
                              productRevenues:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                    budgetVersionId:
                                      format: uuid
                                      type: string
                                    productId:
                                      format: uuid
                                      type: string
                                    entityId:
                                      format: uuid
                                      type: string
                                    createdAt:
                                      type: string
                                    updatedAt:
                                      type: string
                                    productsRevenueChannels:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          id:
                                            format: uuid
                                            type: string
                                          productRevenueId:
                                            format: uuid
                                            type: string
                                          revenueChannel:
                                            type: object
                                            properties:
                                              id:
                                                format: uuid
                                                type: string
                                              name:
                                                minLength: 1
                                                type: string
                                              budgetVersionId:
                                                format: uuid
                                                type: string
                                              entityId:
                                                format: uuid
                                                type: string
                                            required:
                                              - id
                                              - name
                                              - budgetVersionId
                                              - entityId
                                            nullable: true
                                          productsRevenueItems:
                                            type: array
                                            items:
                                              type: object
                                              properties:
                                                productRevenueId:
                                                  format: uuid
                                                  type: string
                                                productsRevenueChannelId:
                                                  format: uuid
                                                  type: string
                                                datePeriod:
                                                  format: date
                                                  type: string
                                                price:
                                                  type: number
                                                quantity:
                                                  type: number
                                                entityId:
                                                  format: uuid
                                                  type: string
                                                createdAt:
                                                  type: string
                                                updatedAt:
                                                  type: string
                                              required:
                                                - productRevenueId
                                                - productsRevenueChannelId
                                                - datePeriod
                                                - price
                                                - quantity
                                                - entityId
                                                - createdAt
                                                - updatedAt
                                          budgetAccountId:
                                            type: string
                                          entityId:
                                            format: uuid
                                            type: string
                                          createdAt:
                                            type: string
                                          updatedAt:
                                            type: string
                                          accountAnalyticalAxisId:
                                            format: uuid
                                            type: string
                                            nullable: true
                                        required:
                                          - id
                                          - productRevenueId
                                          - revenueChannel
                                          - productsRevenueItems
                                          - budgetAccountId
                                          - entityId
                                          - createdAt
                                          - updatedAt
                                  required:
                                    - id
                                    - budgetVersionId
                                    - productId
                                    - entityId
                                    - createdAt
                                    - updatedAt
                                    - productsRevenueChannels
                            required:
                              - id
                              - vendorId
                              - name
                              - description
                              - unitCost
                              - price
                              - recurring
                              - archived
                              - entityId
                              - integrationId
                              - budgetAccountId
                            nullable: true
                          entityId:
                            format: uuid
                            type: string
                        required:
                          - id
                          - subscriptionId
                          - productId
                          - startDate
                          - endDate
                          - interval
                          - intervalCount
                          - unitPrice
                          - amount
                          - discount
                          - discountPercentage
                          - product
                          - entityId
                  required:
                    - id
                    - startDate
                    - endDate
                    - subscriptionNumber
                    - relationName
                    - description
                    - entityId
                    - subscriptionItems
    post:
      summary: POST subscriptions and products by entity ID
      tags:
        - Subscriptions
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscriptions:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          startDate:
                            format: date
                            type: string
                          endDate:
                            format: date
                            type: string
                            nullable: true
                          relationName:
                            type: string
                            nullable: true
                          entityId:
                            format: uuid
                            type: string
                        required:
                          - startDate
                          - endDate
                          - relationName
                          - entityId
                      - type: object
                        properties:
                          description:
                            type: string
                          subscriptionItems:
                            type: array
                            items:
                              type: object
                              allOf:
                                - type: object
                                  properties:
                                    startDate:
                                      format: date
                                      type: string
                                    endDate:
                                      format: date
                                      type: string
                                      nullable: true
                                    interval:
                                      anyOf:
                                        - type: string
                                          enum:
                                            - day
                                        - type: string
                                          enum:
                                            - week
                                        - type: string
                                          enum:
                                            - month
                                        - type: string
                                          enum:
                                            - quarter
                                        - type: string
                                          enum:
                                            - year
                                    intervalCount:
                                      type: number
                                    amount:
                                      type: number
                                    entityId:
                                      format: uuid
                                      type: string
                                  required:
                                    - startDate
                                    - endDate
                                    - interval
                                    - intervalCount
                                    - amount
                                    - entityId
                                - type: object
                                  properties:
                                    product:
                                      type: object
                                      properties:
                                        name:
                                          type: string
                                        recurring:
                                          type: boolean
                                        entityId:
                                          format: uuid
                                          type: string
                                      required:
                                        - name
                                        - recurring
                                        - entityId
                                      additionalProperties: false
                                  required:
                                    - product
                        required:
                          - description
                          - subscriptionItems
              required:
                - subscriptions
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  integrationId:
                    format: uuid
                    type: string
                required:
                  - integrationId
  /entities/{entityId}/subscriptions/products:
    get:
      summary: Get all products related to subscriptions by entity ID
      tags:
        - Subscriptions
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: budgetVersionId
          required: false
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    vendorId:
                      type: string
                      nullable: true
                    name:
                      type: string
                    description:
                      type: string
                      nullable: true
                    unitCost:
                      type: number
                      nullable: true
                    price:
                      type: number
                      nullable: true
                    recurring:
                      type: boolean
                    archived:
                      type: boolean
                    createdAt:
                      format: date-time
                      type: string
                    updatedAt:
                      format: date-time
                      type: string
                    entityId:
                      format: uuid
                      type: string
                    integrationId:
                      format: uuid
                      type: string
                      nullable: true
                    budgetAccountId:
                      type: string
                      nullable: true
                    recurringRevenueProducts:
                      type: array
                      items:
                        type: object
                        allOf:
                          - type: object
                            properties:
                              budgetVersionId:
                                format: uuid
                                type: string
                              productId:
                                format: uuid
                                type: string
                              newCustomers:
                                type: number
                                nullable: true
                              monthlyGrowth:
                                type: number
                                nullable: true
                              churn:
                                type: number
                              startDate:
                                format: date
                                type: string
                                nullable: true
                              endDate:
                                format: date
                                type: string
                                nullable: true
                              periods:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    period:
                                      type: string
                                    interval:
                                      type: number
                                    distribution:
                                      type: number
                                    avgRevenue:
                                      type: number
                                  required:
                                    - period
                                    - interval
                                    - distribution
                                    - avgRevenue
                              type:
                                anyOf:
                                  - type: string
                                    enum:
                                      - management
                                  - type: string
                                    enum:
                                      - model
                            required:
                              - budgetVersionId
                              - productId
                              - newCustomers
                              - monthlyGrowth
                              - churn
                              - startDate
                              - endDate
                              - periods
                              - type
                          - type: object
                            properties:
                              recurringRevenueBudgetAccountId:
                                type: string
                              revenueRecognitionBudgetAccountId:
                                type: string
                              recurringRevenueAccountAnalyticalAxisId:
                                format: uuid
                                type: string
                                nullable: true
                              revenueRecognitionAccountAnalyticalAxisId:
                                format: uuid
                                type: string
                                nullable: true
                            required:
                              - recurringRevenueBudgetAccountId
                              - revenueRecognitionBudgetAccountId
                    productRevenues:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          budgetVersionId:
                            format: uuid
                            type: string
                          productId:
                            format: uuid
                            type: string
                          entityId:
                            format: uuid
                            type: string
                          createdAt:
                            type: string
                          updatedAt:
                            type: string
                          productsRevenueChannels:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                                productRevenueId:
                                  format: uuid
                                  type: string
                                revenueChannel:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                    name:
                                      minLength: 1
                                      type: string
                                    budgetVersionId:
                                      format: uuid
                                      type: string
                                    entityId:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                                    - name
                                    - budgetVersionId
                                    - entityId
                                  nullable: true
                                productsRevenueItems:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      productRevenueId:
                                        format: uuid
                                        type: string
                                      productsRevenueChannelId:
                                        format: uuid
                                        type: string
                                      datePeriod:
                                        format: date
                                        type: string
                                      price:
                                        type: number
                                      quantity:
                                        type: number
                                      entityId:
                                        format: uuid
                                        type: string
                                      createdAt:
                                        type: string
                                      updatedAt:
                                        type: string
                                    required:
                                      - productRevenueId
                                      - productsRevenueChannelId
                                      - datePeriod
                                      - price
                                      - quantity
                                      - entityId
                                      - createdAt
                                      - updatedAt
                                budgetAccountId:
                                  type: string
                                entityId:
                                  format: uuid
                                  type: string
                                createdAt:
                                  type: string
                                updatedAt:
                                  type: string
                                accountAnalyticalAxisId:
                                  format: uuid
                                  type: string
                                  nullable: true
                              required:
                                - id
                                - productRevenueId
                                - revenueChannel
                                - productsRevenueItems
                                - budgetAccountId
                                - entityId
                                - createdAt
                                - updatedAt
                        required:
                          - id
                          - budgetVersionId
                          - productId
                          - entityId
                          - createdAt
                          - updatedAt
                          - productsRevenueChannels
                  required:
                    - id
                    - vendorId
                    - name
                    - description
                    - unitCost
                    - price
                    - recurring
                    - archived
                    - createdAt
                    - updatedAt
                    - entityId
                    - integrationId
                    - budgetAccountId
  /entities/{entityId}/subscriptions/products/{productId}/card-data:
    get:
      summary: Get subscriptions by product ID
      tags:
        - Subscriptions
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: true
        - schema:
            minimum: 0
            maximum: 10000
            type: number
          in: query
          name: churn
          required: true
        - schema:
            minimum: 1
            maximum: 1000
            type: number
          in: query
          name: numbOfItemExamples
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: productId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  subscriptionItems:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            startDate:
                              format: date
                              type: string
                            endDate:
                              format: date
                              type: string
                              nullable: true
                            interval:
                              anyOf:
                                - type: string
                                  enum:
                                    - day
                                - type: string
                                  enum:
                                    - week
                                - type: string
                                  enum:
                                    - month
                                - type: string
                                  enum:
                                    - quarter
                                - type: string
                                  enum:
                                    - year
                            intervalCount:
                              type: number
                            amount:
                              type: number
                          required:
                            - id
                            - startDate
                            - endDate
                            - interval
                            - intervalCount
                            - amount
                        - type: object
                          properties:
                            relationName:
                              type: string
                              nullable: true
                          required:
                            - relationName
                  recurringRevenue:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          format: date
                          type: string
                        value:
                          type: number
                      required:
                        - date
                        - value
                  cashFlow:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          format: date
                          type: string
                        value:
                          type: number
                      required:
                        - date
                        - value
                required:
                  - subscriptionItems
                  - recurringRevenue
                  - cashFlow
  /entities/{entityId}/project-integration-employees:
    get:
      summary: Get all project integration employees from a given project management
        integration
      tags:
        - Projects
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: integrationId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    firstName:
                      type: string
                    lastName:
                      type: string
                  required:
                    - id
                    - firstName
                    - lastName
  /entities/{entityId}/project-planning-revenue:
    get:
      summary: Get the monthly revenue, generated by the given project integration
        employees, according to the project planning.
      tags:
        - Projects
      parameters:
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: employeeIds
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    project:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        name:
                          type: string
                        clientName:
                          type: string
                      required:
                        - id
                        - name
                        - clientName
                    employee:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        firstName:
                          type: string
                        lastName:
                          type: string
                      required:
                        - id
                        - firstName
                        - lastName
                    month:
                      format: date
                      type: string
                    revenue:
                      type: number
                    numberHours:
                      type: number
                  required:
                    - project
                    - employee
                    - month
                    - revenue
                    - numberHours
  /entities/{entityId}/budget-versions/project-revenue/{budgetVersionId}/revenue-capacity:
    get:
      summary: Get the monthly revenue capacity, for eeach employee and month in the
        given project revenue budget version
      tags:
        - Budgets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    employee:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        firstName:
                          type: string
                        lastName:
                          type: string
                        projectIntegrationEmployeeId:
                          format: uuid
                          type: string
                          nullable: true
                      required:
                        - id
                        - firstName
                        - lastName
                        - projectIntegrationEmployeeId
                    month:
                      format: date
                      type: string
                    active:
                      type: boolean
                    rate:
                      type: number
                    billability:
                      type: number
                    revenue:
                      type: number
                  required:
                    - employee
                    - month
                    - active
                    - rate
                    - billability
                    - revenue
  /entities/{entityId}/projects:
    post:
      summary: POST projects and products by entity ID
      tags:
        - Projects
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                projects:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      clientName:
                        type: string
                      planningItem:
                        type: object
                        properties:
                          hours:
                            type: number
                          revenue:
                            type: number
                          date:
                            format: date
                            type: string
                          employee:
                            type: object
                            properties:
                              firstName:
                                type: string
                              lastName:
                                type: string
                            required:
                              - firstName
                              - lastName
                        required:
                          - hours
                          - revenue
                          - date
                          - employee
                    required:
                      - name
                      - clientName
                      - planningItem
              required:
                - projects
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  integrationId:
                    format: uuid
                    type: string
                required:
                  - integrationId
  /entities/{entityId}/forecasts:
    get:
      summary: Get a list of forecasts and its scenarios
      tags:
        - Forecasts
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    scenarios:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          name:
                            type: string
                          default:
                            type: boolean
                          active:
                            type: boolean
                          budgetVersions:
                            default: []
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                                date:
                                  format: date
                                  type: string
                                budget_type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - budget
                                    - type: string
                                      enum:
                                        - crm
                                    - type: string
                                      enum:
                                        - personnel_costs
                                    - type: string
                                      enum:
                                        - recurring_revenue
                                    - type: string
                                      enum:
                                        - vat
                                    - type: string
                                      enum:
                                        - project_revenue
                                    - type: string
                                      enum:
                                        - pxq
                                    - type: string
                                      enum:
                                        - cogs
                                    - type: string
                                      enum:
                                        - inventory
                                    - type: string
                                      enum:
                                        - outstanding_items
                                    - type: string
                                      enum:
                                        - fixed-assets
                                    - type: string
                                      enum:
                                        - loans
                                entity_id:
                                  format: uuid
                                  type: string
                                settings:
                                  additionalProperties: true
                                  type: object
                                  properties: {}
                                integration_id:
                                  format: uuid
                                  type: string
                                  nullable: true
                                created_at:
                                  format: date-time
                                  type: string
                                updated_at:
                                  format: date-time
                                  type: string
                              required:
                                - id
                                - name
                                - date
                                - budget_type
                                - settings
                                - created_at
                                - updated_at
                          createdAt:
                            format: date-time
                            type: string
                          updatedAt:
                            format: date-time
                            type: string
                        required:
                          - id
                          - name
                          - default
                          - active
                          - createdAt
                          - updatedAt
                    entityId:
                      format: uuid
                      type: string
                    createdAt:
                      format: date-time
                      type: string
                    updatedAt:
                      format: date-time
                      type: string
                  required:
                    - id
                    - name
                    - entityId
                    - createdAt
                    - updatedAt
    post:
      summary: Create a new forecast with a main scenario
      tags:
        - Forecasts
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                name:
                  minLength: 1
                  type: string
              required:
                - name
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            pattern: ^(en|nl)-.*$
            default: en
            type: string
          in: header
          name: Accept-Language
          required: false
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  scenarios:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        name:
                          type: string
                        default:
                          type: boolean
                        active:
                          type: boolean
                        budgetVersions:
                          default: []
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              date:
                                format: date
                                type: string
                              budget_type:
                                anyOf:
                                  - type: string
                                    enum:
                                      - budget
                                  - type: string
                                    enum:
                                      - crm
                                  - type: string
                                    enum:
                                      - personnel_costs
                                  - type: string
                                    enum:
                                      - recurring_revenue
                                  - type: string
                                    enum:
                                      - vat
                                  - type: string
                                    enum:
                                      - project_revenue
                                  - type: string
                                    enum:
                                      - pxq
                                  - type: string
                                    enum:
                                      - cogs
                                  - type: string
                                    enum:
                                      - inventory
                                  - type: string
                                    enum:
                                      - outstanding_items
                                  - type: string
                                    enum:
                                      - fixed-assets
                                  - type: string
                                    enum:
                                      - loans
                              entity_id:
                                format: uuid
                                type: string
                              settings:
                                additionalProperties: true
                                type: object
                                properties: {}
                              integration_id:
                                format: uuid
                                type: string
                                nullable: true
                              created_at:
                                format: date-time
                                type: string
                              updated_at:
                                format: date-time
                                type: string
                            required:
                              - id
                              - name
                              - date
                              - budget_type
                              - settings
                              - created_at
                              - updated_at
                        createdAt:
                          format: date-time
                          type: string
                        updatedAt:
                          format: date-time
                          type: string
                      required:
                        - id
                        - name
                        - default
                        - active
                        - createdAt
                        - updatedAt
                  entityId:
                    format: uuid
                    type: string
                  createdAt:
                    format: date-time
                    type: string
                  updatedAt:
                    format: date-time
                    type: string
                required:
                  - id
                  - name
                  - entityId
                  - createdAt
                  - updatedAt
  /entities/{entityId}/forecasts/{forecastId}:
    get:
      summary: Get a single forecast and its scenarios
      tags:
        - Forecasts
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  scenarios:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        name:
                          type: string
                        default:
                          type: boolean
                        active:
                          type: boolean
                        budgetVersions:
                          default: []
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              name:
                                type: string
                              date:
                                format: date
                                type: string
                              budget_type:
                                anyOf:
                                  - type: string
                                    enum:
                                      - budget
                                  - type: string
                                    enum:
                                      - crm
                                  - type: string
                                    enum:
                                      - personnel_costs
                                  - type: string
                                    enum:
                                      - recurring_revenue
                                  - type: string
                                    enum:
                                      - vat
                                  - type: string
                                    enum:
                                      - project_revenue
                                  - type: string
                                    enum:
                                      - pxq
                                  - type: string
                                    enum:
                                      - cogs
                                  - type: string
                                    enum:
                                      - inventory
                                  - type: string
                                    enum:
                                      - outstanding_items
                                  - type: string
                                    enum:
                                      - fixed-assets
                                  - type: string
                                    enum:
                                      - loans
                              entity_id:
                                format: uuid
                                type: string
                              settings:
                                additionalProperties: true
                                type: object
                                properties: {}
                              integration_id:
                                format: uuid
                                type: string
                                nullable: true
                              created_at:
                                format: date-time
                                type: string
                              updated_at:
                                format: date-time
                                type: string
                            required:
                              - id
                              - name
                              - date
                              - budget_type
                              - settings
                              - created_at
                              - updated_at
                        createdAt:
                          format: date-time
                          type: string
                        updatedAt:
                          format: date-time
                          type: string
                      required:
                        - id
                        - name
                        - default
                        - active
                        - createdAt
                        - updatedAt
                  entityId:
                    format: uuid
                    type: string
                  createdAt:
                    format: date-time
                    type: string
                  updatedAt:
                    format: date-time
                    type: string
                required:
                  - id
                  - name
                  - entityId
                  - createdAt
                  - updatedAt
    patch:
      summary: Update an existing forecast
      tags:
        - Forecasts
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              minProperties: 1
              type: object
              properties:
                name:
                  minLength: 1
                  type: string
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
      responses:
        "204":
          description: Succesfully updated the forecast
    delete:
      summary: Delete a forecast with all its scenarios
      tags:
        - Forecasts
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
      responses:
        "204":
          description: Succesfully deleted the forecast
  /entities/{entityId}/forecasts/{forecastId}/scenarios:
    get:
      summary: Get a list of scenarios for a specific forecast
      tags:
        - Scenarios
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    default:
                      type: boolean
                    active:
                      type: boolean
                    budgetVersions:
                      default: []
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                          date:
                            format: date
                            type: string
                          budget_type:
                            anyOf:
                              - type: string
                                enum:
                                  - budget
                              - type: string
                                enum:
                                  - crm
                              - type: string
                                enum:
                                  - personnel_costs
                              - type: string
                                enum:
                                  - recurring_revenue
                              - type: string
                                enum:
                                  - vat
                              - type: string
                                enum:
                                  - project_revenue
                              - type: string
                                enum:
                                  - pxq
                              - type: string
                                enum:
                                  - cogs
                              - type: string
                                enum:
                                  - inventory
                              - type: string
                                enum:
                                  - outstanding_items
                              - type: string
                                enum:
                                  - fixed-assets
                              - type: string
                                enum:
                                  - loans
                          entity_id:
                            format: uuid
                            type: string
                          settings:
                            additionalProperties: true
                            type: object
                            properties: {}
                          integration_id:
                            format: uuid
                            type: string
                            nullable: true
                          created_at:
                            format: date-time
                            type: string
                          updated_at:
                            format: date-time
                            type: string
                        required:
                          - id
                          - name
                          - date
                          - budget_type
                          - settings
                          - created_at
                          - updated_at
                    createdAt:
                      format: date-time
                      type: string
                    updatedAt:
                      format: date-time
                      type: string
                  required:
                    - id
                    - name
                    - default
                    - active
                    - createdAt
                    - updatedAt
    post:
      summary: Create a new scenario for a specific forecast
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                name:
                  minLength: 1
                  type: string
                default:
                  default: false
                  type: boolean
                active:
                  default: false
                  type: boolean
              required:
                - name
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  default:
                    type: boolean
                  active:
                    type: boolean
                  budgetVersions:
                    default: []
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        date:
                          format: date
                          type: string
                        budget_type:
                          anyOf:
                            - type: string
                              enum:
                                - budget
                            - type: string
                              enum:
                                - crm
                            - type: string
                              enum:
                                - personnel_costs
                            - type: string
                              enum:
                                - recurring_revenue
                            - type: string
                              enum:
                                - vat
                            - type: string
                              enum:
                                - project_revenue
                            - type: string
                              enum:
                                - pxq
                            - type: string
                              enum:
                                - cogs
                            - type: string
                              enum:
                                - inventory
                            - type: string
                              enum:
                                - outstanding_items
                            - type: string
                              enum:
                                - fixed-assets
                            - type: string
                              enum:
                                - loans
                        entity_id:
                          format: uuid
                          type: string
                        settings:
                          additionalProperties: true
                          type: object
                          properties: {}
                        integration_id:
                          format: uuid
                          type: string
                          nullable: true
                        created_at:
                          format: date-time
                          type: string
                        updated_at:
                          format: date-time
                          type: string
                      required:
                        - id
                        - name
                        - date
                        - budget_type
                        - settings
                        - created_at
                        - updated_at
                  createdAt:
                    format: date-time
                    type: string
                  updatedAt:
                    format: date-time
                    type: string
                required:
                  - id
                  - name
                  - default
                  - active
                  - createdAt
                  - updatedAt
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}:
    get:
      summary: Get a scenarios for a specific forecast
      tags:
        - Scenarios
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  default:
                    type: boolean
                  active:
                    type: boolean
                  budgetVersions:
                    default: []
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        date:
                          format: date
                          type: string
                        budget_type:
                          anyOf:
                            - type: string
                              enum:
                                - budget
                            - type: string
                              enum:
                                - crm
                            - type: string
                              enum:
                                - personnel_costs
                            - type: string
                              enum:
                                - recurring_revenue
                            - type: string
                              enum:
                                - vat
                            - type: string
                              enum:
                                - project_revenue
                            - type: string
                              enum:
                                - pxq
                            - type: string
                              enum:
                                - cogs
                            - type: string
                              enum:
                                - inventory
                            - type: string
                              enum:
                                - outstanding_items
                            - type: string
                              enum:
                                - fixed-assets
                            - type: string
                              enum:
                                - loans
                        entity_id:
                          format: uuid
                          type: string
                        settings:
                          additionalProperties: true
                          type: object
                          properties: {}
                        integration_id:
                          format: uuid
                          type: string
                          nullable: true
                        created_at:
                          format: date-time
                          type: string
                        updated_at:
                          format: date-time
                          type: string
                      required:
                        - id
                        - name
                        - date
                        - budget_type
                        - settings
                        - created_at
                        - updated_at
                  createdAt:
                    format: date-time
                    type: string
                  updatedAt:
                    format: date-time
                    type: string
                required:
                  - id
                  - name
                  - default
                  - active
                  - createdAt
                  - updatedAt
    patch:
      summary: Update an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              minProperties: 1
              type: object
              properties:
                name:
                  minLength: 1
                  type: string
                default:
                  type: boolean
                  enum:
                    - true
                active:
                  type: boolean
                  enum:
                    - true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "204":
          description: Succesfully updated the scenario
    delete:
      summary: Delete an existing scenario
      tags:
        - Scenarios
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "204":
          description: Succesfully deleted the scenario
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/fixed-assets:
    post:
      summary: Create a new fixed assets budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                categories:
                  type: array
                  items:
                    allOf:
                      - type: object
                        allOf:
                          - type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              name:
                                type: string
                              method:
                                anyOf:
                                  - type: "null"
                                  - anyOf:
                                      - type: string
                                        enum:
                                          - linear
                                      - type: string
                                        enum:
                                          - degressive
                              maxPercentage:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              percentageLinear:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              percentageDegressive:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              interval:
                                anyOf:
                                  - type: "null"
                                  - anyOf:
                                      - type: string
                                        enum:
                                          - day
                                      - type: string
                                        enum:
                                          - week
                                      - type: string
                                        enum:
                                          - month
                                      - type: string
                                        enum:
                                          - quarter
                                      - type: string
                                        enum:
                                          - year
                            required:
                              - id
                              - name
                              - method
                              - maxPercentage
                              - percentageLinear
                              - percentageDegressive
                              - interval
                          - type: object
                            properties:
                              fixedAssetsIntegrationCategoryId:
                                format: uuid
                                type: string
                                nullable: true
                              capitalisationMappingId:
                                format: uuid
                                type: string
                              depreciationPlMappingId:
                                format: uuid
                                type: string
                              depreciationBsMappingId:
                                format: uuid
                                type: string
                            required:
                              - fixedAssetsIntegrationCategoryId
                              - capitalisationMappingId
                              - depreciationPlMappingId
                              - depreciationBsMappingId
                      - type: object
                        properties:
                          budgetVersionId:
                            format: uuid
                            type: string
                            nullable: true
                        required:
                          - budgetVersionId
                items:
                  type: array
                  items:
                    allOf:
                      - type: object
                        allOf:
                          - type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              categoryId:
                                format: uuid
                                type: string
                              name:
                                type: string
                              method:
                                anyOf:
                                  - type: string
                                    enum:
                                      - linear
                                  - type: string
                                    enum:
                                      - degressive
                              maxPercentage:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              percentageLinear:
                                minimum: 0
                                maximum: 10000
                                type: number
                              percentageDegressive:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              interval:
                                anyOf:
                                  - type: string
                                    enum:
                                      - day
                                  - type: string
                                    enum:
                                      - week
                                  - type: string
                                    enum:
                                      - month
                                  - type: string
                                    enum:
                                      - quarter
                                  - type: string
                                    enum:
                                      - year
                              startDate:
                                format: date
                                type: string
                              amount:
                                type: number
                              residualValue:
                                type: number
                            required:
                              - id
                              - categoryId
                              - name
                              - method
                              - maxPercentage
                              - percentageLinear
                              - percentageDegressive
                              - interval
                              - startDate
                              - amount
                              - residualValue
                          - type: object
                            properties:
                              fixedAssetsIntegrationItemId:
                                format: uuid
                                type: string
                                nullable: true
                              hasConnectedLoan:
                                type: boolean
                            required:
                              - fixedAssetsIntegrationItemId
                              - hasConnectedLoan
                      - type: object
                        properties:
                          budgetVersionId:
                            format: uuid
                            type: string
                            nullable: true
                        required:
                          - budgetVersionId
              required:
                - budgetVersion
                - categories
                - items
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/fixed-assets/{budgetVersionId}:
    put:
      summary: Update a fixed assets budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                categories:
                  type: array
                  items:
                    allOf:
                      - type: object
                        allOf:
                          - type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              name:
                                type: string
                              method:
                                anyOf:
                                  - type: "null"
                                  - anyOf:
                                      - type: string
                                        enum:
                                          - linear
                                      - type: string
                                        enum:
                                          - degressive
                              maxPercentage:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              percentageLinear:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              percentageDegressive:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              interval:
                                anyOf:
                                  - type: "null"
                                  - anyOf:
                                      - type: string
                                        enum:
                                          - day
                                      - type: string
                                        enum:
                                          - week
                                      - type: string
                                        enum:
                                          - month
                                      - type: string
                                        enum:
                                          - quarter
                                      - type: string
                                        enum:
                                          - year
                            required:
                              - id
                              - name
                              - method
                              - maxPercentage
                              - percentageLinear
                              - percentageDegressive
                              - interval
                          - type: object
                            properties:
                              fixedAssetsIntegrationCategoryId:
                                format: uuid
                                type: string
                                nullable: true
                              capitalisationMappingId:
                                format: uuid
                                type: string
                              depreciationPlMappingId:
                                format: uuid
                                type: string
                              depreciationBsMappingId:
                                format: uuid
                                type: string
                            required:
                              - fixedAssetsIntegrationCategoryId
                              - capitalisationMappingId
                              - depreciationPlMappingId
                              - depreciationBsMappingId
                      - type: object
                        properties:
                          budgetVersionId:
                            format: uuid
                            type: string
                            nullable: true
                        required:
                          - budgetVersionId
                items:
                  type: array
                  items:
                    allOf:
                      - type: object
                        allOf:
                          - type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              categoryId:
                                format: uuid
                                type: string
                              name:
                                type: string
                              method:
                                anyOf:
                                  - type: string
                                    enum:
                                      - linear
                                  - type: string
                                    enum:
                                      - degressive
                              maxPercentage:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              percentageLinear:
                                minimum: 0
                                maximum: 10000
                                type: number
                              percentageDegressive:
                                minimum: 0
                                maximum: 10000
                                type: number
                                nullable: true
                              interval:
                                anyOf:
                                  - type: string
                                    enum:
                                      - day
                                  - type: string
                                    enum:
                                      - week
                                  - type: string
                                    enum:
                                      - month
                                  - type: string
                                    enum:
                                      - quarter
                                  - type: string
                                    enum:
                                      - year
                              startDate:
                                format: date
                                type: string
                              amount:
                                type: number
                              residualValue:
                                type: number
                            required:
                              - id
                              - categoryId
                              - name
                              - method
                              - maxPercentage
                              - percentageLinear
                              - percentageDegressive
                              - interval
                              - startDate
                              - amount
                              - residualValue
                          - type: object
                            properties:
                              fixedAssetsIntegrationItemId:
                                format: uuid
                                type: string
                                nullable: true
                              hasConnectedLoan:
                                type: boolean
                            required:
                              - fixedAssetsIntegrationItemId
                              - hasConnectedLoan
                      - type: object
                        properties:
                          budgetVersionId:
                            format: uuid
                            type: string
                            nullable: true
                        required:
                          - budgetVersionId
              required:
                - budgetVersion
                - categories
                - items
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/loans:
    post:
      summary: Create a new loans budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                loans:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          name:
                            type: string
                          loanType:
                            anyOf:
                              - type: string
                                enum:
                                  - term_loan
                              - type: string
                                enum:
                                  - straight_loan
                              - type: string
                                enum:
                                  - bullet_loan
                          interestRate:
                            type: number
                          duration:
                            type: number
                          repaymentDetails:
                            type: object
                            properties:
                              startDate:
                                format: date
                                type: string
                              startDateType:
                                anyOf:
                                  - type: string
                                    enum:
                                      - fixed
                                  - type: string
                                    enum:
                                      - drawdownCompleted
                              periodicity:
                                anyOf:
                                  - type: string
                                    enum:
                                      - day
                                  - type: string
                                    enum:
                                      - week
                                  - type: string
                                    enum:
                                      - month
                                  - type: string
                                    enum:
                                      - quarter
                                  - type: string
                                    enum:
                                      - year
                              payBackLoanedAmount:
                                type: boolean
                              payInterestDuringRepayment:
                                type: boolean
                            required:
                              - startDate
                              - startDateType
                              - periodicity
                              - payBackLoanedAmount
                              - payInterestDuringRepayment
                          drawdownDetails:
                            anyOf:
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - single
                                  startDate:
                                    format: date
                                    type: string
                                  amount:
                                    type: number
                                required:
                                  - type
                                  - startDate
                                  - amount
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - multiple
                                  drawdowns:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        date:
                                          format: date
                                          type: string
                                        amount:
                                          type: number
                                      required:
                                        - date
                                        - amount
                                  reservationInterestRate:
                                    type: number
                                required:
                                  - type
                                  - drawdowns
                                  - reservationInterestRate
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - asset
                                  startDate:
                                    format: date
                                    type: string
                                  percentage:
                                    type: number
                                  totalAssetValue:
                                    type: number
                                required:
                                  - type
                                  - startDate
                                  - percentage
                                  - totalAssetValue
                          gracePeriods:
                            type: array
                            items:
                              type: object
                              properties:
                                startDate:
                                  format: date
                                  type: string
                                endDate:
                                  format: date
                                  type: string
                                interestRate:
                                  type: number
                                paymentOfInterest:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - duringGracePeriod
                                    - type: string
                                      enum:
                                        - afterGracePeriod
                                    - type: string
                                      enum:
                                        - partOfDrawdown
                                partOfRepaymentPeriod:
                                  type: boolean
                              required:
                                - startDate
                                - endDate
                                - interestRate
                                - paymentOfInterest
                                - partOfRepaymentPeriod
                            nullable: true
                          fixedAssetsItemId:
                            format: uuid
                            type: string
                            nullable: true
                          principalMappingId:
                            format: uuid
                            type: string
                          interestMappingId:
                            format: uuid
                            type: string
                          reservationInterestMappingId:
                            format: uuid
                            type: string
                            nullable: true
                          entityId:
                            format: uuid
                            type: string
                        required:
                          - id
                          - name
                          - loanType
                          - interestRate
                          - duration
                          - repaymentDetails
                          - drawdownDetails
                          - gracePeriods
                          - fixedAssetsItemId
                          - principalMappingId
                          - interestMappingId
                          - reservationInterestMappingId
                          - entityId
                      - type: object
                        properties:
                          budgetVersionId:
                            format: uuid
                            type: string
                            nullable: true
                        required:
                          - budgetVersionId
              required:
                - budgetVersion
                - loans
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/loans/{budgetVersionId}:
    put:
      summary: Update a loans budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                loans:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          name:
                            type: string
                          loanType:
                            anyOf:
                              - type: string
                                enum:
                                  - term_loan
                              - type: string
                                enum:
                                  - straight_loan
                              - type: string
                                enum:
                                  - bullet_loan
                          interestRate:
                            type: number
                          duration:
                            type: number
                          repaymentDetails:
                            type: object
                            properties:
                              startDate:
                                format: date
                                type: string
                              startDateType:
                                anyOf:
                                  - type: string
                                    enum:
                                      - fixed
                                  - type: string
                                    enum:
                                      - drawdownCompleted
                              periodicity:
                                anyOf:
                                  - type: string
                                    enum:
                                      - day
                                  - type: string
                                    enum:
                                      - week
                                  - type: string
                                    enum:
                                      - month
                                  - type: string
                                    enum:
                                      - quarter
                                  - type: string
                                    enum:
                                      - year
                              payBackLoanedAmount:
                                type: boolean
                              payInterestDuringRepayment:
                                type: boolean
                            required:
                              - startDate
                              - startDateType
                              - periodicity
                              - payBackLoanedAmount
                              - payInterestDuringRepayment
                          drawdownDetails:
                            anyOf:
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - single
                                  startDate:
                                    format: date
                                    type: string
                                  amount:
                                    type: number
                                required:
                                  - type
                                  - startDate
                                  - amount
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - multiple
                                  drawdowns:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        date:
                                          format: date
                                          type: string
                                        amount:
                                          type: number
                                      required:
                                        - date
                                        - amount
                                  reservationInterestRate:
                                    type: number
                                required:
                                  - type
                                  - drawdowns
                                  - reservationInterestRate
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - asset
                                  startDate:
                                    format: date
                                    type: string
                                  percentage:
                                    type: number
                                  totalAssetValue:
                                    type: number
                                required:
                                  - type
                                  - startDate
                                  - percentage
                                  - totalAssetValue
                          gracePeriods:
                            type: array
                            items:
                              type: object
                              properties:
                                startDate:
                                  format: date
                                  type: string
                                endDate:
                                  format: date
                                  type: string
                                interestRate:
                                  type: number
                                paymentOfInterest:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - duringGracePeriod
                                    - type: string
                                      enum:
                                        - afterGracePeriod
                                    - type: string
                                      enum:
                                        - partOfDrawdown
                                partOfRepaymentPeriod:
                                  type: boolean
                              required:
                                - startDate
                                - endDate
                                - interestRate
                                - paymentOfInterest
                                - partOfRepaymentPeriod
                            nullable: true
                          fixedAssetsItemId:
                            format: uuid
                            type: string
                            nullable: true
                          principalMappingId:
                            format: uuid
                            type: string
                          interestMappingId:
                            format: uuid
                            type: string
                          reservationInterestMappingId:
                            format: uuid
                            type: string
                            nullable: true
                          entityId:
                            format: uuid
                            type: string
                        required:
                          - id
                          - name
                          - loanType
                          - interestRate
                          - duration
                          - repaymentDetails
                          - drawdownDetails
                          - gracePeriods
                          - fixedAssetsItemId
                          - principalMappingId
                          - interestMappingId
                          - reservationInterestMappingId
                          - entityId
                      - type: object
                        properties:
                          budgetVersionId:
                            format: uuid
                            type: string
                            nullable: true
                        required:
                          - budgetVersionId
              required:
                - budgetVersion
                - loans
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/recurring-revenue:
    post:
      summary: Create a new recurring revenue budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscriptionMgmtProducts:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          vendorId:
                            type: string
                            nullable: true
                          name:
                            type: string
                          description:
                            type: string
                            nullable: true
                          unitCost:
                            type: number
                            nullable: true
                          price:
                            type: number
                            nullable: true
                          recurring:
                            type: boolean
                          archived:
                            type: boolean
                          entityId:
                            format: uuid
                            type: string
                          integrationId:
                            format: uuid
                            type: string
                            nullable: true
                          budgetAccountId:
                            type: string
                            nullable: true
                          productRevenues:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                                budgetVersionId:
                                  format: uuid
                                  type: string
                                productId:
                                  format: uuid
                                  type: string
                                entityId:
                                  format: uuid
                                  type: string
                                createdAt:
                                  type: string
                                updatedAt:
                                  type: string
                                productsRevenueChannels:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      productRevenueId:
                                        format: uuid
                                        type: string
                                      revenueChannel:
                                        type: object
                                        properties:
                                          id:
                                            format: uuid
                                            type: string
                                          name:
                                            minLength: 1
                                            type: string
                                          budgetVersionId:
                                            format: uuid
                                            type: string
                                          entityId:
                                            format: uuid
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - budgetVersionId
                                          - entityId
                                        nullable: true
                                      productsRevenueItems:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            productRevenueId:
                                              format: uuid
                                              type: string
                                            productsRevenueChannelId:
                                              format: uuid
                                              type: string
                                            datePeriod:
                                              format: date
                                              type: string
                                            price:
                                              type: number
                                            quantity:
                                              type: number
                                            entityId:
                                              format: uuid
                                              type: string
                                            createdAt:
                                              type: string
                                            updatedAt:
                                              type: string
                                          required:
                                            - productRevenueId
                                            - productsRevenueChannelId
                                            - datePeriod
                                            - price
                                            - quantity
                                            - entityId
                                            - createdAt
                                            - updatedAt
                                      budgetAccountId:
                                        type: string
                                      entityId:
                                        format: uuid
                                        type: string
                                      createdAt:
                                        type: string
                                      updatedAt:
                                        type: string
                                      accountAnalyticalAxisId:
                                        format: uuid
                                        type: string
                                        nullable: true
                                    required:
                                      - id
                                      - productRevenueId
                                      - revenueChannel
                                      - productsRevenueItems
                                      - budgetAccountId
                                      - entityId
                                      - createdAt
                                      - updatedAt
                              required:
                                - id
                                - budgetVersionId
                                - productId
                                - entityId
                                - createdAt
                                - updatedAt
                                - productsRevenueChannels
                        required:
                          - id
                          - vendorId
                          - name
                          - description
                          - unitCost
                          - price
                          - recurring
                          - archived
                          - entityId
                          - integrationId
                          - budgetAccountId
                      - type: object
                        properties:
                          recurringRevenueProducts:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  churn:
                                    type: number
                                required:
                                  - churn
                              - type: object
                                properties:
                                  startDate:
                                    format: date
                                    type: string
                                  endDate:
                                    format: date
                                    type: string
                                  recurringRevenueAccountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                  revenueRecognitionAccountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                required:
                                  - startDate
                                  - endDate
                                  - recurringRevenueAccountAnalyticalAxisId
                                  - revenueRecognitionAccountAnalyticalAxisId
                        required:
                          - recurringRevenueProducts
                subscriptionModelProducts:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          vendorId:
                            type: string
                            nullable: true
                          name:
                            type: string
                          description:
                            type: string
                            nullable: true
                          unitCost:
                            type: number
                            nullable: true
                          price:
                            type: number
                            nullable: true
                          recurring:
                            type: boolean
                          archived:
                            type: boolean
                          entityId:
                            format: uuid
                            type: string
                          integrationId:
                            format: uuid
                            type: string
                            nullable: true
                          budgetAccountId:
                            type: string
                            nullable: true
                          productRevenues:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                                budgetVersionId:
                                  format: uuid
                                  type: string
                                productId:
                                  format: uuid
                                  type: string
                                entityId:
                                  format: uuid
                                  type: string
                                createdAt:
                                  type: string
                                updatedAt:
                                  type: string
                                productsRevenueChannels:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      productRevenueId:
                                        format: uuid
                                        type: string
                                      revenueChannel:
                                        type: object
                                        properties:
                                          id:
                                            format: uuid
                                            type: string
                                          name:
                                            minLength: 1
                                            type: string
                                          budgetVersionId:
                                            format: uuid
                                            type: string
                                          entityId:
                                            format: uuid
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - budgetVersionId
                                          - entityId
                                        nullable: true
                                      productsRevenueItems:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            productRevenueId:
                                              format: uuid
                                              type: string
                                            productsRevenueChannelId:
                                              format: uuid
                                              type: string
                                            datePeriod:
                                              format: date
                                              type: string
                                            price:
                                              type: number
                                            quantity:
                                              type: number
                                            entityId:
                                              format: uuid
                                              type: string
                                            createdAt:
                                              type: string
                                            updatedAt:
                                              type: string
                                          required:
                                            - productRevenueId
                                            - productsRevenueChannelId
                                            - datePeriod
                                            - price
                                            - quantity
                                            - entityId
                                            - createdAt
                                            - updatedAt
                                      budgetAccountId:
                                        type: string
                                      entityId:
                                        format: uuid
                                        type: string
                                      createdAt:
                                        type: string
                                      updatedAt:
                                        type: string
                                      accountAnalyticalAxisId:
                                        format: uuid
                                        type: string
                                        nullable: true
                                    required:
                                      - id
                                      - productRevenueId
                                      - revenueChannel
                                      - productsRevenueItems
                                      - budgetAccountId
                                      - entityId
                                      - createdAt
                                      - updatedAt
                              required:
                                - id
                                - budgetVersionId
                                - productId
                                - entityId
                                - createdAt
                                - updatedAt
                                - productsRevenueChannels
                        required:
                          - id
                          - vendorId
                          - name
                          - description
                          - unitCost
                          - price
                          - recurring
                          - archived
                          - entityId
                          - integrationId
                          - budgetAccountId
                      - type: object
                        properties:
                          recurringRevenueProducts:
                            allOf:
                              - type: object
                                allOf:
                                  - type: object
                                    properties:
                                      productId:
                                        format: uuid
                                        type: string
                                      churn:
                                        type: number
                                      periods:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            period:
                                              type: string
                                            interval:
                                              type: number
                                            distribution:
                                              type: number
                                            avgRevenue:
                                              type: number
                                          required:
                                            - period
                                            - interval
                                            - distribution
                                            - avgRevenue
                                    required:
                                      - productId
                                      - churn
                                      - periods
                                  - type: object
                                    properties:
                                      newCustomers:
                                        type: number
                                      monthlyGrowth:
                                        type: number
                                      startDate:
                                        format: date
                                        type: string
                                      endDate:
                                        format: date
                                        type: string
                                    required:
                                      - newCustomers
                                      - monthlyGrowth
                                      - startDate
                                      - endDate
                              - type: object
                                properties:
                                  recurringRevenueAccountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                  revenueRecognitionAccountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                required:
                                  - recurringRevenueAccountAnalyticalAxisId
                                  - revenueRecognitionAccountAnalyticalAxisId
                        required:
                          - recurringRevenueProducts
                budgetVersion:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        name:
                          minLength: 1
                          type: string
                        startDate:
                          format: date
                          type: string
                        endDate:
                          format: date
                          type: string
                      required:
                        - name
                        - startDate
                        - endDate
                    - type: object
                      properties:
                        subscriptionMgmtIsActive:
                          type: boolean
                        budgetType:
                          anyOf:
                            - type: string
                              enum:
                                - dynamic
                            - type: string
                              enum:
                                - snapshot
                      required:
                        - subscriptionMgmtIsActive
                        - budgetType
              required:
                - subscriptionMgmtProducts
                - subscriptionModelProducts
                - budgetVersion
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/recurring-revenue/{budgetVersionId}:
    put:
      summary: Update a recurring revenue budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscriptionMgmtProducts:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          vendorId:
                            type: string
                            nullable: true
                          name:
                            type: string
                          description:
                            type: string
                            nullable: true
                          unitCost:
                            type: number
                            nullable: true
                          price:
                            type: number
                            nullable: true
                          recurring:
                            type: boolean
                          archived:
                            type: boolean
                          entityId:
                            format: uuid
                            type: string
                          integrationId:
                            format: uuid
                            type: string
                            nullable: true
                          budgetAccountId:
                            type: string
                            nullable: true
                          productRevenues:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                                budgetVersionId:
                                  format: uuid
                                  type: string
                                productId:
                                  format: uuid
                                  type: string
                                entityId:
                                  format: uuid
                                  type: string
                                createdAt:
                                  type: string
                                updatedAt:
                                  type: string
                                productsRevenueChannels:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      productRevenueId:
                                        format: uuid
                                        type: string
                                      revenueChannel:
                                        type: object
                                        properties:
                                          id:
                                            format: uuid
                                            type: string
                                          name:
                                            minLength: 1
                                            type: string
                                          budgetVersionId:
                                            format: uuid
                                            type: string
                                          entityId:
                                            format: uuid
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - budgetVersionId
                                          - entityId
                                        nullable: true
                                      productsRevenueItems:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            productRevenueId:
                                              format: uuid
                                              type: string
                                            productsRevenueChannelId:
                                              format: uuid
                                              type: string
                                            datePeriod:
                                              format: date
                                              type: string
                                            price:
                                              type: number
                                            quantity:
                                              type: number
                                            entityId:
                                              format: uuid
                                              type: string
                                            createdAt:
                                              type: string
                                            updatedAt:
                                              type: string
                                          required:
                                            - productRevenueId
                                            - productsRevenueChannelId
                                            - datePeriod
                                            - price
                                            - quantity
                                            - entityId
                                            - createdAt
                                            - updatedAt
                                      budgetAccountId:
                                        type: string
                                      entityId:
                                        format: uuid
                                        type: string
                                      createdAt:
                                        type: string
                                      updatedAt:
                                        type: string
                                      accountAnalyticalAxisId:
                                        format: uuid
                                        type: string
                                        nullable: true
                                    required:
                                      - id
                                      - productRevenueId
                                      - revenueChannel
                                      - productsRevenueItems
                                      - budgetAccountId
                                      - entityId
                                      - createdAt
                                      - updatedAt
                              required:
                                - id
                                - budgetVersionId
                                - productId
                                - entityId
                                - createdAt
                                - updatedAt
                                - productsRevenueChannels
                        required:
                          - id
                          - vendorId
                          - name
                          - description
                          - unitCost
                          - price
                          - recurring
                          - archived
                          - entityId
                          - integrationId
                          - budgetAccountId
                      - type: object
                        properties:
                          recurringRevenueProducts:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  churn:
                                    type: number
                                required:
                                  - churn
                              - type: object
                                properties:
                                  startDate:
                                    format: date
                                    type: string
                                  endDate:
                                    format: date
                                    type: string
                                  recurringRevenueAccountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                  revenueRecognitionAccountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                required:
                                  - startDate
                                  - endDate
                                  - recurringRevenueAccountAnalyticalAxisId
                                  - revenueRecognitionAccountAnalyticalAxisId
                        required:
                          - recurringRevenueProducts
                subscriptionModelProducts:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          vendorId:
                            type: string
                            nullable: true
                          name:
                            type: string
                          description:
                            type: string
                            nullable: true
                          unitCost:
                            type: number
                            nullable: true
                          price:
                            type: number
                            nullable: true
                          recurring:
                            type: boolean
                          archived:
                            type: boolean
                          entityId:
                            format: uuid
                            type: string
                          integrationId:
                            format: uuid
                            type: string
                            nullable: true
                          budgetAccountId:
                            type: string
                            nullable: true
                          productRevenues:
                            type: array
                            items:
                              type: object
                              properties:
                                id:
                                  format: uuid
                                  type: string
                                budgetVersionId:
                                  format: uuid
                                  type: string
                                productId:
                                  format: uuid
                                  type: string
                                entityId:
                                  format: uuid
                                  type: string
                                createdAt:
                                  type: string
                                updatedAt:
                                  type: string
                                productsRevenueChannels:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      productRevenueId:
                                        format: uuid
                                        type: string
                                      revenueChannel:
                                        type: object
                                        properties:
                                          id:
                                            format: uuid
                                            type: string
                                          name:
                                            minLength: 1
                                            type: string
                                          budgetVersionId:
                                            format: uuid
                                            type: string
                                          entityId:
                                            format: uuid
                                            type: string
                                        required:
                                          - id
                                          - name
                                          - budgetVersionId
                                          - entityId
                                        nullable: true
                                      productsRevenueItems:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            productRevenueId:
                                              format: uuid
                                              type: string
                                            productsRevenueChannelId:
                                              format: uuid
                                              type: string
                                            datePeriod:
                                              format: date
                                              type: string
                                            price:
                                              type: number
                                            quantity:
                                              type: number
                                            entityId:
                                              format: uuid
                                              type: string
                                            createdAt:
                                              type: string
                                            updatedAt:
                                              type: string
                                          required:
                                            - productRevenueId
                                            - productsRevenueChannelId
                                            - datePeriod
                                            - price
                                            - quantity
                                            - entityId
                                            - createdAt
                                            - updatedAt
                                      budgetAccountId:
                                        type: string
                                      entityId:
                                        format: uuid
                                        type: string
                                      createdAt:
                                        type: string
                                      updatedAt:
                                        type: string
                                      accountAnalyticalAxisId:
                                        format: uuid
                                        type: string
                                        nullable: true
                                    required:
                                      - id
                                      - productRevenueId
                                      - revenueChannel
                                      - productsRevenueItems
                                      - budgetAccountId
                                      - entityId
                                      - createdAt
                                      - updatedAt
                              required:
                                - id
                                - budgetVersionId
                                - productId
                                - entityId
                                - createdAt
                                - updatedAt
                                - productsRevenueChannels
                        required:
                          - id
                          - vendorId
                          - name
                          - description
                          - unitCost
                          - price
                          - recurring
                          - archived
                          - entityId
                          - integrationId
                          - budgetAccountId
                      - type: object
                        properties:
                          recurringRevenueProducts:
                            allOf:
                              - type: object
                                allOf:
                                  - type: object
                                    properties:
                                      productId:
                                        format: uuid
                                        type: string
                                      churn:
                                        type: number
                                      periods:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            period:
                                              type: string
                                            interval:
                                              type: number
                                            distribution:
                                              type: number
                                            avgRevenue:
                                              type: number
                                          required:
                                            - period
                                            - interval
                                            - distribution
                                            - avgRevenue
                                    required:
                                      - productId
                                      - churn
                                      - periods
                                  - type: object
                                    properties:
                                      newCustomers:
                                        type: number
                                      monthlyGrowth:
                                        type: number
                                      startDate:
                                        format: date
                                        type: string
                                      endDate:
                                        format: date
                                        type: string
                                    required:
                                      - newCustomers
                                      - monthlyGrowth
                                      - startDate
                                      - endDate
                              - type: object
                                properties:
                                  recurringRevenueAccountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                  revenueRecognitionAccountAnalyticalAxisId:
                                    format: uuid
                                    type: string
                                required:
                                  - recurringRevenueAccountAnalyticalAxisId
                                  - revenueRecognitionAccountAnalyticalAxisId
                        required:
                          - recurringRevenueProducts
                budgetVersion:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        name:
                          minLength: 1
                          type: string
                        startDate:
                          format: date
                          type: string
                        endDate:
                          format: date
                          type: string
                      required:
                        - name
                        - startDate
                        - endDate
                    - type: object
                      properties:
                        subscriptionMgmtIsActive:
                          type: boolean
                        budgetType:
                          anyOf:
                            - type: string
                              enum:
                                - dynamic
                            - type: string
                              enum:
                                - snapshot
                      required:
                        - subscriptionMgmtIsActive
                        - budgetType
              required:
                - subscriptionMgmtProducts
                - subscriptionModelProducts
                - budgetVersion
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/project-revenue:
    post:
      summary: Create a new project revenue budget
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                integration:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    rollingWindow:
                      minimum: 0
                      type: number
                  required:
                    - id
                    - rollingWindow
                  nullable: true
                personnelCostsBudgetVersionId:
                  type: string
                employees:
                  type: array
                  items:
                    type: object
                    properties:
                      projectIntegrationEmployeeId:
                        format: uuid
                        type: string
                        nullable: true
                      personnelCostsEmployeeId:
                        format: uuid
                        type: string
                      budgetAccount:
                        type: object
                        properties:
                          id:
                            type: string
                            nullable: true
                          name:
                            type: string
                          accountAnalyticalAxisId:
                            format: uuid
                            type: string
                        required:
                          - id
                          - name
                          - accountAnalyticalAxisId
                      revenueParameters:
                        type: array
                        items:
                          type: object
                          properties:
                            month:
                              format: date
                              type: string
                            active:
                              type: boolean
                            rate:
                              minimum: 0
                              type: number
                            billability:
                              minimum: 0
                              exclusiveMaximum: 10
                              type: number
                          required:
                            - month
                            - active
                            - rate
                            - billability
                    required:
                      - projectIntegrationEmployeeId
                      - personnelCostsEmployeeId
                      - budgetAccount
                      - revenueParameters
              required:
                - budgetVersion
                - integration
                - personnelCostsBudgetVersionId
                - employees
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/project-revenue/{budgetVersionId}:
    put:
      summary: Update a project revenue budget
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                personnelCostsBudgetVersionId:
                  type: string
                integration:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    rollingWindow:
                      minimum: 0
                      type: number
                  required:
                    - id
                    - rollingWindow
                  nullable: true
                employees:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          projectIntegrationEmployeeId:
                            format: uuid
                            type: string
                            nullable: true
                          personnelCostsEmployeeId:
                            format: uuid
                            type: string
                          budgetAccount:
                            type: object
                            properties:
                              id:
                                type: string
                                nullable: true
                              name:
                                type: string
                              accountAnalyticalAxisId:
                                format: uuid
                                type: string
                            required:
                              - id
                              - name
                              - accountAnalyticalAxisId
                          revenueParameters:
                            type: array
                            items:
                              type: object
                              properties:
                                month:
                                  format: date
                                  type: string
                                active:
                                  type: boolean
                                rate:
                                  minimum: 0
                                  type: number
                                billability:
                                  minimum: 0
                                  exclusiveMaximum: 10
                                  type: number
                              required:
                                - month
                                - active
                                - rate
                                - billability
                        required:
                          - projectIntegrationEmployeeId
                          - personnelCostsEmployeeId
                          - budgetAccount
                          - revenueParameters
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                            nullable: true
                        required:
                          - id
              required:
                - budgetVersion
                - personnelCostsBudgetVersionId
                - integration
                - employees
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/pxq:
    post:
      summary: Create a new Pxq budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                products:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          productId:
                            format: uuid
                            type: string
                        required:
                          - id
                          - productId
                      - type: object
                        properties:
                          name:
                            type: string
                          productsRevenueChannels:
                            type: array
                            items:
                              type: object
                              allOf:
                                - type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                    productRevenueId:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                                    - productRevenueId
                                - type: object
                                  properties:
                                    revenueChannel:
                                      type: object
                                      properties:
                                        id:
                                          format: uuid
                                          type: string
                                        name:
                                          minLength: 1
                                          type: string
                                      required:
                                        - id
                                        - name
                                    productsRevenueItems:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          productRevenueId:
                                            format: uuid
                                            type: string
                                          productsRevenueChannelId:
                                            format: uuid
                                            type: string
                                          datePeriod:
                                            format: date
                                            type: string
                                          price:
                                            type: number
                                          quantity:
                                            type: number
                                        required:
                                          - productRevenueId
                                          - productsRevenueChannelId
                                          - datePeriod
                                          - price
                                          - quantity
                                    accountAnalyticalAxisId:
                                      format: uuid
                                      type: string
                                  required:
                                    - revenueChannel
                                    - productsRevenueItems
                                    - accountAnalyticalAxisId
                        required:
                          - name
                          - productsRevenueChannels
              required:
                - budgetVersion
                - products
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/pxq/{budgetVersionId}:
    put:
      summary: Update a PxQ budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                products:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          productId:
                            format: uuid
                            type: string
                        required:
                          - id
                          - productId
                      - type: object
                        properties:
                          name:
                            type: string
                          productsRevenueChannels:
                            type: array
                            items:
                              type: object
                              allOf:
                                - type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                    productRevenueId:
                                      format: uuid
                                      type: string
                                  required:
                                    - id
                                    - productRevenueId
                                - type: object
                                  properties:
                                    revenueChannel:
                                      type: object
                                      properties:
                                        id:
                                          format: uuid
                                          type: string
                                        name:
                                          minLength: 1
                                          type: string
                                      required:
                                        - id
                                        - name
                                    productsRevenueItems:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          productRevenueId:
                                            format: uuid
                                            type: string
                                          productsRevenueChannelId:
                                            format: uuid
                                            type: string
                                          datePeriod:
                                            format: date
                                            type: string
                                          price:
                                            type: number
                                          quantity:
                                            type: number
                                        required:
                                          - productRevenueId
                                          - productsRevenueChannelId
                                          - datePeriod
                                          - price
                                          - quantity
                                    accountAnalyticalAxisId:
                                      format: uuid
                                      type: string
                                  required:
                                    - revenueChannel
                                    - productsRevenueItems
                                    - accountAnalyticalAxisId
                        required:
                          - name
                          - productsRevenueChannels
              required:
                - budgetVersion
                - products
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/cogs:
    post:
      summary: Create a new COGS budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                products:
                  type: array
                  items:
                    type: object
                    properties:
                      productRevenueId:
                        format: uuid
                        type: string
                      productName:
                        type: string
                      categories:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            dateItems:
                              type: array
                              items:
                                type: object
                                properties:
                                  datePeriod:
                                    format: date
                                    type: string
                                  value:
                                    type: number
                                required:
                                  - datePeriod
                                  - value
                            accountAnalyticalAxisId:
                              format: uuid
                              type: string
                          required:
                            - name
                            - dateItems
                            - accountAnalyticalAxisId
                      productValues:
                        type: array
                        items:
                          type: object
                          properties:
                            datePeriod:
                              format: date
                              type: string
                            avgPrice:
                              type: number
                            quantity:
                              type: number
                          required:
                            - datePeriod
                            - avgPrice
                            - quantity
                    required:
                      - productRevenueId
                      - productName
                      - categories
                      - productValues
                connectedPxqBudgetVersionId:
                  type: string
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
              required:
                - products
                - connectedPxqBudgetVersionId
                - budgetVersion
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/cogs/{budgetVersionId}:
    put:
      summary: Update a COGS budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                products:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          productRevenueId:
                            format: uuid
                            type: string
                          productName:
                            type: string
                          productValues:
                            type: array
                            items:
                              type: object
                              properties:
                                datePeriod:
                                  format: date
                                  type: string
                                avgPrice:
                                  type: number
                                quantity:
                                  type: number
                              required:
                                - datePeriod
                                - avgPrice
                                - quantity
                        required:
                          - productRevenueId
                          - productName
                          - productValues
                      - type: object
                        properties:
                          categories:
                            type: array
                            items:
                              type: object
                              allOf:
                                - type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                - type: object
                                  properties:
                                    name:
                                      type: string
                                    dateItems:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          datePeriod:
                                            format: date
                                            type: string
                                          value:
                                            type: number
                                        required:
                                          - datePeriod
                                          - value
                                    accountAnalyticalAxisId:
                                      format: uuid
                                      type: string
                                  required:
                                    - name
                                    - dateItems
                                    - accountAnalyticalAxisId
                        required:
                          - categories
                connectedPxqBudgetVersionId:
                  type: string
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
              required:
                - products
                - connectedPxqBudgetVersionId
                - budgetVersion
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/inventory:
    post:
      summary: Create a new inventory budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                products:
                  type: array
                  items:
                    additionalProperties: false
                    type: object
                    properties:
                      cogsProductId:
                        format: uuid
                        type: string
                      productName:
                        type: string
                      productValues:
                        type: array
                        items:
                          type: object
                          properties:
                            datePeriod:
                              format: date
                              type: string
                            avgPrice:
                              type: number
                            quantity:
                              type: number
                          required:
                            - datePeriod
                            - avgPrice
                            - quantity
                      category:
                        type: object
                        allOf:
                          - type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                            required:
                              - id
                          - type: object
                            properties:
                              name:
                                type: string
                              dateItems:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    datePeriod:
                                      format: date
                                      type: string
                                    value:
                                      type: number
                                  required:
                                    - datePeriod
                                    - value
                              accountAnalyticalAxisId:
                                format: uuid
                                type: string
                            required:
                              - name
                              - dateItems
                              - accountAnalyticalAxisId
                      productInventoryTransactions:
                        type: array
                        items:
                          additionalProperties: false
                          type: object
                          properties:
                            datePeriod:
                              format: date
                              type: string
                            purchaseAmount:
                              type: number
                          required:
                            - datePeriod
                            - purchaseAmount
                      startBalance:
                        type: number
                      safetyStock:
                        type: number
                      prepayments:
                        type: array
                        items:
                          additionalProperties: false
                          type: object
                          properties:
                            monthsBefore:
                              type: number
                            percentage:
                              maximum: 10000
                              type: number
                          required:
                            - monthsBefore
                            - percentage
                      inventoryAccountAnalyticalAxisId:
                        format: uuid
                        type: string
                      prepaymentAccountAnalyticalAxisId:
                        format: uuid
                        type: string
                    required:
                      - cogsProductId
                      - productName
                      - productValues
                      - category
                      - productInventoryTransactions
                      - startBalance
                      - safetyStock
                      - prepayments
                      - inventoryAccountAnalyticalAxisId
                      - prepaymentAccountAnalyticalAxisId
                connectedCogsBudgetVersionId:
                  type: string
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
              required:
                - products
                - connectedCogsBudgetVersionId
                - budgetVersion
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/inventory/{budgetVersionId}:
    put:
      summary: Update an Inventory budget version for an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                products:
                  type: array
                  items:
                    additionalProperties: false
                    type: object
                    properties:
                      cogsProductId:
                        format: uuid
                        type: string
                      productName:
                        type: string
                      productValues:
                        type: array
                        items:
                          type: object
                          properties:
                            datePeriod:
                              format: date
                              type: string
                            avgPrice:
                              type: number
                            quantity:
                              type: number
                          required:
                            - datePeriod
                            - avgPrice
                            - quantity
                      category:
                        type: object
                        allOf:
                          - type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                            required:
                              - id
                          - type: object
                            properties:
                              name:
                                type: string
                              dateItems:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    datePeriod:
                                      format: date
                                      type: string
                                    value:
                                      type: number
                                  required:
                                    - datePeriod
                                    - value
                              accountAnalyticalAxisId:
                                format: uuid
                                type: string
                            required:
                              - name
                              - dateItems
                              - accountAnalyticalAxisId
                      productInventoryTransactions:
                        type: array
                        items:
                          additionalProperties: false
                          type: object
                          properties:
                            datePeriod:
                              format: date
                              type: string
                            purchaseAmount:
                              type: number
                          required:
                            - datePeriod
                            - purchaseAmount
                      startBalance:
                        type: number
                      safetyStock:
                        type: number
                      prepayments:
                        type: array
                        items:
                          additionalProperties: false
                          type: object
                          properties:
                            monthsBefore:
                              type: number
                            percentage:
                              maximum: 10000
                              type: number
                          required:
                            - monthsBefore
                            - percentage
                      inventoryAccountAnalyticalAxisId:
                        format: uuid
                        type: string
                      prepaymentAccountAnalyticalAxisId:
                        format: uuid
                        type: string
                    required:
                      - cogsProductId
                      - productName
                      - productValues
                      - category
                      - productInventoryTransactions
                      - startBalance
                      - safetyStock
                      - prepayments
                      - inventoryAccountAnalyticalAxisId
                      - prepaymentAccountAnalyticalAxisId
                connectedCogsBudgetVersionId:
                  type: string
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
              required:
                - products
                - connectedCogsBudgetVersionId
                - budgetVersion
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions/project-revenue/{budgetVersionId}:
    get:
      summary: Get a project revenue budget by id
      tags:
        - Budgets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  personnelCostsBudgetVersion:
                    type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      startDate:
                        format: date
                        type: string
                      endDate:
                        format: date
                        type: string
                    required:
                      - id
                      - startDate
                      - endDate
                  integration:
                    type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      rollingWindow:
                        minimum: 0
                        type: number
                    required:
                      - id
                      - rollingWindow
                    nullable: true
                  employees:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        personnelCostsEmployee:
                          type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            firstName:
                              type: string
                            lastName:
                              type: string
                          required:
                            - id
                            - firstName
                            - lastName
                        projectIntegrationEmployee:
                          type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            firstName:
                              type: string
                            lastName:
                              type: string
                          required:
                            - id
                            - firstName
                            - lastName
                          nullable: true
                        budgetAccount:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            accountAnalyticalAxisId:
                              format: uuid
                              type: string
                              nullable: true
                          required:
                            - id
                            - name
                            - accountAnalyticalAxisId
                        revenueParameters:
                          type: array
                          items:
                            type: object
                            properties:
                              month:
                                format: date
                                type: string
                              active:
                                type: boolean
                              rate:
                                minimum: 0
                                type: number
                              billability:
                                minimum: 0
                                exclusiveMaximum: 10
                                type: number
                            required:
                              - month
                              - active
                              - rate
                              - billability
                      required:
                        - id
                        - personnelCostsEmployee
                        - projectIntegrationEmployee
                        - budgetAccount
                        - revenueParameters
                required:
                  - personnelCostsBudgetVersion
                  - integration
                  - employees
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/personnel-costs:
    post:
      summary: Create a new personnel costs budget version
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                departments:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      employees:
                        type: array
                        items:
                          type: object
                          properties:
                            budgetAccount:
                              type: object
                              properties:
                                id:
                                  type: string
                                  nullable: true
                                name:
                                  type: string
                                accountAnalyticalAxisId:
                                  format: uuid
                                  type: string
                              required:
                                - id
                                - name
                                - accountAnalyticalAxisId
                            firstName:
                              type: string
                            lastName:
                              type: string
                            jobTitle:
                              type: string
                              nullable: true
                            wage:
                              anyOf:
                                - type: object
                                  properties:
                                    raises:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          month:
                                            format: date
                                            type: string
                                          percentage:
                                            min: 0
                                            type: number
                                        required:
                                          - month
                                          - percentage
                                    baseAmount:
                                      min: 0
                                      type: number
                                    type:
                                      type: string
                                      enum:
                                        - payroll
                                    vacationMoney:
                                      anyOf:
                                        - type: object
                                          properties:
                                            percentage:
                                              min: 0
                                              type: number
                                            type:
                                              type: string
                                              enum:
                                                - spread
                                          required:
                                            - percentage
                                            - type
                                        - type: object
                                          properties:
                                            percentage:
                                              min: 0
                                              type: number
                                            type:
                                              type: string
                                              enum:
                                                - single-month
                                            month:
                                              min: 1
                                              max: 12
                                              multipleOf: 1
                                              type: number
                                          required:
                                            - percentage
                                            - type
                                            - month
                                    socialSecurity:
                                      min: 0
                                      type: number
                                    thirteenthMonth:
                                      type: boolean
                                  required:
                                    - raises
                                    - baseAmount
                                    - type
                                    - vacationMoney
                                    - socialSecurity
                                    - thirteenthMonth
                                - type: object
                                  properties:
                                    raises:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          month:
                                            format: date
                                            type: string
                                          percentage:
                                            min: 0
                                            type: number
                                        required:
                                          - month
                                          - percentage
                                    baseAmount:
                                      min: 0
                                      type: number
                                    type:
                                      type: string
                                      enum:
                                        - freelance
                                  required:
                                    - raises
                                    - baseAmount
                                    - type
                            perks:
                              type: array
                              items:
                                anyOf:
                                  - type: object
                                    properties:
                                      name:
                                        type: string
                                      amount:
                                        type: number
                                      paymentType:
                                        type: string
                                        enum:
                                          - recurring
                                      period:
                                        type: object
                                        properties:
                                          start:
                                            format: date
                                            type: string
                                          end:
                                            format: date
                                            type: string
                                        required:
                                          - start
                                          - end
                                    required:
                                      - name
                                      - amount
                                      - paymentType
                                      - period
                                  - type: object
                                    properties:
                                      name:
                                        type: string
                                      amount:
                                        type: number
                                      paymentType:
                                        type: string
                                        enum:
                                          - one-time
                                      month:
                                        format: date
                                        type: string
                                    required:
                                      - name
                                      - amount
                                      - paymentType
                                      - month
                            employmentStart:
                              format: date
                              type: string
                            employmentEnd:
                              format: date
                              type: string
                            vendorId:
                              format: uuid
                              type: string
                              nullable: true
                            integrationId:
                              format: uuid
                              type: string
                              nullable: true
                          required:
                            - budgetAccount
                            - firstName
                            - lastName
                            - jobTitle
                            - wage
                            - perks
                            - employmentStart
                            - employmentEnd
                            - vendorId
                            - integrationId
                      vendorId:
                        format: uuid
                        type: string
                        nullable: true
                      integrationId:
                        format: uuid
                        type: string
                        nullable: true
                    required:
                      - name
                      - employees
                      - vendorId
                      - integrationId
                config:
                  type: object
                  properties:
                    raises:
                      type: object
                      properties:
                        freelance:
                          type: array
                          items:
                            type: object
                            properties:
                              month:
                                format: date
                                type: string
                              percentage:
                                min: 0
                                type: number
                            required:
                              - month
                              - percentage
                        payroll:
                          type: array
                          items:
                            type: object
                            properties:
                              month:
                                format: date
                                type: string
                              percentage:
                                min: 0
                                type: number
                            required:
                              - month
                              - percentage
                      required:
                        - freelance
                        - payroll
                    vacationMoney:
                      anyOf:
                        - type: object
                          properties:
                            percentage:
                              min: 0
                              type: number
                            type:
                              type: string
                              enum:
                                - spread
                          required:
                            - percentage
                            - type
                        - type: object
                          properties:
                            percentage:
                              min: 0
                              type: number
                            type:
                              type: string
                              enum:
                                - single-month
                            month:
                              min: 1
                              max: 12
                              multipleOf: 1
                              type: number
                          required:
                            - percentage
                            - type
                            - month
                    socialSecurity:
                      type: number
                    thirteenthMonth:
                      type: boolean
                    debtBudgetAccount:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                          nullable: true
                        name:
                          type: string
                        accountAnalyticalAxisId:
                          format: uuid
                          type: string
                      required:
                        - id
                        - name
                        - accountAnalyticalAxisId
                  required:
                    - raises
                    - vacationMoney
                    - socialSecurity
                    - thirteenthMonth
                    - debtBudgetAccount
              required:
                - budgetVersion
                - departments
                - config
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/personnel-costs/{budgetVersionId}:
    put:
      summary: Update an existing personnel costs budget version
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                departments:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                            nullable: true
                          employees:
                            type: array
                            items:
                              type: object
                              allOf:
                                - type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                      nullable: true
                                  required:
                                    - id
                                - type: object
                                  properties:
                                    budgetAccount:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                          nullable: true
                                        name:
                                          type: string
                                        accountAnalyticalAxisId:
                                          format: uuid
                                          type: string
                                      required:
                                        - id
                                        - name
                                        - accountAnalyticalAxisId
                                    firstName:
                                      type: string
                                    lastName:
                                      type: string
                                    jobTitle:
                                      type: string
                                      nullable: true
                                    wage:
                                      anyOf:
                                        - type: object
                                          properties:
                                            raises:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  month:
                                                    format: date
                                                    type: string
                                                  percentage:
                                                    min: 0
                                                    type: number
                                                required:
                                                  - month
                                                  - percentage
                                            baseAmount:
                                              min: 0
                                              type: number
                                            type:
                                              type: string
                                              enum:
                                                - payroll
                                            vacationMoney:
                                              anyOf:
                                                - type: object
                                                  properties:
                                                    percentage:
                                                      min: 0
                                                      type: number
                                                    type:
                                                      type: string
                                                      enum:
                                                        - spread
                                                  required:
                                                    - percentage
                                                    - type
                                                - type: object
                                                  properties:
                                                    percentage:
                                                      min: 0
                                                      type: number
                                                    type:
                                                      type: string
                                                      enum:
                                                        - single-month
                                                    month:
                                                      min: 1
                                                      max: 12
                                                      multipleOf: 1
                                                      type: number
                                                  required:
                                                    - percentage
                                                    - type
                                                    - month
                                            socialSecurity:
                                              min: 0
                                              type: number
                                            thirteenthMonth:
                                              type: boolean
                                          required:
                                            - raises
                                            - baseAmount
                                            - type
                                            - vacationMoney
                                            - socialSecurity
                                            - thirteenthMonth
                                        - type: object
                                          properties:
                                            raises:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  month:
                                                    format: date
                                                    type: string
                                                  percentage:
                                                    min: 0
                                                    type: number
                                                required:
                                                  - month
                                                  - percentage
                                            baseAmount:
                                              min: 0
                                              type: number
                                            type:
                                              type: string
                                              enum:
                                                - freelance
                                          required:
                                            - raises
                                            - baseAmount
                                            - type
                                    perks:
                                      type: array
                                      items:
                                        anyOf:
                                          - type: object
                                            properties:
                                              name:
                                                type: string
                                              amount:
                                                type: number
                                              paymentType:
                                                type: string
                                                enum:
                                                  - recurring
                                              period:
                                                type: object
                                                properties:
                                                  start:
                                                    format: date
                                                    type: string
                                                  end:
                                                    format: date
                                                    type: string
                                                required:
                                                  - start
                                                  - end
                                            required:
                                              - name
                                              - amount
                                              - paymentType
                                              - period
                                          - type: object
                                            properties:
                                              name:
                                                type: string
                                              amount:
                                                type: number
                                              paymentType:
                                                type: string
                                                enum:
                                                  - one-time
                                              month:
                                                format: date
                                                type: string
                                            required:
                                              - name
                                              - amount
                                              - paymentType
                                              - month
                                    employmentStart:
                                      format: date
                                      type: string
                                    employmentEnd:
                                      format: date
                                      type: string
                                    vendorId:
                                      format: uuid
                                      type: string
                                      nullable: true
                                    integrationId:
                                      format: uuid
                                      type: string
                                      nullable: true
                                  required:
                                    - budgetAccount
                                    - firstName
                                    - lastName
                                    - jobTitle
                                    - wage
                                    - perks
                                    - employmentStart
                                    - employmentEnd
                                    - vendorId
                                    - integrationId
                        required:
                          - id
                          - employees
                      - type: object
                        properties:
                          name:
                            type: string
                          vendorId:
                            format: uuid
                            type: string
                            nullable: true
                          integrationId:
                            format: uuid
                            type: string
                            nullable: true
                        required:
                          - name
                          - vendorId
                          - integrationId
                config:
                  type: object
                  properties:
                    raises:
                      type: object
                      properties:
                        freelance:
                          type: array
                          items:
                            type: object
                            properties:
                              month:
                                format: date
                                type: string
                              percentage:
                                min: 0
                                type: number
                            required:
                              - month
                              - percentage
                        payroll:
                          type: array
                          items:
                            type: object
                            properties:
                              month:
                                format: date
                                type: string
                              percentage:
                                min: 0
                                type: number
                            required:
                              - month
                              - percentage
                      required:
                        - freelance
                        - payroll
                    vacationMoney:
                      anyOf:
                        - type: object
                          properties:
                            percentage:
                              min: 0
                              type: number
                            type:
                              type: string
                              enum:
                                - spread
                          required:
                            - percentage
                            - type
                        - type: object
                          properties:
                            percentage:
                              min: 0
                              type: number
                            type:
                              type: string
                              enum:
                                - single-month
                            month:
                              min: 1
                              max: 12
                              multipleOf: 1
                              type: number
                          required:
                            - percentage
                            - type
                            - month
                    socialSecurity:
                      type: number
                    thirteenthMonth:
                      type: boolean
                    debtBudgetAccount:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                          nullable: true
                        name:
                          type: string
                        accountAnalyticalAxisId:
                          format: uuid
                          type: string
                      required:
                        - id
                        - name
                        - accountAnalyticalAxisId
                  required:
                    - raises
                    - vacationMoney
                    - socialSecurity
                    - thirteenthMonth
                    - debtBudgetAccount
              required:
                - budgetVersion
                - departments
                - config
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/simple-budget:
    post:
      summary: Set all the budgets for a specific business entity
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                budgetTransactions:
                  type: array
                  items:
                    type: object
                    properties:
                      budgetAccountId:
                        type: string
                      budgetAccount:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          name:
                            type: string
                          accountAnalyticalAxisId:
                            type: string
                          managedByBudgetType:
                            anyOf:
                              - type: string
                                enum:
                                  - budget
                              - type: string
                                enum:
                                  - crm
                              - type: string
                                enum:
                                  - personnel_costs
                              - type: string
                                enum:
                                  - recurring_revenue
                              - type: string
                                enum:
                                  - vat
                              - type: string
                                enum:
                                  - project_revenue
                              - type: string
                                enum:
                                  - pxq
                              - type: string
                                enum:
                                  - cogs
                              - type: string
                                enum:
                                  - inventory
                              - type: string
                                enum:
                                  - outstanding_items
                              - type: string
                                enum:
                                  - fixed-assets
                              - type: string
                                enum:
                                  - loans
                        required:
                          - id
                          - name
                          - accountAnalyticalAxisId
                          - managedByBudgetType
                      period:
                        format: date
                        type: string
                      entityId:
                        format: uuid
                        type: string
                      amount:
                        type: number
                      budgetType:
                        type: string
                        enum:
                          - budget
                    required:
                      - budgetAccountId
                      - budgetAccount
                      - period
                      - entityId
                      - amount
                      - budgetType
              required:
                - budgetVersion
                - budgetTransactions
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/simple-budget/{budgetVersionId}:
    put:
      summary: Set all the budgets for a specific business entity
      tags:
        - Budgets
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                budgetVersion:
                  type: object
                  properties:
                    name:
                      minLength: 1
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                  required:
                    - name
                    - startDate
                    - endDate
                budgetTransactions:
                  type: array
                  items:
                    type: object
                    properties:
                      budgetAccountId:
                        type: string
                      budgetAccount:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          name:
                            type: string
                          accountAnalyticalAxisId:
                            type: string
                          managedByBudgetType:
                            anyOf:
                              - type: string
                                enum:
                                  - budget
                              - type: string
                                enum:
                                  - crm
                              - type: string
                                enum:
                                  - personnel_costs
                              - type: string
                                enum:
                                  - recurring_revenue
                              - type: string
                                enum:
                                  - vat
                              - type: string
                                enum:
                                  - project_revenue
                              - type: string
                                enum:
                                  - pxq
                              - type: string
                                enum:
                                  - cogs
                              - type: string
                                enum:
                                  - inventory
                              - type: string
                                enum:
                                  - outstanding_items
                              - type: string
                                enum:
                                  - fixed-assets
                              - type: string
                                enum:
                                  - loans
                        required:
                          - id
                          - name
                          - accountAnalyticalAxisId
                          - managedByBudgetType
                      period:
                        format: date
                        type: string
                      entityId:
                        format: uuid
                        type: string
                      amount:
                        type: number
                      budgetType:
                        type: string
                        enum:
                          - budget
                    required:
                      - budgetAccountId
                      - budgetAccount
                      - period
                      - entityId
                      - amount
                      - budgetType
              required:
                - budgetVersion
                - budgetTransactions
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/budget-versions/personnel-costs/{budgetVersionId}/data:
    get:
      summary: Get costs and cashflows per personnel member of the given budget version
      tags:
        - Budgets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    employee:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        firstName:
                          type: string
                        lastName:
                          type: string
                      required:
                        - id
                        - firstName
                        - lastName
                    department:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        name:
                          type: string
                      required:
                        - id
                        - name
                    reportingLine:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                      required:
                        - id
                        - name
                    month:
                      format: date
                      type: string
                    wage:
                      type: number
                    fee:
                      type: number
                    socialSecurity:
                      type: number
                    thirteenthMonthCost:
                      type: number
                    thirteenthMonthCash:
                      type: number
                    vacationMoneyCost:
                      type: number
                    vacationMoneyCash:
                      type: number
                    perks:
                      type: number
                  required:
                    - employee
                    - department
                    - reportingLine
                    - month
                    - wage
                    - fee
                    - socialSecurity
                    - thirteenthMonthCost
                    - thirteenthMonthCash
                    - vacationMoneyCost
                    - vacationMoneyCash
                    - perks
  /entities/{entityId}/budget-versions/personnel-costs/{budgetVersionId}/departments:
    get:
      summary: Get all departments of the given personnel costs budget version
      tags:
        - Budgets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    employees:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          budgetAccount:
                            type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              name:
                                type: string
                              accountAnalyticalAxisId:
                                format: uuid
                                type: string
                                nullable: true
                            required:
                              - id
                              - name
                              - accountAnalyticalAxisId
                          firstName:
                            type: string
                          lastName:
                            type: string
                          wage:
                            anyOf:
                              - type: object
                                properties:
                                  raises:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        month:
                                          format: date
                                          type: string
                                        percentage:
                                          min: 0
                                          type: number
                                      required:
                                        - month
                                        - percentage
                                  baseAmount:
                                    min: 0
                                    type: number
                                  type:
                                    type: string
                                    enum:
                                      - payroll
                                  vacationMoney:
                                    anyOf:
                                      - type: object
                                        properties:
                                          percentage:
                                            min: 0
                                            type: number
                                          type:
                                            type: string
                                            enum:
                                              - spread
                                        required:
                                          - percentage
                                          - type
                                      - type: object
                                        properties:
                                          percentage:
                                            min: 0
                                            type: number
                                          type:
                                            type: string
                                            enum:
                                              - single-month
                                          month:
                                            min: 1
                                            max: 12
                                            multipleOf: 1
                                            type: number
                                        required:
                                          - percentage
                                          - type
                                          - month
                                  socialSecurity:
                                    min: 0
                                    type: number
                                  thirteenthMonth:
                                    type: boolean
                                required:
                                  - raises
                                  - baseAmount
                                  - type
                                  - vacationMoney
                                  - socialSecurity
                                  - thirteenthMonth
                              - type: object
                                properties:
                                  raises:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        month:
                                          format: date
                                          type: string
                                        percentage:
                                          min: 0
                                          type: number
                                      required:
                                        - month
                                        - percentage
                                  baseAmount:
                                    min: 0
                                    type: number
                                  type:
                                    type: string
                                    enum:
                                      - freelance
                                required:
                                  - raises
                                  - baseAmount
                                  - type
                          perks:
                            type: array
                            items:
                              anyOf:
                                - type: object
                                  properties:
                                    name:
                                      type: string
                                    amount:
                                      type: number
                                    paymentType:
                                      type: string
                                      enum:
                                        - recurring
                                    period:
                                      type: object
                                      properties:
                                        start:
                                          format: date
                                          type: string
                                        end:
                                          format: date
                                          type: string
                                      required:
                                        - start
                                        - end
                                  required:
                                    - name
                                    - amount
                                    - paymentType
                                    - period
                                - type: object
                                  properties:
                                    name:
                                      type: string
                                    amount:
                                      type: number
                                    paymentType:
                                      type: string
                                      enum:
                                        - one-time
                                    month:
                                      format: date
                                      type: string
                                  required:
                                    - name
                                    - amount
                                    - paymentType
                                    - month
                          employmentStart:
                            format: date
                            type: string
                          employmentEnd:
                            format: date
                            type: string
                          jobTitle:
                            type: string
                            nullable: true
                          vendorId:
                            format: uuid
                            type: string
                            nullable: true
                          integrationId:
                            format: uuid
                            type: string
                            nullable: true
                        required:
                          - id
                          - budgetAccount
                          - firstName
                          - lastName
                          - wage
                          - perks
                          - employmentStart
                          - employmentEnd
                          - jobTitle
                          - vendorId
                          - integrationId
                    vendorId:
                      format: uuid
                      type: string
                      nullable: true
                    integrationId:
                      format: uuid
                      type: string
                      nullable: true
                  required:
                    - id
                    - name
                    - employees
                    - vendorId
                    - integrationId
  /entities/{entityId}/budget-versions/personnel-costs/{budgetVersionId}/config:
    get:
      summary: Get the configuration of the given personnel costs budget version
      tags:
        - Budgets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  raises:
                    type: object
                    properties:
                      freelance:
                        type: array
                        items:
                          type: object
                          properties:
                            month:
                              format: date
                              type: string
                            percentage:
                              min: 0
                              type: number
                          required:
                            - month
                            - percentage
                      payroll:
                        type: array
                        items:
                          type: object
                          properties:
                            month:
                              format: date
                              type: string
                            percentage:
                              min: 0
                              type: number
                          required:
                            - month
                            - percentage
                    required:
                      - freelance
                      - payroll
                  vacationMoney:
                    anyOf:
                      - type: object
                        properties:
                          percentage:
                            min: 0
                            type: number
                          type:
                            type: string
                            enum:
                              - spread
                        required:
                          - percentage
                          - type
                      - type: object
                        properties:
                          percentage:
                            min: 0
                            type: number
                          type:
                            type: string
                            enum:
                              - single-month
                          month:
                            min: 1
                            max: 12
                            multipleOf: 1
                            type: number
                        required:
                          - percentage
                          - type
                          - month
                  socialSecurity:
                    type: number
                  thirteenthMonth:
                    type: boolean
                  debtBudgetAccount:
                    type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      name:
                        type: string
                      accountAnalyticalAxisId:
                        format: uuid
                        type: string
                    required:
                      - id
                      - name
                      - accountAnalyticalAxisId
                    nullable: true
                required:
                  - raises
                  - vacationMoney
                  - socialSecurity
                  - thirteenthMonth
                  - debtBudgetAccount
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions/{budgetVersionId}:
    delete:
      summary: Remove a budget version from an existing scenario
      tags:
        - Scenarios
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "204":
          description: Succesfully deleted the budget version
    put:
      summary: Assign a budget version to an existing scenario
      tags:
        - Scenarios
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: budgetVersionId
          required: true
      responses:
        "204":
          description: Succesfully assigned the budget version to the scenario
  /entities/{entityId}/forecasts/{forecastId}/scenarios/{scenarioId}/budget-versions:
    put:
      summary: Assign multiple budget versions to an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                budgetVersionIds:
                  minItems: 1
                  type: array
                  items:
                    format: uuid
                    type: string
              required:
                - budgetVersionIds
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "200":
          description: Default Response
    post:
      summary: Copy multiple budget versions to an existing scenario
      tags:
        - Scenarios
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                budgetVersionIds:
                  minItems: 1
                  type: array
                  items:
                    format: uuid
                    type: string
              required:
                - budgetVersionIds
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: forecastId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: scenarioId
          required: true
      responses:
        "204":
          description: Succesfully copied the budget versions to the scenario
  /entities/{entityId}/booklets:
    get:
      summary: Get list of created booklets
      tags:
        - Booklets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    entityId:
                      format: uuid
                      type: string
                      nullable: true
                    organisationId:
                      format: uuid
                      type: string
                      nullable: true
                  required:
                    - id
                    - name
                    - entityId
                    - organisationId
    post:
      summary: Create a new booklet
      tags:
        - Booklets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                bookletPages:
                  type: array
                  items:
                    type: object
                    properties:
                      settings:
                        anyOf:
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_WATERFALL
                                required:
                                  - type
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_KPI
                                  aggregation:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - period
                                      value:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - month
                                          - type: string
                                            enum:
                                              - quarter
                                          - type: string
                                            enum:
                                              - year
                                    required:
                                      - type
                                      - value
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_PERCENTAGE
                                  aggregation:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - period
                                      value:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - month
                                          - type: string
                                            enum:
                                              - quarter
                                          - type: string
                                            enum:
                                              - year
                                    required:
                                      - type
                                      - value
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  reportType:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - actuals
                                      - type: string
                                        enum:
                                          - forecast
                                      - type: string
                                        enum:
                                          - delta
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - reportType
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_REPORT
                                  deltaComparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - interval
                                          value:
                                            type: string
                                            enum:
                                              - interval
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - analyticalAxis
                                          value:
                                            type: string
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                  reportingLineId:
                                    type: string
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_ACTUALS
                                  reportType:
                                    type: string
                                    enum:
                                      - actuals
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - analyticalAxis
                                          value:
                                            type: string
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - reportType
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_FORECAST
                                  reportType:
                                    type: string
                                    enum:
                                      - forecast
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - reportType
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_DELTA
                                  deltaComparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                  reportType:
                                    type: string
                                    enum:
                                      - delta
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - interval
                                          value:
                                            type: string
                                            enum:
                                              - interval
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - deltaComparisonMethod
                                  - reportType
                                  - aggregation
                    required:
                      - settings
              required:
                - name
                - bookletPages
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  entityId:
                    format: uuid
                    type: string
                    nullable: true
                  organisationId:
                    format: uuid
                    type: string
                    nullable: true
                required:
                  - id
                  - name
                  - entityId
                  - organisationId
  /entities/{entityId}/booklets/{bookletId}:
    get:
      summary: Get booklet by id
      tags:
        - Booklets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: bookletId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      name:
                        type: string
                      entityId:
                        format: uuid
                        type: string
                        nullable: true
                      organisationId:
                        format: uuid
                        type: string
                        nullable: true
                    required:
                      - id
                      - name
                      - entityId
                      - organisationId
                  - type: object
                    properties:
                      bookletPages:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            bookletId:
                              format: uuid
                              type: string
                            settings:
                              anyOf:
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - graph
                                        reportingLineIds:
                                          type: array
                                          items:
                                            type: string
                                        comparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                      required:
                                        - visualizationType
                                        - reportingLineIds
                                        - comparisonMethod
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - CHART_WATERFALL
                                      required:
                                        - type
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - graph
                                        reportingLineIds:
                                          type: array
                                          items:
                                            type: string
                                        comparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                      required:
                                        - visualizationType
                                        - reportingLineIds
                                        - comparisonMethod
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - CHART_KPI
                                        aggregation:
                                          type: object
                                          properties:
                                            type:
                                              type: string
                                              enum:
                                                - period
                                            value:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - month
                                                - type: string
                                                  enum:
                                                    - quarter
                                                - type: string
                                                  enum:
                                                    - year
                                          required:
                                            - type
                                            - value
                                      required:
                                        - type
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - graph
                                        reportingLineIds:
                                          type: array
                                          items:
                                            type: string
                                        comparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                      required:
                                        - visualizationType
                                        - reportingLineIds
                                        - comparisonMethod
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - CHART_PERCENTAGE
                                        aggregation:
                                          type: object
                                          properties:
                                            type:
                                              type: string
                                              enum:
                                                - period
                                            value:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - month
                                                - type: string
                                                  enum:
                                                    - quarter
                                                - type: string
                                                  enum:
                                                    - year
                                          required:
                                            - type
                                            - value
                                      required:
                                        - type
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        report:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - PL
                                            - type: string
                                              enum:
                                                - BS
                                            - type: string
                                              enum:
                                                - CF
                                        reportType:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - actuals
                                            - type: string
                                              enum:
                                                - forecast
                                            - type: string
                                              enum:
                                                - delta
                                        cardinality:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - value
                                                value:
                                                  type: number
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - percent
                                                value:
                                                  type: string
                                                  enum:
                                                    - revenue
                                              required:
                                                - type
                                                - value
                                        axisIdsToExclude:
                                          type: array
                                          items:
                                            type: string
                                        analyticalAxisIds:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - report
                                        - reportType
                                        - cardinality
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - graph
                                      required:
                                        - visualizationType
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - CHART_REPORT
                                        deltaComparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                        aggregation:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - period
                                                value:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - month
                                                    - type: string
                                                      enum:
                                                        - quarter
                                                    - type: string
                                                      enum:
                                                        - year
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - interval
                                                value:
                                                  type: string
                                                  enum:
                                                    - interval
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - analyticalAxis
                                                value:
                                                  type: string
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - entity
                                                value:
                                                  type: string
                                                  enum:
                                                    - entity
                                              required:
                                                - type
                                                - value
                                        reportingLineId:
                                          type: string
                                      required:
                                        - type
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        report:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - PL
                                            - type: string
                                              enum:
                                                - BS
                                            - type: string
                                              enum:
                                                - CF
                                        cardinality:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - value
                                                value:
                                                  type: number
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - percent
                                                value:
                                                  type: string
                                                  enum:
                                                    - revenue
                                              required:
                                                - type
                                                - value
                                        axisIdsToExclude:
                                          type: array
                                          items:
                                            type: string
                                        analyticalAxisIds:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - report
                                        - cardinality
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - table
                                      required:
                                        - visualizationType
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - TABLE_ACTUALS
                                        reportType:
                                          type: string
                                          enum:
                                            - actuals
                                        aggregation:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - period
                                                value:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - month
                                                    - type: string
                                                      enum:
                                                        - quarter
                                                    - type: string
                                                      enum:
                                                        - year
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - analyticalAxis
                                                value:
                                                  type: string
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - entity
                                                value:
                                                  type: string
                                                  enum:
                                                    - entity
                                              required:
                                                - type
                                                - value
                                      required:
                                        - type
                                        - reportType
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        report:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - PL
                                            - type: string
                                              enum:
                                                - BS
                                            - type: string
                                              enum:
                                                - CF
                                        cardinality:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - value
                                                value:
                                                  type: number
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - percent
                                                value:
                                                  type: string
                                                  enum:
                                                    - revenue
                                              required:
                                                - type
                                                - value
                                        axisIdsToExclude:
                                          type: array
                                          items:
                                            type: string
                                        analyticalAxisIds:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - report
                                        - cardinality
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - table
                                      required:
                                        - visualizationType
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - TABLE_FORECAST
                                        reportType:
                                          type: string
                                          enum:
                                            - forecast
                                        aggregation:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - period
                                                value:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - month
                                                    - type: string
                                                      enum:
                                                        - quarter
                                                    - type: string
                                                      enum:
                                                        - year
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - entity
                                                value:
                                                  type: string
                                                  enum:
                                                    - entity
                                              required:
                                                - type
                                                - value
                                      required:
                                        - type
                                        - reportType
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        report:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - PL
                                            - type: string
                                              enum:
                                                - BS
                                            - type: string
                                              enum:
                                                - CF
                                        cardinality:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - value
                                                value:
                                                  type: number
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - percent
                                                value:
                                                  type: string
                                                  enum:
                                                    - revenue
                                              required:
                                                - type
                                                - value
                                        axisIdsToExclude:
                                          type: array
                                          items:
                                            type: string
                                        analyticalAxisIds:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - report
                                        - cardinality
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - table
                                      required:
                                        - visualizationType
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - TABLE_DELTA
                                        deltaComparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                        reportType:
                                          type: string
                                          enum:
                                            - delta
                                        aggregation:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - period
                                                value:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - month
                                                    - type: string
                                                      enum:
                                                        - quarter
                                                    - type: string
                                                      enum:
                                                        - year
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - interval
                                                value:
                                                  type: string
                                                  enum:
                                                    - interval
                                              required:
                                                - type
                                                - value
                                      required:
                                        - type
                                        - deltaComparisonMethod
                                        - reportType
                                        - aggregation
                          required:
                            - id
                            - bookletId
                            - settings
                    required:
                      - bookletPages
    put:
      summary: Overwrite existing booklet by id
      tags:
        - Booklets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                bookletPages:
                  type: array
                  items:
                    type: object
                    properties:
                      settings:
                        anyOf:
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_WATERFALL
                                required:
                                  - type
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_KPI
                                  aggregation:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - period
                                      value:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - month
                                          - type: string
                                            enum:
                                              - quarter
                                          - type: string
                                            enum:
                                              - year
                                    required:
                                      - type
                                      - value
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_PERCENTAGE
                                  aggregation:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - period
                                      value:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - month
                                          - type: string
                                            enum:
                                              - quarter
                                          - type: string
                                            enum:
                                              - year
                                    required:
                                      - type
                                      - value
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  reportType:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - actuals
                                      - type: string
                                        enum:
                                          - forecast
                                      - type: string
                                        enum:
                                          - delta
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - reportType
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_REPORT
                                  deltaComparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - interval
                                          value:
                                            type: string
                                            enum:
                                              - interval
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - analyticalAxis
                                          value:
                                            type: string
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                  reportingLineId:
                                    type: string
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_ACTUALS
                                  reportType:
                                    type: string
                                    enum:
                                      - actuals
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - analyticalAxis
                                          value:
                                            type: string
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - reportType
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_FORECAST
                                  reportType:
                                    type: string
                                    enum:
                                      - forecast
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - reportType
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_DELTA
                                  deltaComparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                  reportType:
                                    type: string
                                    enum:
                                      - delta
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - interval
                                          value:
                                            type: string
                                            enum:
                                              - interval
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - deltaComparisonMethod
                                  - reportType
                                  - aggregation
                    required:
                      - settings
              required:
                - name
                - bookletPages
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: bookletId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      summary: Delete booklet by id
      tags:
        - Booklets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: bookletId
          required: true
      responses:
        "204":
          description: Succesfully deleted booklet
  /entities/{entityId}/accounts-analytical-axes:
    get:
      summary: Get all account - analytical axis combinations used for mappings and
        budget accounts
      tags:
        - Accounts
        - Analytical Axes
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    accountId:
                      format: uuid
                      type: string
                    analyticalAxisId:
                      format: uuid
                      type: string
                      nullable: true
                  required:
                    - id
                    - accountId
                    - analyticalAxisId
  /entities/{entityId}/annual-accounts/{countryCode}/settings:
    get:
      summary: Get the settings for annual accounts.
      tags:
        - Annual Accounts
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            maxLength: 2
            type: string
          in: path
          name: countryCode
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  entityId:
                    format: uuid
                    type: string
                  versionType:
                    type: string
                  versionModel:
                    type: string
                  schemeVersion:
                    type: string
                    nullable: true
                  basisOfPreparation:
                    type: string
                    nullable: true
                  chamberOfCommerceRegistrationNumber:
                    type: string
                    nullable: true
                  businessNames:
                    type: string
                    nullable: true
                  approvals:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        name:
                          type: string
                        role:
                          anyOf:
                            - type: string
                              enum:
                                - director
                            - type: string
                              enum:
                                - former-director
                            - type: string
                              enum:
                                - commissioner
                            - type: string
                              enum:
                                - former-commissioner
                        organisation:
                          type: string
                          nullable: true
                      required:
                        - id
                        - name
                        - role
                        - organisation
                required:
                  - id
                  - entityId
                  - versionType
                  - versionModel
                  - schemeVersion
                  - basisOfPreparation
                  - chamberOfCommerceRegistrationNumber
                  - businessNames
                  - approvals
                nullable: true
    put:
      summary: Save the settings for annual accounts.
      tags:
        - Annual Accounts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                settings:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        versionType:
                          type: string
                        versionModel:
                          type: string
                        schemeVersion:
                          type: string
                          nullable: true
                        basisOfPreparation:
                          type: string
                          nullable: true
                        chamberOfCommerceRegistrationNumber:
                          type: string
                          nullable: true
                        businessNames:
                          type: string
                          nullable: true
                      required:
                        - versionType
                        - versionModel
                        - schemeVersion
                        - basisOfPreparation
                        - chamberOfCommerceRegistrationNumber
                        - businessNames
                    - type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        approvals:
                          type: array
                          items:
                            allOf:
                              - type: object
                                allOf:
                                  - type: object
                                    properties:
                                      name:
                                        type: string
                                      role:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - director
                                          - type: string
                                            enum:
                                              - former-director
                                          - type: string
                                            enum:
                                              - commissioner
                                          - type: string
                                            enum:
                                              - former-commissioner
                                      organisation:
                                        type: string
                                        nullable: true
                                    required:
                                      - name
                                      - role
                                      - organisation
                                  - type: object
                                    properties: {}
                              - type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                      required:
                        - approvals
              required:
                - settings
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            maxLength: 2
            type: string
          in: path
          name: countryCode
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts/adjusting-entries:
    get:
      summary: Get the adjusting entries for annual accounts by date range.
      tags:
        - Annual Accounts
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: startDate
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: endDate
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    entityId:
                      format: uuid
                      type: string
                    date:
                      format: date
                      type: string
                    description:
                      type: string
                    transactions:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          annualAccountsAdjustingEntryId:
                            format: uuid
                            type: string
                          accountId:
                            format: uuid
                            type: string
                          amount:
                            type: number
                          createdBy:
                            type: object
                            properties:
                              id:
                                format: uuid
                                type: string
                              fullName:
                                type: string
                            required:
                              - id
                              - fullName
                        required:
                          - id
                          - annualAccountsAdjustingEntryId
                          - accountId
                          - amount
                          - createdBy
                  required:
                    - id
                    - entityId
                    - date
                    - description
                    - transactions
    put:
      summary: Save the adjusting entries for annual accounts by date range.
      tags:
        - Annual Accounts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                startDate:
                  format: date
                  type: string
                endDate:
                  format: date
                  type: string
                adjustingEntries:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          date:
                            format: date
                            type: string
                          description:
                            type: string
                        required:
                          - id
                          - date
                          - description
                      - type: object
                        properties:
                          transactions:
                            type: array
                            items:
                              type: object
                              allOf:
                                - type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                    annualAccountsAdjustingEntryId:
                                      format: uuid
                                      type: string
                                    accountId:
                                      format: uuid
                                      type: string
                                    amount:
                                      type: number
                                  required:
                                    - id
                                    - annualAccountsAdjustingEntryId
                                    - accountId
                                    - amount
                                - type: object
                                  properties:
                                    createdBy:
                                      format: uuid
                                      type: string
                                  required:
                                    - createdBy
                        required:
                          - transactions
              required:
                - startDate
                - endDate
                - adjustingEntries
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts-filing:
    get:
      summary: Get list of annual accounts filings.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    startDate:
                      format: date
                      type: string
                    endDate:
                      format: date
                      type: string
                    dateOfPreparation:
                      format: date
                      type: string
                      nullable: true
                    dateOfAdoption:
                      format: date
                      type: string
                      nullable: true
                    dateOfFiling:
                      format: date
                      type: string
                      nullable: true
                    filedBy:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        fullName:
                          type: string
                      required:
                        - id
                        - fullName
                      nullable: true
                    historicFiling:
                      type: boolean
                  required:
                    - id
                    - startDate
                    - endDate
                    - dateOfPreparation
                    - dateOfAdoption
                    - dateOfFiling
                    - filedBy
                    - historicFiling
    post:
      summary: Create new annual accounts filing.
      tags:
        - Annual Accounts Filing
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                countryCode:
                  minLength: 2
                  maxLength: 2
                  type: string
                startDate:
                  format: date
                  type: string
                endDate:
                  format: date
                  type: string
                historicFiling:
                  type: boolean
              required:
                - countryCode
                - startDate
                - endDate
                - historicFiling
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  filingId:
                    format: uuid
                    type: string
                required:
                  - filingId
  /entities/{entityId}/annual-accounts-filing/general-ledger-changes:
    get:
      summary: Get all general ledger changes for completed annual accounts filings.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    entityId:
                      format: uuid
                      type: string
                    annualAccountsFiling:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        startDate:
                          format: date
                          type: string
                        endDate:
                          format: date
                          type: string
                        filedBy:
                          type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            fullName:
                              type: string
                          required:
                            - id
                            - fullName
                          nullable: true
                        historicFiling:
                          type: boolean
                      required:
                        - id
                        - startDate
                        - endDate
                        - filedBy
                        - historicFiling
                    transaction:
                      type: object
                      properties:
                        datePeriod:
                          format: date
                          type: string
                        journalCode:
                          type: string
                          nullable: true
                        amount:
                          type: number
                        description:
                          type: string
                          nullable: true
                        relationName:
                          type: string
                          nullable: true
                        changeType:
                          anyOf:
                            - type: string
                              enum:
                                - added
                            - type: string
                              enum:
                                - modified
                            - type: string
                              enum:
                                - deleted
                      required:
                        - datePeriod
                        - journalCode
                        - amount
                        - description
                        - relationName
                        - changeType
                    account:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        accountNumber:
                          type: string
                        accountName:
                          type: string
                      required:
                        - id
                        - accountNumber
                        - accountName
                    isVerified:
                      type: boolean
                    verifiedBy:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        fullName:
                          type: string
                      required:
                        - id
                        - fullName
                      nullable: true
                  required:
                    - id
                    - entityId
                    - annualAccountsFiling
                    - transaction
                    - account
                    - isVerified
                    - verifiedBy
  /entities/{entityId}/annual-accounts-filing/general-ledger-changes/{generalLedgerChangeId}/verification:
    put:
      summary: Change the verification status of a general ledger change that happened
        for an annual accounts filing by id.
      tags:
        - Annual Accounts Filing
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                action:
                  anyOf:
                    - type: string
                      enum:
                        - verify
                    - type: string
                      enum:
                        - unverify
              required:
                - action
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: generalLedgerChangeId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts-filing/general-ledger-changes/validation:
    get:
      summary: Get the validation of general ledger changes for completed annual
        accounts filings.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  isValid:
                    type: boolean
                required:
                  - isValid
  /entities/{entityId}/annual-accounts-filing/{filingId}:
    get:
      summary: Get an annual accounts filing by id.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  startDate:
                    format: date
                    type: string
                  endDate:
                    format: date
                    type: string
                  dateOfPreparation:
                    format: date
                    type: string
                    nullable: true
                  dateOfAdoption:
                    format: date
                    type: string
                    nullable: true
                  dateOfFiling:
                    format: date
                    type: string
                    nullable: true
                  filedBy:
                    type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      fullName:
                        type: string
                    required:
                      - id
                      - fullName
                    nullable: true
                  historicFiling:
                    type: boolean
                required:
                  - id
                  - startDate
                  - endDate
                  - dateOfPreparation
                  - dateOfAdoption
                  - dateOfFiling
                  - filedBy
                  - historicFiling
    delete:
      summary: Delete an annual accounts filing by id.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts-filing/{filingId}/settings:
    get:
      summary: Get the settings for annual accounts filing by id.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  entityId:
                    format: uuid
                    type: string
                  countryCode:
                    minLength: 2
                    maxLength: 2
                    type: string
                  versionType:
                    type: string
                  versionModel:
                    type: string
                  schemeVersion:
                    type: string
                    nullable: true
                  basisOfPreparation:
                    type: string
                    nullable: true
                  chamberOfCommerceRegistrationNumber:
                    type: string
                    nullable: true
                  businessNames:
                    type: string
                    nullable: true
                required:
                  - id
                  - entityId
                  - countryCode
                  - versionType
                  - versionModel
                  - schemeVersion
                  - basisOfPreparation
                  - chamberOfCommerceRegistrationNumber
                  - businessNames
                nullable: true
    post:
      summary: Create new settings for an annual accounts filing.
      tags:
        - Annual Accounts Filing
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                settings:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        startDate:
                          format: date
                          type: string
                        endDate:
                          format: date
                          type: string
                        basisOfPreparation:
                          type: string
                        chamberOfCommerceRegistrationNumber:
                          type: string
                      required:
                        - startDate
                        - endDate
                        - basisOfPreparation
                        - chamberOfCommerceRegistrationNumber
                    - type: object
                      properties:
                        versionType:
                          type: string
                        versionModel:
                          type: string
                        schemeVersion:
                          type: string
                          nullable: true
                        businessNames:
                          type: string
                          nullable: true
                      required:
                        - versionType
                        - versionModel
                        - schemeVersion
                        - businessNames
              required:
                - settings
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  annualAccountsFilingSettingsid:
                    format: uuid
                    type: string
                required:
                  - annualAccountsFilingSettingsid
  /entities/{entityId}/annual-accounts-filing/{filingId}/settings/{settingsId}:
    put:
      summary: Save the settings for an annual accounts filing by settings id.
      tags:
        - Annual Accounts Filing
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                settings:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        startDate:
                          format: date
                          type: string
                        endDate:
                          format: date
                          type: string
                        basisOfPreparation:
                          type: string
                        chamberOfCommerceRegistrationNumber:
                          type: string
                      required:
                        - startDate
                        - endDate
                        - basisOfPreparation
                        - chamberOfCommerceRegistrationNumber
                    - type: object
                      properties:
                        versionType:
                          type: string
                        versionModel:
                          type: string
                        schemeVersion:
                          type: string
                          nullable: true
                        businessNames:
                          type: string
                          nullable: true
                      required:
                        - versionType
                        - versionModel
                        - schemeVersion
                        - businessNames
              required:
                - settings
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: settingsId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts-filing/{filingId}/mappings/trigger-auto-match:
    post:
      summary: Trigger the automatch mappings for an annual accounts filing.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts-filing/{filingId}/mappings:
    get:
      summary: Get mappings between Accounts - RGS codes - Reporting Structure for an
        annual accounts filing.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            type: boolean
          in: query
          name: used
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    accountId:
                      format: uuid
                      type: string
                    account:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        accountNumber:
                          type: string
                        accountName:
                          type: string
                      required:
                        - id
                        - accountNumber
                        - accountName
                    reportingLineId:
                      format: uuid
                      type: string
                    reportingLine:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            rank:
                              type: number
                            top:
                              type: boolean
                          required:
                            - id
                            - name
                            - rank
                            - top
                        - type: object
                          properties:
                            parentId:
                              format: uuid
                              type: string
                              nullable: true
                            report:
                              anyOf:
                                - type: string
                                  enum:
                                    - PL
                                - type: string
                                  enum:
                                    - BS
                          required:
                            - parentId
                            - report
                  required:
                    - id
                    - accountId
                    - account
                    - reportingLineId
                    - reportingLine
  /entities/{entityId}/annual-accounts-filing/{filingId}/mappings/batch:
    patch:
      summary: Patch mappings for an annual accounts filing.
      tags:
        - Annual Accounts Filing
      requestBody:
        content:
          application/json:
            schema:
              minItems: 1
              type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      action:
                        type: string
                        enum:
                          - DELETE
                      id:
                        format: uuid
                        type: string
                    required:
                      - action
                      - id
                  - type: object
                    properties:
                      action:
                        type: string
                        enum:
                          - CREATE
                      accountId:
                        format: uuid
                        type: string
                      reportingLineId:
                        format: uuid
                        type: string
                    required:
                      - action
                      - accountId
                      - reportingLineId
                  - type: object
                    properties:
                      action:
                        type: string
                        enum:
                          - UPDATE
                      id:
                        format: uuid
                        type: string
                      reportingLineId:
                        format: uuid
                        type: string
                    required:
                      - action
                      - id
                      - reportingLineId
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - type: object
                      properties:
                        action:
                          anyOf:
                            - type: string
                              enum:
                                - UPDATE
                            - type: string
                              enum:
                                - DELETE
                        id:
                          format: uuid
                          type: string
                      required:
                        - action
                        - id
                    - type: object
                      properties:
                        action:
                          type: string
                          enum:
                            - CREATE
                        id:
                          format: uuid
                          type: string
                        mapping:
                          type: object
                          properties:
                            accountId:
                              format: uuid
                              type: string
                            reportingLineId:
                              type: string
                          required:
                            - accountId
                            - reportingLineId
                      required:
                        - action
                        - id
                        - mapping
  /entities/{entityId}/annual-accounts-filing/{filingId}/reports/BS:
    get:
      summary: Patch mappings for an annual accounts filing.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            type: boolean
          in: query
          name: includeAdjustingEntries
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        rank:
                          type: number
                        top:
                          type: boolean
                        parent_id:
                          type: string
                          nullable: true
                        type:
                          anyOf:
                            - type: string
                              enum:
                                - reporting_line
                            - type: string
                              enum:
                                - mapping
                        columns:
                          type: object
                          additionalProperties:
                            type: string
                      required:
                        - id
                        - name
                        - rank
                        - top
                        - parent_id
                        - type
                        - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/annual-accounts-filing/{filingId}/reports/PL:
    get:
      summary: Patch mappings for an annual accounts filing.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            type: boolean
          in: query
          name: includeAdjustingEntries
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      columnFormat:
                        type: string
                      columns:
                        type: array
                        items:
                          type: string
                    required:
                      - columnFormat
                      - columns
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        rank:
                          type: number
                        top:
                          type: boolean
                        parent_id:
                          type: string
                          nullable: true
                        type:
                          anyOf:
                            - type: string
                              enum:
                                - reporting_line
                            - type: string
                              enum:
                                - mapping
                        columns:
                          type: object
                          additionalProperties:
                            type: string
                      required:
                        - id
                        - name
                        - rank
                        - top
                        - parent_id
                        - type
                        - columns
                required:
                  - meta
                  - data
  /entities/{entityId}/annual-accounts-filing/{filingId}/validations:
    get:
      summary: Validate an annual accounts filing
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    linkedAccountIds:
                      type: array
                      items:
                        format: uuid
                        type: string
                    supportedVersion:
                      type: object
                      properties:
                        countryCode:
                          minLength: 2
                          maxLength: 2
                          type: string
                        versionType:
                          type: string
                        versionModel:
                          type: string
                      required:
                        - countryCode
                        - versionType
                        - versionModel
                    type:
                      anyOf:
                        - type: string
                          enum:
                            - automatic
                        - type: string
                          enum:
                            - manual
                    result:
                      type: object
                      properties:
                        status:
                          anyOf:
                            - type: object
                              properties:
                                type:
                                  anyOf:
                                    - type: string
                                      enum:
                                        - manual
                                    - type: string
                                      enum:
                                        - nvt
                              required:
                                - type
                            - type: object
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - automatic
                                isValid:
                                  type: boolean
                              required:
                                - type
                                - isValid
                        override:
                          anyOf:
                            - type: object
                              properties:
                                isOverridden:
                                  type: boolean
                                  enum:
                                    - false
                                comment:
                                  type: "null"
                                createdBy:
                                  type: "null"
                              required:
                                - isOverridden
                                - comment
                                - createdBy
                            - type: object
                              properties:
                                isOverridden:
                                  type: boolean
                                  enum:
                                    - true
                                comment:
                                  type: string
                                  nullable: true
                                lastUpdate:
                                  format: date-time
                                  type: string
                                createdBy:
                                  type: object
                                  properties:
                                    id:
                                      format: uuid
                                      type: string
                                    fullName:
                                      type: string
                                  required:
                                    - id
                                    - fullName
                              required:
                                - isOverridden
                                - comment
                                - lastUpdate
                                - createdBy
                      required:
                        - status
                        - override
                  required:
                    - id
                    - name
                    - linkedAccountIds
                    - supportedVersion
                    - type
                    - result
  /entities/{entityId}/annual-accounts-filing/{filingId}/ignored-validations:
    put:
      summary: Change ignored annual accounts filing validation
      tags:
        - Annual Accounts Filing
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                validationId:
                  format: uuid
                  type: string
                comment:
                  type: string
                  nullable: true
                userId:
                  format: uuid
                  type: string
              required:
                - validationId
                - comment
                - userId
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts-filing/{filingId}/ignored-validations/{validationId}:
    delete:
      summary: Delete ignored annual accounts filing validation
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: validationId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts-filing/{filingId}/notes:
    get:
      summary: Get all notes for a specific annual accounts filing by id.
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    annualAccountsNoteId:
                      format: uuid
                      type: string
                    annualAccountsReportingLineIds:
                      type: array
                      items:
                        format: uuid
                        type: string
                      nullable: true
                    category:
                      type: string
                    name:
                      type: string
                    rank:
                      type: number
                    content:
                      type: string
                      nullable: true
                  required:
                    - annualAccountsNoteId
                    - annualAccountsReportingLineIds
                    - category
                    - name
                    - rank
                    - content
    put:
      summary: Save notes for a specific annual accounts filing by id.
      tags:
        - Annual Accounts Filing
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                notes:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      annualAccountsNoteId:
                        format: uuid
                        type: string
                      content:
                        minLength: 1
                        maxLength: 10000
                        type: string
                    required:
                      - annualAccountsNoteId
                      - content
              required:
                - notes
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts-filing/{filingId}/approvals:
    get:
      summary: Get list of necessary approvals for an annual account filing
      tags:
        - Annual Accounts Filing
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    role:
                      anyOf:
                        - type: string
                          enum:
                            - director
                        - type: string
                          enum:
                            - former-director
                        - type: string
                          enum:
                            - commissioner
                        - type: string
                          enum:
                            - former-commissioner
                    organisation:
                      type: string
                      nullable: true
                    location:
                      type: string
                    date:
                      format: date
                      type: string
                    isSigned:
                      type: boolean
                    reasonNotSigned:
                      type: string
                      nullable: true
                  required:
                    - id
                    - name
                    - role
                    - organisation
                    - location
                    - date
                    - isSigned
                    - reasonNotSigned
    put:
      summary: Save list of necessary approvals for an annual account filing
      tags:
        - Annual Accounts Filing
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                approvals:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          name:
                            type: string
                          role:
                            anyOf:
                              - type: string
                                enum:
                                  - director
                              - type: string
                                enum:
                                  - former-director
                              - type: string
                                enum:
                                  - commissioner
                              - type: string
                                enum:
                                  - former-commissioner
                          organisation:
                            type: string
                            nullable: true
                          location:
                            type: string
                          date:
                            format: date
                            type: string
                          isSigned:
                            type: boolean
                          reasonNotSigned:
                            type: string
                            nullable: true
                        required:
                          - name
                          - role
                          - organisation
                          - location
                          - date
                          - isSigned
                          - reasonNotSigned
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
              required:
                - approvals
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
  /entities/{entityId}/annual-accounts-filing/{filingId}/file:
    post:
      summary: File annual accounts filing by id.
      tags:
        - Annual Accounts Filing
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dateOfPreparation:
                  format: date
                  type: string
                dateOfAdoption:
                  format: date
                  type: string
                refiling:
                  anyOf:
                    - type: object
                      properties:
                        isRefiling:
                          type: boolean
                          enum:
                            - false
                      required:
                        - isRefiling
                    - type: object
                      properties:
                        isRefiling:
                          type: boolean
                          enum:
                            - true
                        refilingReason:
                          anyOf:
                            - type: string
                              enum:
                                - inaccuracies
                            - type: string
                              enum:
                                - technicalIssue
                        refilingExplanation:
                          minLength: 1
                          type: string
                      required:
                        - isRefiling
                        - refilingReason
                        - refilingExplanation
                notFullYearExplanation:
                  minLength: 1
                  type: string
                notFullYearExplanationLastYear:
                  minLength: 1
                  type: string
              required:
                - dateOfPreparation
                - dateOfAdoption
                - refiling
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: filingId
          required: true
      responses:
        "200":
          description: Default Response
  /integrations/providers:
    get:
      summary: Get a list of all integration providers that Monitr supports
      tags:
        - Integrations
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - bookkeeping
              - type: string
                enum:
                  - crm
              - type: string
                enum:
                  - subscription
              - type: string
                enum:
                  - inventory
              - type: string
                enum:
                  - project
              - type: string
                enum:
                  - historic-outstanding-item
              - type: string
                enum:
                  - other
              - type: string
                enum:
                  - personnel-costs
              - type: string
                enum:
                  - annual-accounts-filing
              - type: string
                enum:
                  - fixed-assets
          in: query
          name: integrationType
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      anyOf:
                        - type: string
                          enum:
                            - yuki
                        - type: string
                          enum:
                            - exact
                        - type: string
                          enum:
                            - octopus
                        - type: string
                          enum:
                            - xero
                        - type: string
                          enum:
                            - odoo
                        - type: string
                          enum:
                            - twinfield
                        - type: string
                          enum:
                            - quickbooks
                        - type: string
                          enum:
                            - moneybird
                        - type: string
                          enum:
                            - horus
                        - type: string
                          enum:
                            - monitr
                        - type: string
                          enum:
                            - exact:nl
                        - type: string
                          enum:
                            - hubspot
                        - type: string
                          enum:
                            - teamleader
                        - type: string
                          enum:
                            - stripe
                        - type: string
                          enum:
                            - csv
                        - type: string
                          enum:
                            - afas
                        - type: string
                          enum:
                            - nmbrs
                        - type: string
                          enum:
                            - finteqx
                    type:
                      anyOf:
                        - type: string
                          enum:
                            - bookkeeping
                        - type: string
                          enum:
                            - crm
                        - type: string
                          enum:
                            - subscription
                        - type: string
                          enum:
                            - inventory
                        - type: string
                          enum:
                            - project
                        - type: string
                          enum:
                            - historic-outstanding-item
                        - type: string
                          enum:
                            - other
                        - type: string
                          enum:
                            - personnel-costs
                        - type: string
                          enum:
                            - annual-accounts-filing
                        - type: string
                          enum:
                            - fixed-assets
                    name:
                      type: string
                    author:
                      type: string
                    icon:
                      format: uri
                      type: string
                    description:
                      type: string
                  required:
                    - id
                    - type
                    - name
                    - author
                    - icon
                    - description
  /integrations/token/organisations/{orgId}:
    get:
      summary: Get custom token to add to state of the redirect uri for the OAUTH 2
        flow for an organisation wide integration
      tags:
        - Integrations
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - bookkeeping
              - type: string
                enum:
                  - crm
              - type: string
                enum:
                  - subscription
              - type: string
                enum:
                  - inventory
              - type: string
                enum:
                  - project
              - type: string
                enum:
                  - historic-outstanding-item
              - type: string
                enum:
                  - other
              - type: string
                enum:
                  - personnel-costs
              - type: string
                enum:
                  - annual-accounts-filing
              - type: string
                enum:
                  - fixed-assets
          in: query
          name: integrationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: query
          name: integrationProviderId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  token:
                    format: uuid
                    type: string
                required:
                  - token
  /integrations/token/organisations/{orgId}/entities/{entityId}:
    get:
      summary: Get custom token to add to state of the redirect uri for the OAUTH 2
        flow for an entity wide integration
      tags:
        - Integrations
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - bookkeeping
              - type: string
                enum:
                  - crm
              - type: string
                enum:
                  - subscription
              - type: string
                enum:
                  - inventory
              - type: string
                enum:
                  - project
              - type: string
                enum:
                  - historic-outstanding-item
              - type: string
                enum:
                  - other
              - type: string
                enum:
                  - personnel-costs
              - type: string
                enum:
                  - annual-accounts-filing
              - type: string
                enum:
                  - fixed-assets
          in: query
          name: integrationType
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: query
          name: integrationProviderId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  token:
                    format: uuid
                    type: string
                required:
                  - token
  /integrations/bookkeeping/odoo/{orgId}:
    post:
      summary: Create a new Odoo integration
      tags:
        - Integrations
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                credential:
                  type: string
                dbUser:
                  type: string
                dbName:
                  type: string
                dbUrl:
                  type: string
              required:
                - credential
                - dbUser
                - dbName
                - dbUrl
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /integrations/bookkeeping/yuki/{orgId}:
    post:
      summary: Create a new yuki integration
      tags:
        - Integrations
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                credential:
                  type: string
              required:
                - credential
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/:
    post:
      summary: Create a new organisation
      tags:
        - Organisations
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
              required:
                - name
        required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  vat_number:
                    type: string
                    nullable: true
                  settings:
                    additionalProperties: true
                    type: object
                    properties: {}
                  organisation_type:
                    anyOf:
                      - type: string
                        enum:
                          - accountant
                      - type: string
                        enum:
                          - business
                required:
                  - id
                  - name
                  - vat_number
                  - settings
                  - organisation_type
  /organisations/{orgId}/teams/{teamId}/users/accept:
    post:
      summary: Accept a team invite using an invite token
      tags:
        - Teams
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                token:
                  type: string
              required:
                - token
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}:
    get:
      summary: Get details for a specific organisation
      tags:
        - Organisations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  vat_number:
                    type: string
                    nullable: true
                  settings:
                    additionalProperties: true
                    type: object
                    properties: {}
                  organisation_type:
                    anyOf:
                      - type: string
                        enum:
                          - accountant
                      - type: string
                        enum:
                          - business
                required:
                  - id
                  - name
                  - vat_number
                  - settings
                  - organisation_type
    put:
      summary: Update details and settings for a specific organisation
      tags:
        - Organisations
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                settings:
                  type: object
                  properties:
                    consolidation:
                      type: object
                      properties:
                        isActive:
                          type: boolean
                        relations:
                          additionalProperties: true
                          type: object
                          properties: {}
                      required:
                        - isActive
                        - relations
                  required:
                    - consolidation
              required:
                - name
                - settings
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  vat_number:
                    type: string
                    nullable: true
                  settings:
                    additionalProperties: true
                    type: object
                    properties: {}
                  organisation_type:
                    anyOf:
                      - type: string
                        enum:
                          - accountant
                      - type: string
                        enum:
                          - business
                required:
                  - id
                  - name
                  - vat_number
                  - settings
                  - organisation_type
  /organisations/{orgId}/integrations:
    get:
      summary: Get a list of active integrations for a specific organisation
      tags:
        - Integrations
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - bookkeeping
              - type: string
                enum:
                  - crm
              - type: string
                enum:
                  - subscription
              - type: string
                enum:
                  - inventory
              - type: string
                enum:
                  - project
              - type: string
                enum:
                  - historic-outstanding-item
              - type: string
                enum:
                  - other
              - type: string
                enum:
                  - personnel-costs
              - type: string
                enum:
                  - annual-accounts-filing
              - type: string
                enum:
                  - fixed-assets
          in: query
          name: type
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    provider:
                      anyOf:
                        - type: string
                          enum:
                            - yuki
                        - type: string
                          enum:
                            - exact
                        - type: string
                          enum:
                            - octopus
                        - type: string
                          enum:
                            - xero
                        - type: string
                          enum:
                            - odoo
                        - type: string
                          enum:
                            - twinfield
                        - type: string
                          enum:
                            - quickbooks
                        - type: string
                          enum:
                            - moneybird
                        - type: string
                          enum:
                            - horus
                        - type: string
                          enum:
                            - monitr
                        - type: string
                          enum:
                            - exact:nl
                        - type: string
                          enum:
                            - hubspot
                        - type: string
                          enum:
                            - teamleader
                        - type: string
                          enum:
                            - stripe
                        - type: string
                          enum:
                            - csv
                        - type: string
                          enum:
                            - afas
                        - type: string
                          enum:
                            - nmbrs
                        - type: string
                          enum:
                            - finteqx
                    type:
                      anyOf:
                        - type: string
                          enum:
                            - bookkeeping
                        - type: string
                          enum:
                            - crm
                        - type: string
                          enum:
                            - subscription
                        - type: string
                          enum:
                            - inventory
                        - type: string
                          enum:
                            - project
                        - type: string
                          enum:
                            - historic-outstanding-item
                        - type: string
                          enum:
                            - other
                        - type: string
                          enum:
                            - personnel-costs
                        - type: string
                          enum:
                            - annual-accounts-filing
                        - type: string
                          enum:
                            - fixed-assets
                    entities:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          name:
                            type: string
                            nullable: true
                          status:
                            anyOf:
                              - type: string
                                enum:
                                  - active
                              - type: string
                                enum:
                                  - not_found
                              - type: string
                                enum:
                                  - deleted
                          onboardingStatus:
                            anyOf:
                              - type: string
                                enum:
                                  - not_started
                              - type: string
                                enum:
                                  - dates
                              - type: string
                                enum:
                                  - reporting
                              - type: string
                                enum:
                                  - mapping
                              - type: string
                                enum:
                                  - dashboard
                              - type: string
                                enum:
                                  - done
                          vatNumber:
                            type: string
                            nullable: true
                        required:
                          - id
                          - name
                          - status
                          - onboardingStatus
                          - vatNumber
                    settings:
                      additionalProperties: true
                      type: object
                      properties: {}
                  required:
                    - id
                    - provider
                    - type
                    - entities
  /organisations/{orgId}/integrations/annual-accounts-filing/{provider}/companies:
    get:
      summary: Get a list of companies from the annual accounts filing integration
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: path
          name: provider
          required: true
      responses:
        "200":
          description: Default Response
    post:
      summary: Get a list of companies from the annual accounts filing integration by
        giving the api key
      tags:
        - Integrations
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                credentials:
                  minLength: 1
                  type: string
              required:
                - credentials
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: path
          name: provider
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/integrations/annual-accounts-filing/{provider}:
    post:
      summary: Create an annual accounts filing integration, with associated matches.
      tags:
        - Integrations
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                credentials:
                  minLength: 1
                  type: string
                matches:
                  type: array
                  items:
                    type: object
                    properties:
                      entityId:
                        format: uuid
                        type: string
                      companyId:
                        type: string
                    required:
                      - entityId
                      - companyId
              required:
                - credentials
                - matches
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: path
          name: provider
          required: true
      responses:
        "200":
          description: Default Response
    put:
      summary: Update the matches between Monitr entities and FinteQX companies.
      tags:
        - Integrations
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                matches:
                  type: array
                  items:
                    type: object
                    properties:
                      entityId:
                        format: uuid
                        type: string
                      companyId:
                        type: string
                    required:
                      - entityId
                      - companyId
              required:
                - matches
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: path
          name: provider
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/integrations/subscription/stripe:
    post:
      tags:
        - Import
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                apiKey:
                  type: string
              required:
                - apiKey
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/integrations/bookkeeping/{provider}/start-import:
    post:
      summary: Sync a bookkeeping integration for an organisation. Newly created
        entities of whitelisted vendor ids are activated automatically. The
        entity corresponding with the priority vendor id is synced first.
      tags:
        - Import
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                whitelistIds:
                  maxItems: 50
                  type: array
                  items:
                    type: string
                priorityIds:
                  type: array
                  items:
                    type: string
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
          in: path
          name: provider
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/integrations/bookkeeping/csv:
    post:
      summary: Create a new CSV integration
      tags:
        - Integrations
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                entityName:
                  minLength: 1
                  type: string
              required:
                - entityName
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  entityId:
                    format: uuid
                    type: string
                required:
                  - entityId
  /organisations/{orgId}/integrations/{type}/{integrationId}:
    get:
      summary: Get details for a specific integration
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - bookkeeping
              - type: string
                enum:
                  - crm
              - type: string
                enum:
                  - subscription
              - type: string
                enum:
                  - inventory
              - type: string
                enum:
                  - project
              - type: string
                enum:
                  - historic-outstanding-item
              - type: string
                enum:
                  - other
              - type: string
                enum:
                  - personnel-costs
              - type: string
                enum:
                  - annual-accounts-filing
              - type: string
                enum:
                  - fixed-assets
          in: path
          name: type
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  settings: {}
                  integrationProviderId:
                    anyOf:
                      - type: string
                        enum:
                          - yuki
                      - type: string
                        enum:
                          - exact
                      - type: string
                        enum:
                          - octopus
                      - type: string
                        enum:
                          - xero
                      - type: string
                        enum:
                          - odoo
                      - type: string
                        enum:
                          - twinfield
                      - type: string
                        enum:
                          - quickbooks
                      - type: string
                        enum:
                          - moneybird
                      - type: string
                        enum:
                          - horus
                      - type: string
                        enum:
                          - monitr
                      - type: string
                        enum:
                          - exact:nl
                      - type: string
                        enum:
                          - hubspot
                      - type: string
                        enum:
                          - teamleader
                      - type: string
                        enum:
                          - stripe
                      - type: string
                        enum:
                          - csv
                      - type: string
                        enum:
                          - afas
                      - type: string
                        enum:
                          - nmbrs
                      - type: string
                        enum:
                          - finteqx
                  createdAt:
                    format: date-time
                    type: string
                  entity: {}
                  entities:
                    type: array
                    items: {}
                    nullable: true
                  import:
                    additionalProperties: true
                    type: object
                    properties:
                      entity_id:
                        format: uuid
                        type: string
                      integration_id:
                        format: uuid
                        type: string
                      started_at:
                        format: date-time
                        type: string
                        nullable: true
                      finished_at:
                        format: date-time
                        type: string
                        nullable: true
                      last_success_at:
                        format: date-time
                        type: string
                        nullable: true
                      status:
                        anyOf:
                          - type: string
                            enum:
                              - waiting
                          - type: string
                            enum:
                              - in_progress
                          - type: string
                            enum:
                              - succeeded
                          - type: string
                            enum:
                              - failed
                    required:
                      - entity_id
                      - integration_id
                      - started_at
                      - finished_at
                      - last_success_at
                      - status
                    nullable: true
                required:
                  - id
                  - settings
                  - integrationProviderId
                  - createdAt
                  - entity
                nullable: true
  /organisations/{orgId}/integrations/{provider}/{integrationId}/vendor-entities:
    get:
      summary: Get all vendor entities to which the given integration has access.
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
          in: path
          name: provider
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    vatNumber:
                      type: string
                      nullable: true
                    active:
                      type: boolean
                  required:
                    - id
                    - name
                    - vatNumber
                    - active
  /organisations/{orgId}/integrations/{provider}/{integrationId}/languages:
    get:
      summary: Get all supported languages by the integration.
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
          in: path
          name: provider
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                    name:
                      type: string
                    active:
                      type: boolean
                    code:
                      type: string
                    isoCode:
                      type: string
                  required:
                    - id
                    - name
                    - active
                    - code
                    - isoCode
  /organisations/{orgId}/integrations/{integrationProviderId}/{integrationId}/settings:
    put:
      summary: Set the integration settings for a specific integration
      tags:
        - Integrations
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - anyOf:
                    - type: object
                      properties:
                        budgetingType:
                          type: string
                          enum:
                            - acrossProducts
                        defaultBudgetAccount:
                          type: string
                      required:
                        - budgetingType
                        - defaultBudgetAccount
                    - type: object
                      properties:
                        budgetingType:
                          type: string
                          enum:
                            - perProduct
                      required:
                        - budgetingType
                - type: object
                  properties:
                    companyId:
                      format: uuid
                      type: string
                  required:
                    - companyId
                - type: object
                  properties:
                    language:
                      type: string
                  required:
                    - language
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: path
          name: integrationProviderId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
  /organisations/{orgId}/integrations/{integrationId}:
    delete:
      summary: Delete an integration by id
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: integrationId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/integrations/{integrationProviderId}/{integrationType}:
    delete:
      summary: Delete all integrations for an organisation, provider and type
        combination
      tags:
        - Integrations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - yuki
              - type: string
                enum:
                  - exact
              - type: string
                enum:
                  - octopus
              - type: string
                enum:
                  - xero
              - type: string
                enum:
                  - odoo
              - type: string
                enum:
                  - twinfield
              - type: string
                enum:
                  - quickbooks
              - type: string
                enum:
                  - moneybird
              - type: string
                enum:
                  - horus
              - type: string
                enum:
                  - monitr
              - type: string
                enum:
                  - exact:nl
              - type: string
                enum:
                  - hubspot
              - type: string
                enum:
                  - teamleader
              - type: string
                enum:
                  - stripe
              - type: string
                enum:
                  - csv
              - type: string
                enum:
                  - afas
              - type: string
                enum:
                  - nmbrs
              - type: string
                enum:
                  - finteqx
          in: path
          name: integrationProviderId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - bookkeeping
              - type: string
                enum:
                  - crm
              - type: string
                enum:
                  - subscription
              - type: string
                enum:
                  - inventory
              - type: string
                enum:
                  - project
              - type: string
                enum:
                  - historic-outstanding-item
              - type: string
                enum:
                  - other
              - type: string
                enum:
                  - personnel-costs
              - type: string
                enum:
                  - annual-accounts-filing
              - type: string
                enum:
                  - fixed-assets
          in: path
          name: integrationType
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/teams:
    get:
      summary: Get a list of teams for a specific organisation
      tags:
        - Teams
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    organisation_id:
                      format: uuid
                      type: string
                    default:
                      type: boolean
                  required:
                    - id
                    - name
                    - organisation_id
                    - default
    post:
      summary: Create a new team
      tags:
        - Teams
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
              required:
                - name
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/teams/members:
    get:
      summary: Get a list of teams and their members for a specific organisation
      tags:
        - Teams
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        name:
                          type: string
                        organisation_id:
                          format: uuid
                          type: string
                        default:
                          type: boolean
                      required:
                        - id
                        - name
                        - organisation_id
                        - default
                    - type: object
                      properties:
                        users:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                  email:
                                    format: email
                                    type: string
                                  first_name:
                                    type: string
                                  last_name:
                                    type: string
                                required:
                                  - id
                                  - email
                                  - first_name
                                  - last_name
                              - type: object
                                properties:
                                  permissions:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - permissions
                              - type: object
                                properties:
                                  invite:
                                    type: object
                                    properties:
                                      pending:
                                        type: boolean
                                      expires:
                                        type: string
                                    required:
                                      - pending
                                required:
                                  - invite
                      required:
                        - users
  /organisations/{orgId}/teams/entities:
    get:
      summary: Get a list of teams and their entities for a specific organisation
      tags:
        - Teams
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/teams/{teamId}:
    put:
      summary: Update a team
      tags:
        - Teams
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
              required:
                - name
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      summary: Delete a team
      tags:
        - Teams
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/teams/{teamId}/users:
    post:
      summary: Invite a user/email to a team
      tags:
        - Teams
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                format: email
                type: string
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/teams/{teamId}/users/{userId}/permissions:
    post:
      summary: Set the permissions a user has in a team
      tags:
        - Teams
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                permissions:
                  uniqueItems: true
                  type: array
                  items:
                    type: string
                    enum:
                      - entity.core:read
                      - entity.core:write
                      - entity.receivables:read
                      - entity.payables:read
                      - entity.reports:read
                      - entity.general_ledger:read
                      - entity.entity_data:read
                      - entity.entity_data:write
                      - organisation.organisation_data:read
                      - organisation.organisation_data:write
                      - organisation.teams:read
                      - organisation.teams:write
                      - organisation.reports:read
                      - organisation.general_ledger:read
              required:
                - permissions
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: userId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  permissions:
                    uniqueItems: true
                    type: array
                    items:
                      type: string
                      enum:
                        - entity.core:read
                        - entity.core:write
                        - entity.receivables:read
                        - entity.payables:read
                        - entity.reports:read
                        - entity.general_ledger:read
                        - entity.entity_data:read
                        - entity.entity_data:write
                        - organisation.organisation_data:read
                        - organisation.organisation_data:write
                        - organisation.teams:read
                        - organisation.teams:write
                        - organisation.reports:read
                        - organisation.general_ledger:read
                required:
                  - permissions
  /organisations/{orgId}/teams/{teamId}/users/{userId}:
    delete:
      summary: Remove a user from a team
      tags:
        - Teams
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: userId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/entities:
    get:
      summary: Get a list of entities for a specific organisation that the user has
        access to
      tags:
        - Entity
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - type: object
                      allOf:
                        - type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            code:
                              type: string
                              nullable: true
                            name:
                              type: string
                              nullable: true
                            settings:
                              additionalProperties: true
                              type: object
                              properties: {}
                            axis:
                              format: uuid
                              type: string
                              nullable: true
                            status:
                              anyOf:
                                - type: string
                                  enum:
                                    - active
                                - type: string
                                  enum:
                                    - not_found
                                - type: string
                                  enum:
                                    - deleted
                            currency:
                              anyOf:
                                - type: string
                                  enum:
                                    - EUR
                                - type: string
                                  enum:
                                    - USD
                                - type: string
                                  enum:
                                    - GBP
                                - type: string
                                  enum:
                                    - AUD
                                - type: string
                                  enum:
                                    - SEK
                                - type: string
                                  enum:
                                    - BRL
                          required:
                            - id
                            - code
                            - name
                            - settings
                            - axis
                            - status
                            - currency
                        - type: object
                          properties:
                            organisation_id:
                              format: uuid
                              type: string
                            ytd_start:
                              format: date
                              type: string
                              nullable: true
                            last_date_actuals:
                              format: date
                              type: string
                              nullable: true
                            ytg_end:
                              format: date
                              type: string
                              nullable: true
                            budget_account_id_receivable:
                              format: uuid
                              type: string
                              nullable: true
                            budget_account_id_payable:
                              format: uuid
                              type: string
                              nullable: true
                            vat_number:
                              type: string
                              nullable: true
                            deleted_at:
                              format: date-time
                              type: string
                              nullable: true
                            onboarding_status:
                              anyOf:
                                - type: string
                                  enum:
                                    - not_started
                                - type: string
                                  enum:
                                    - dates
                                - type: string
                                  enum:
                                    - reporting
                                - type: string
                                  enum:
                                    - mapping
                                - type: string
                                  enum:
                                    - dashboard
                                - type: string
                                  enum:
                                    - done
                            country_code:
                              type: string
                          required:
                            - organisation_id
                            - ytd_start
                            - last_date_actuals
                            - ytg_end
                            - budget_account_id_receivable
                            - budget_account_id_payable
                            - vat_number
                            - deleted_at
                            - onboarding_status
                            - country_code
                    - type: object
                      properties:
                        integration:
                          type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            integrationProviderId:
                              anyOf:
                                - type: string
                                  enum:
                                    - yuki
                                - type: string
                                  enum:
                                    - exact
                                - type: string
                                  enum:
                                    - octopus
                                - type: string
                                  enum:
                                    - xero
                                - type: string
                                  enum:
                                    - odoo
                                - type: string
                                  enum:
                                    - twinfield
                                - type: string
                                  enum:
                                    - quickbooks
                                - type: string
                                  enum:
                                    - moneybird
                                - type: string
                                  enum:
                                    - horus
                                - type: string
                                  enum:
                                    - monitr
                                - type: string
                                  enum:
                                    - exact:nl
                                - type: string
                                  enum:
                                    - hubspot
                                - type: string
                                  enum:
                                    - teamleader
                                - type: string
                                  enum:
                                    - stripe
                                - type: string
                                  enum:
                                    - csv
                                - type: string
                                  enum:
                                    - afas
                                - type: string
                                  enum:
                                    - nmbrs
                                - type: string
                                  enum:
                                    - finteqx
                            integrationType:
                              anyOf:
                                - type: string
                                  enum:
                                    - bookkeeping
                                - type: string
                                  enum:
                                    - crm
                                - type: string
                                  enum:
                                    - subscription
                                - type: string
                                  enum:
                                    - inventory
                                - type: string
                                  enum:
                                    - project
                                - type: string
                                  enum:
                                    - historic-outstanding-item
                                - type: string
                                  enum:
                                    - other
                                - type: string
                                  enum:
                                    - personnel-costs
                                - type: string
                                  enum:
                                    - annual-accounts-filing
                                - type: string
                                  enum:
                                    - fixed-assets
                          required:
                            - id
                            - integrationProviderId
                            - integrationType
                          nullable: true
                        integrations:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    format: uuid
                                    type: string
                                  organisationId:
                                    format: uuid
                                    type: string
                                  entityId:
                                    format: uuid
                                    type: string
                                    nullable: true
                                  settings:
                                    additionalProperties: true
                                    type: object
                                    properties: {}
                                  integrationProviderId:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - yuki
                                      - type: string
                                        enum:
                                          - exact
                                      - type: string
                                        enum:
                                          - octopus
                                      - type: string
                                        enum:
                                          - xero
                                      - type: string
                                        enum:
                                          - odoo
                                      - type: string
                                        enum:
                                          - twinfield
                                      - type: string
                                        enum:
                                          - quickbooks
                                      - type: string
                                        enum:
                                          - moneybird
                                      - type: string
                                        enum:
                                          - horus
                                      - type: string
                                        enum:
                                          - monitr
                                      - type: string
                                        enum:
                                          - exact:nl
                                      - type: string
                                        enum:
                                          - hubspot
                                      - type: string
                                        enum:
                                          - teamleader
                                      - type: string
                                        enum:
                                          - stripe
                                      - type: string
                                        enum:
                                          - csv
                                      - type: string
                                        enum:
                                          - afas
                                      - type: string
                                        enum:
                                          - nmbrs
                                      - type: string
                                        enum:
                                          - finteqx
                                  integrationType:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - bookkeeping
                                      - type: string
                                        enum:
                                          - crm
                                      - type: string
                                        enum:
                                          - subscription
                                      - type: string
                                        enum:
                                          - inventory
                                      - type: string
                                        enum:
                                          - project
                                      - type: string
                                        enum:
                                          - historic-outstanding-item
                                      - type: string
                                        enum:
                                          - other
                                      - type: string
                                        enum:
                                          - personnel-costs
                                      - type: string
                                        enum:
                                          - annual-accounts-filing
                                      - type: string
                                        enum:
                                          - fixed-assets
                                required:
                                  - id
                                  - organisationId
                                  - entityId
                                  - settings
                                  - integrationProviderId
                                  - integrationType
                              - type: object
                                properties:
                                  integrationProvider:
                                    type: object
                                    properties:
                                      id:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - yuki
                                          - type: string
                                            enum:
                                              - exact
                                          - type: string
                                            enum:
                                              - octopus
                                          - type: string
                                            enum:
                                              - xero
                                          - type: string
                                            enum:
                                              - odoo
                                          - type: string
                                            enum:
                                              - twinfield
                                          - type: string
                                            enum:
                                              - quickbooks
                                          - type: string
                                            enum:
                                              - moneybird
                                          - type: string
                                            enum:
                                              - horus
                                          - type: string
                                            enum:
                                              - monitr
                                          - type: string
                                            enum:
                                              - exact:nl
                                          - type: string
                                            enum:
                                              - hubspot
                                          - type: string
                                            enum:
                                              - teamleader
                                          - type: string
                                            enum:
                                              - stripe
                                          - type: string
                                            enum:
                                              - csv
                                          - type: string
                                            enum:
                                              - afas
                                          - type: string
                                            enum:
                                              - nmbrs
                                          - type: string
                                            enum:
                                              - finteqx
                                      name:
                                        type: string
                                      author:
                                        type: string
                                      icon:
                                        format: uri
                                        type: string
                                    required:
                                      - id
                                      - name
                                      - author
                                      - icon
                          nullable: true
                      required:
                        - integration
                        - integrations
    post:
      summary: Create new entities for an organisation
      tags:
        - Entity
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                integrationId:
                  format: uuid
                  type: string
                integrationProviderId:
                  anyOf:
                    - type: string
                      enum:
                        - yuki
                    - type: string
                      enum:
                        - exact
                    - type: string
                      enum:
                        - octopus
                    - type: string
                      enum:
                        - xero
                    - type: string
                      enum:
                        - odoo
                    - type: string
                      enum:
                        - twinfield
                    - type: string
                      enum:
                        - quickbooks
                    - type: string
                      enum:
                        - moneybird
                    - type: string
                      enum:
                        - horus
                entityCodes:
                  minItems: 1
                  maxItems: 50
                  type: array
                  items:
                    type: string
              required:
                - integrationId
                - integrationProviderId
                - entityCodes
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/teams/{teamId}/entities:
    post:
      summary: Assign a business entity to a team
      tags:
        - Teams
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                format: uuid
                type: string
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/teams/{teamId}/entities/{entityId}:
    delete:
      summary: Remove a business entity from a team
      tags:
        - Teams
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/entities/relations:
    get:
      summary: Get all relations from all entities
      tags:
        - Consolidation
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  entities:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        name:
                          type: string
                          nullable: true
                        vatNumber:
                          type: string
                          nullable: true
                      required:
                        - id
                        - name
                        - vatNumber
                  relations:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                            nullable: true
                          vatNumber:
                            type: string
                            nullable: true
                        required:
                          - id
                          - name
                          - vatNumber
                  matchedEntities:
                    type: object
                    additionalProperties:
                      type: object
                      additionalProperties:
                        type: array
                        items:
                          type: string
                required:
                  - entities
                  - relations
                  - matchedEntities
  /organisations/{orgId}/dashboard:
    get:
      summary: Get the dashboard for an organisation
      tags:
        - Dashboard
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  config:
                    type: object
                    properties:
                      panels:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                            version:
                              type: string
                            properties:
                              type: object
                              properties:
                                lines:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - lines
                          required:
                            - id
                            - type
                            - version
                            - properties
                      version:
                        type: string
                    required:
                      - panels
                      - version
                  organisationId:
                    format: uuid
                    type: string
                required:
                  - id
                  - config
                  - organisationId
                nullable: true
    put:
      summary: Update the dashboard for an organisation
      tags:
        - Dashboard
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                config:
                  type: object
                  properties:
                    panels:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: string
                          version:
                            type: string
                          properties:
                            type: object
                            properties:
                              lines:
                                type: array
                                items:
                                  type: string
                            required:
                              - lines
                        required:
                          - id
                          - type
                          - version
                          - properties
                    version:
                      type: string
                  required:
                    - panels
                    - version
              required:
                - config
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/teams/{teamId}/entities/{entityId}/dashboard:
    get:
      summary: Get the dashboard for a specific team
      tags:
        - Dashboard
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  config:
                    type: object
                    properties:
                      panels:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            type:
                              type: string
                            version:
                              type: string
                            properties:
                              type: object
                              properties:
                                lines:
                                  type: array
                                  items:
                                    type: string
                              required:
                                - lines
                          required:
                            - id
                            - type
                            - version
                            - properties
                      version:
                        type: string
                    required:
                      - panels
                      - version
                  teamId:
                    format: uuid
                    type: string
                  entityId:
                    format: uuid
                    type: string
                required:
                  - id
                  - config
                  - teamId
                  - entityId
                nullable: true
    put:
      summary: Update the dashboard for a specific team and entity
      tags:
        - Dashboard
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                config:
                  type: object
                  properties:
                    panels:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: string
                          version:
                            type: string
                          properties:
                            type: object
                            properties:
                              lines:
                                type: array
                                items:
                                  type: string
                            required:
                              - lines
                        required:
                          - id
                          - type
                          - version
                          - properties
                    version:
                      type: string
                  required:
                    - panels
                    - version
              required:
                - config
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: teamId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/cash-flow-reporting-lines:
    get:
      summary: Get a list of reporting lines for the cash flow report
      tags:
        - Reporting Lines
        - Consolidation
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    rank:
                      type: number
                    parentId:
                      type: string
                      nullable: true
                    top:
                      type: boolean
                    entityId:
                      type: string
                      nullable: true
                    organisationId:
                      type: string
                      nullable: true
                  required:
                    - id
                    - name
                    - rank
                    - parentId
                    - top
                    - entityId
                    - organisationId
    put:
      summary: Set the list of reporting lines for the cash flow report
      tags:
        - Reporting Lines
        - Consolidation
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      rank:
                        type: number
                      top:
                        type: boolean
                    required:
                      - id
                      - name
                      - rank
                      - top
                  - type: object
                    properties:
                      parentId:
                        type: string
                        nullable: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reporting-lines:
    get:
      summary: Get a list of reporting lines for the profit & loss and balance sheet
        reports
      tags:
        - Reporting Lines
        - Consolidation
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reporting-lines/{report}:
    get:
      summary: Get a list of reporting lines for a specific report
      tags:
        - Reporting Lines
        - Consolidation
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - PL
              - type: string
                enum:
                  - BS
          in: path
          name: report
          required: true
      responses:
        "200":
          description: Default Response
    put:
      summary: Set the list of reporting lines for a specific report
      tags:
        - Reporting Lines
        - Consolidation
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                reportingLines:
                  type: array
                  items:
                    additionalProperties: false
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      rank:
                        type: number
                      top:
                        type: boolean
                      parent_id:
                        type: string
                        nullable: true
                      cash_flow_reporting_line_id:
                        type: string
                        nullable: true
                    required:
                      - id
                      - name
                      - rank
                      - top
                      - parent_id
              required:
                - reportingLines
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - PL
              - type: string
                enum:
                  - BS
          in: path
          name: report
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/mappings/batch:
    patch:
      summary: Patch mappings for a specific business entity
      tags:
        - Mappings
        - Consolidation
      requestBody:
        content:
          application/json:
            schema:
              minItems: 1
              type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      action:
                        type: string
                        enum:
                          - DELETE
                    required:
                      - id
                      - action
                  - type: object
                    allOf:
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                          action:
                            type: string
                            enum:
                              - UPDATE
                        required:
                          - id
                          - action
                      - type: object
                        properties:
                          organisationReportingLineId:
                            type: string
                            nullable: true
                        required:
                          - organisationReportingLineId
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                    - type: object
                      properties:
                        action:
                          anyOf:
                            - type: string
                              enum:
                                - UPDATE
                            - type: string
                              enum:
                                - DELETE
                        id:
                          format: uuid
                          type: string
                      required:
                        - action
                        - id
                    - type: object
                      allOf:
                        - type: object
                          properties:
                            action:
                              anyOf:
                                - type: string
                                  enum:
                                    - UPDATE
                                - type: string
                                  enum:
                                    - DELETE
                            id:
                              format: uuid
                              type: string
                          required:
                            - action
                            - id
                        - type: object
                          properties:
                            mapping:
                              type: object
                              properties:
                                organisationReportingLineId:
                                  type: string
                                  nullable: true
                              required:
                                - organisationReportingLineId
                          required:
                            - mapping
  /organisations/{orgId}/mappings/copy-to-consolidation:
    post:
      summary: Copy unmapped mappings from entity to consolidation if the reporting
        line name matches
      tags:
        - Mappings
        - Consolidation
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                entityId:
                  format: uuid
                  type: string
              required:
                - entityId
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/adjusting-entries:
    get:
      summary: Get a list of adjusting entries
      tags:
        - Adjusting Entries
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    datePeriod:
                      format: date
                      type: string
                    description:
                      type: string
                    amount:
                      type: number
                    entityIdFrom:
                      format: uuid
                      type: string
                    entityIdTo:
                      format: uuid
                      type: string
                    accountId:
                      format: uuid
                      type: string
                    analyticalAxisId:
                      format: uuid
                      type: string
                      nullable: true
                    user:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        fullName:
                          type: string
                      required:
                        - id
                        - fullName
                  required:
                    - id
                    - datePeriod
                    - description
                    - amount
                    - entityIdFrom
                    - entityIdTo
                    - accountId
                    - analyticalAxisId
                    - user
    put:
      summary: Set the list of adjusting entries for and organisation
      tags:
        - Adjusting Entries
        - Consolidation
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                allOf:
                  - type: object
                    properties:
                      id:
                        type: string
                      datePeriod:
                        format: date
                        type: string
                      description:
                        type: string
                      amount:
                        type: number
                      entityIdFrom:
                        format: uuid
                        type: string
                      entityIdTo:
                        format: uuid
                        type: string
                      accountId:
                        format: uuid
                        type: string
                      analyticalAxisId:
                        format: uuid
                        type: string
                        nullable: true
                    required:
                      - id
                      - datePeriod
                      - description
                      - amount
                      - entityIdFrom
                      - entityIdTo
                      - accountId
                      - analyticalAxisId
                  - type: object
                    properties:
                      userId:
                        format: uuid
                        type: string
                    required:
                      - userId
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/validations/mapping:
    get:
      summary: Get the mapping validation of your organisation's consolidation
      tags:
        - Validation
        - Consolidation
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: boolean
  /organisations/{orgId}/validations/report:
    get:
      summary: Get the report validation of your organisation's consolidation
      tags:
        - Validation
        - Consolidation
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - PL
              - type: string
                enum:
                  - BS
          in: query
          name: report
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: object
                  additionalProperties:
                    type: number
  /organisations/{orgId}/validations/balance-sheet:
    get:
      summary: Get the Balance sheet validation of your organisation's consolidation
      tags:
        - Validation
        - Consolidation
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: boolean
  /organisations/{orgId}/custom-metrics:
    get:
      summary: Get a list of custom metrics
      tags:
        - Custom Metrics
        - Consolidation
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        customMetricType:
                          anyOf:
                            - type: string
                              enum:
                                - net_result
                            - type: string
                              enum:
                                - revenue
                            - type: string
                              enum:
                                - cash_and_bank
                            - type: string
                              enum:
                                - total_balance_sheet
                            - type: string
                              enum:
                                - sales_and_marketing_costs
                            - type: string
                              enum:
                                - result_carried_forward
                            - type: string
                              enum:
                                - bank
                            - type: string
                              enum:
                                - equity
                            - type: string
                              enum:
                                - fx_rate_difference_bs
                            - type: string
                              enum:
                                - fx_rate_difference_pl
                        reportingLineId:
                          type: string
                          nullable: true
                        report:
                          type: string
                          enum:
                            - PL
                            - BS
                        organisationId:
                          format: uuid
                          type: string
                      required:
                        - id
                        - customMetricType
                        - reportingLineId
                        - report
                        - organisationId
                    - type: object
                      properties:
                        default:
                          type: boolean
                        mandatory:
                          type: boolean
                      required:
                        - default
                        - mandatory
    put:
      summary: Set the list of custom metrics
      tags:
        - Custom Metrics
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  customMetricType:
                    anyOf:
                      - type: string
                        enum:
                          - net_result
                      - type: string
                        enum:
                          - revenue
                      - type: string
                        enum:
                          - cash_and_bank
                      - type: string
                        enum:
                          - total_balance_sheet
                      - type: string
                        enum:
                          - sales_and_marketing_costs
                      - type: string
                        enum:
                          - result_carried_forward
                      - type: string
                        enum:
                          - bank
                      - type: string
                        enum:
                          - equity
                      - type: string
                        enum:
                          - fx_rate_difference_bs
                      - type: string
                        enum:
                          - fx_rate_difference_pl
                  reportingLineId:
                    type: string
                    nullable: true
                  report:
                    type: string
                    enum:
                      - PL
                      - BS
                required:
                  - id
                  - customMetricType
                  - reportingLineId
                  - report
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports/PL/actuals:
    get:
      summary: Get Profit & Loss Actuals report
      tags: &a11
        - Reporting
        - Consolidation
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports-with-mappings/PL/actuals:
    get:
      summary: Get Profit & Loss Actuals report
      tags: *a11
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports/PL/forecast:
    get:
      summary: Get Profit & Loss Forecast report
      tags: &a12
        - Reporting
        - Consolidation
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports-with-mappings/PL/forecast:
    get:
      summary: Get Profit & Loss Forecast report
      tags: *a12
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports/PL/delta:
    get:
      summary: Get Profit & Loss Delta report
      tags: &a13
        - Reporting
        - Consolidation
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports-with-mappings/PL/delta:
    get:
      summary: Get Profit & Loss Delta report
      tags: *a13
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            type: string
            enum:
              - percent
          in: query
          name: cardinalityType
          required: true
        - schema:
            type: string
            enum:
              - revenue
          in: query
          name: cardinalityValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports/BS/actuals:
    get:
      summary: Get Balance Sheet Actuals report
      tags: &a14
        - Reporting
        - Consolidation
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports-with-mappings/BS/actuals:
    get:
      summary: Get Balance Sheet Actuals report
      tags: *a14
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports/BS/forecast:
    get:
      summary: Get Balance Sheet Forecast report
      tags: &a15
        - Reporting
        - Consolidation
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports-with-mappings/BS/forecast:
    get:
      summary: Get Balance Sheet Forecast report
      tags: *a15
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports/BS/delta:
    get:
      summary: Get Balance Sheet Delta report
      tags: &a16
        - Reporting
        - Consolidation
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports-with-mappings/BS/delta:
    get:
      summary: Get Balance Sheet Delta report
      tags: *a16
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            type: boolean
          in: query
          name: applyZeroBalance
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports/CF/actuals:
    get:
      summary: Get Cash Flow Actuals report
      tags: &a17
        - Reporting
        - Consolidation
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports-with-mappings/CF/actuals:
    get:
      summary: Get Cash Flow Actuals report
      tags: *a17
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports/CF/forecast:
    get:
      summary: Get Cash Flow Forecast report
      tags: &a18
        - Reporting
        - Consolidation
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports-with-mappings/CF/forecast:
    get:
      summary: Get Cash Flow Forecast report
      tags: *a18
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - entity
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports/CF/delta:
    get:
      summary: Get Cash Flow Delta report
      tags: &a19
        - Reporting
        - Consolidation
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/reports-with-mappings/CF/delta:
    get:
      summary: Get Cash Flow Delta report
      tags: *a19
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: comparisonBudgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationType
          required: true
        - schema:
            type: string
            enum:
              - interval
          in: query
          name: aggregationValue
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/transaction-tables:
    get:
      summary: Get all transactions and budgets
      tags:
        - General Ledger
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - PL
              - type: string
                enum:
                  - BS
              - type: string
                enum:
                  - CF
          in: query
          name: report
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - actuals
              - type: string
                enum:
                  - forecast
              - type: string
                enum:
                  - delta
          in: query
          name: reportType
          required: true
        - schema:
            type: string
          in: query
          name: reportingLineId
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: mappingId
          required: false
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - period
              - type: string
                enum:
                  - entity
          in: query
          name: aggregationType
          required: true
        - schema:
            minimum: 1
            maximum: 1000
            default: 1000
            type: number
          in: query
          name: limit
          required: true
        - schema:
            minimum: 0
            default: 0
            type: number
          in: query
          name: offset
          required: true
        - schema:
            pattern: ^([a-zA-Z-_]+):(ASC|DESC)$
            default: datePeriod:ASC
            type: string
          in: query
          name: orderBy
          required: true
        - schema:
            type: string
          in: query
          name: pivotColumn
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            anyOf:
              - format: uuid
                type: string
              - minItems: 1
                type: array
                items:
                  format: uuid
                  type: string
          in: query
          name: filterEntityId
          required: false
        - schema:
            anyOf:
              - format: date
                type: string
              - minItems: 1
                type: array
                items:
                  format: date
                  type: string
          in: query
          name: filterPeriod
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: filterAccountNumber
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: filterAnalyticalAxis
          required: false
        - schema:
            anyOf:
              - type: string
              - minItems: 1
                type: array
                items:
                  type: string
          in: query
          name: filterRelation
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      allOf:
                        - type: object
                          properties:
                            entityId:
                              format: uuid
                              type: string
                          required:
                            - entityId
                        - type: object
                          properties:
                            id:
                              type: string
                            datePeriod:
                              type: string
                            description:
                              type: string
                              nullable: true
                            relationName:
                              type: string
                              nullable: true
                            accountNumber:
                              type: string
                            accountName:
                              type: string
                            analyticalAxisId:
                              type: string
                              nullable: true
                            analyticalAxisAccount:
                              type: string
                              nullable: true
                            analyticalAxisDescription:
                              type: string
                              nullable: true
                            amount:
                              type: number
                            type:
                              type: string
                          required:
                            - id
                            - datePeriod
                            - description
                            - relationName
                            - accountNumber
                            - accountName
                            - analyticalAxisId
                            - analyticalAxisAccount
                            - analyticalAxisDescription
                            - amount
                            - type
                  meta:
                    allOf:
                      - type: object
                        allOf:
                          - type: object
                            properties: {}
                          - type: object
                            properties:
                              totalCount:
                                type: number
                              totalAmount:
                                type: number
                            required:
                              - totalCount
                              - totalAmount
                      - type: object
                        properties:
                          filterOptions:
                            type: object
                            properties:
                              entityId:
                                type: array
                                items:
                                  format: uuid
                                  type: string
                              datePeriod:
                                type: array
                                items:
                                  format: date
                                  type: string
                              accountNumber:
                                type: array
                                items:
                                  type: string
                              analyticalAxisAccount:
                                type: array
                                items:
                                  type: string
                              relationName:
                                type: array
                                items:
                                  type: string
                        required:
                          - filterOptions
                required:
                  - data
                  - meta
  /organisations/{orgId}/accounts:
    get:
      summary: Get an object of each entity in an organisation with its accounts
      tags:
        - Accounts
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      account_number:
                        type: string
                      account_name:
                        type: string
                      is_active:
                        type: boolean
                    required:
                      - id
                      - account_number
                      - account_name
                      - is_active
  /organisations/{orgId}/analytical-axes:
    get:
      summary: Get all analytical axes for a specific business entity
      tags:
        - Analytical Axes
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      account:
                        type: string
                      description:
                        type: string
                    required:
                      - id
                      - account
                      - description
  /organisations/{orgId}/organisations-subscription-holder:
    put:
      summary: Set the subscription holder of an organisation to the subscription
        holder of another organisation.
      tags:
        - Monitr Subscription
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                orgId:
                  format: uuid
                  type: string
              required:
                - orgId
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/stripe-info:
    get:
      summary: Get stripe information for a subscription holder
      tags:
        - Monitr Subscription
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  organisationName:
                    type: string
                  stripeEmail:
                    type: string
                    nullable: true
                required:
                  - organisationName
                  - stripeEmail
  /organisations/{orgId}/paid-organisations:
    get:
      summary: Get all subscription an organisation is paying for
      tags:
        - Monitr Subscription
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    vatNumber:
                      type: string
                      nullable: true
                  required:
                    - id
                    - name
                    - vatNumber
  /organisations/{orgId}/create-customer-portal-session:
    post:
      summary: Redirect to Stripe Customer Portal session
      tags:
        - Monitr Subscription
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/monitr-subscription:
    patch:
      summary: Upgrade or downgrade the Monitr Subscription
      tags:
        - Monitr Subscription
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                tier:
                  anyOf:
                    - type: string
                      enum:
                        - lite
                    - type: string
                      enum:
                        - premium
              required:
                - tier
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/booklets:
    get:
      summary: Get list of created booklets
      tags:
        - Booklets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    entityId:
                      format: uuid
                      type: string
                      nullable: true
                    organisationId:
                      format: uuid
                      type: string
                      nullable: true
                  required:
                    - id
                    - name
                    - entityId
                    - organisationId
    post:
      summary: Create a new booklet
      tags:
        - Booklets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                bookletPages:
                  type: array
                  items:
                    type: object
                    properties:
                      settings:
                        anyOf:
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_WATERFALL
                                required:
                                  - type
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_KPI
                                  aggregation:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - period
                                      value:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - month
                                          - type: string
                                            enum:
                                              - quarter
                                          - type: string
                                            enum:
                                              - year
                                    required:
                                      - type
                                      - value
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_PERCENTAGE
                                  aggregation:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - period
                                      value:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - month
                                          - type: string
                                            enum:
                                              - quarter
                                          - type: string
                                            enum:
                                              - year
                                    required:
                                      - type
                                      - value
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  reportType:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - actuals
                                      - type: string
                                        enum:
                                          - forecast
                                      - type: string
                                        enum:
                                          - delta
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - reportType
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_REPORT
                                  deltaComparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - interval
                                          value:
                                            type: string
                                            enum:
                                              - interval
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - analyticalAxis
                                          value:
                                            type: string
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                  reportingLineId:
                                    type: string
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_ACTUALS
                                  reportType:
                                    type: string
                                    enum:
                                      - actuals
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - analyticalAxis
                                          value:
                                            type: string
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - reportType
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_FORECAST
                                  reportType:
                                    type: string
                                    enum:
                                      - forecast
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - reportType
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_DELTA
                                  deltaComparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                  reportType:
                                    type: string
                                    enum:
                                      - delta
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - interval
                                          value:
                                            type: string
                                            enum:
                                              - interval
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - deltaComparisonMethod
                                  - reportType
                                  - aggregation
                    required:
                      - settings
              required:
                - name
                - bookletPages
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  name:
                    type: string
                  entityId:
                    format: uuid
                    type: string
                    nullable: true
                  organisationId:
                    format: uuid
                    type: string
                    nullable: true
                required:
                  - id
                  - name
                  - entityId
                  - organisationId
  /organisations/{orgId}/booklets/{bookletId}:
    get:
      summary: Get booklet by id
      tags:
        - Booklets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: bookletId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                allOf:
                  - type: object
                    properties:
                      id:
                        format: uuid
                        type: string
                      name:
                        type: string
                      entityId:
                        format: uuid
                        type: string
                        nullable: true
                      organisationId:
                        format: uuid
                        type: string
                        nullable: true
                    required:
                      - id
                      - name
                      - entityId
                      - organisationId
                  - type: object
                    properties:
                      bookletPages:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            bookletId:
                              format: uuid
                              type: string
                            settings:
                              anyOf:
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - graph
                                        reportingLineIds:
                                          type: array
                                          items:
                                            type: string
                                        comparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                      required:
                                        - visualizationType
                                        - reportingLineIds
                                        - comparisonMethod
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - CHART_WATERFALL
                                      required:
                                        - type
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - graph
                                        reportingLineIds:
                                          type: array
                                          items:
                                            type: string
                                        comparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                      required:
                                        - visualizationType
                                        - reportingLineIds
                                        - comparisonMethod
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - CHART_KPI
                                        aggregation:
                                          type: object
                                          properties:
                                            type:
                                              type: string
                                              enum:
                                                - period
                                            value:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - month
                                                - type: string
                                                  enum:
                                                    - quarter
                                                - type: string
                                                  enum:
                                                    - year
                                          required:
                                            - type
                                            - value
                                      required:
                                        - type
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - graph
                                        reportingLineIds:
                                          type: array
                                          items:
                                            type: string
                                        comparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                      required:
                                        - visualizationType
                                        - reportingLineIds
                                        - comparisonMethod
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - CHART_PERCENTAGE
                                        aggregation:
                                          type: object
                                          properties:
                                            type:
                                              type: string
                                              enum:
                                                - period
                                            value:
                                              anyOf:
                                                - type: string
                                                  enum:
                                                    - month
                                                - type: string
                                                  enum:
                                                    - quarter
                                                - type: string
                                                  enum:
                                                    - year
                                          required:
                                            - type
                                            - value
                                      required:
                                        - type
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        report:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - PL
                                            - type: string
                                              enum:
                                                - BS
                                            - type: string
                                              enum:
                                                - CF
                                        reportType:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - actuals
                                            - type: string
                                              enum:
                                                - forecast
                                            - type: string
                                              enum:
                                                - delta
                                        cardinality:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - value
                                                value:
                                                  type: number
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - percent
                                                value:
                                                  type: string
                                                  enum:
                                                    - revenue
                                              required:
                                                - type
                                                - value
                                        axisIdsToExclude:
                                          type: array
                                          items:
                                            type: string
                                        analyticalAxisIds:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - report
                                        - reportType
                                        - cardinality
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - graph
                                      required:
                                        - visualizationType
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - CHART_REPORT
                                        deltaComparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                        aggregation:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - period
                                                value:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - month
                                                    - type: string
                                                      enum:
                                                        - quarter
                                                    - type: string
                                                      enum:
                                                        - year
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - interval
                                                value:
                                                  type: string
                                                  enum:
                                                    - interval
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - analyticalAxis
                                                value:
                                                  type: string
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - entity
                                                value:
                                                  type: string
                                                  enum:
                                                    - entity
                                              required:
                                                - type
                                                - value
                                        reportingLineId:
                                          type: string
                                      required:
                                        - type
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        report:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - PL
                                            - type: string
                                              enum:
                                                - BS
                                            - type: string
                                              enum:
                                                - CF
                                        cardinality:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - value
                                                value:
                                                  type: number
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - percent
                                                value:
                                                  type: string
                                                  enum:
                                                    - revenue
                                              required:
                                                - type
                                                - value
                                        axisIdsToExclude:
                                          type: array
                                          items:
                                            type: string
                                        analyticalAxisIds:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - report
                                        - cardinality
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - table
                                      required:
                                        - visualizationType
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - TABLE_ACTUALS
                                        reportType:
                                          type: string
                                          enum:
                                            - actuals
                                        aggregation:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - period
                                                value:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - month
                                                    - type: string
                                                      enum:
                                                        - quarter
                                                    - type: string
                                                      enum:
                                                        - year
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - analyticalAxis
                                                value:
                                                  type: string
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - entity
                                                value:
                                                  type: string
                                                  enum:
                                                    - entity
                                              required:
                                                - type
                                                - value
                                      required:
                                        - type
                                        - reportType
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        report:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - PL
                                            - type: string
                                              enum:
                                                - BS
                                            - type: string
                                              enum:
                                                - CF
                                        cardinality:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - value
                                                value:
                                                  type: number
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - percent
                                                value:
                                                  type: string
                                                  enum:
                                                    - revenue
                                              required:
                                                - type
                                                - value
                                        axisIdsToExclude:
                                          type: array
                                          items:
                                            type: string
                                        analyticalAxisIds:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - report
                                        - cardinality
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - table
                                      required:
                                        - visualizationType
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - TABLE_FORECAST
                                        reportType:
                                          type: string
                                          enum:
                                            - forecast
                                        aggregation:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - period
                                                value:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - month
                                                    - type: string
                                                      enum:
                                                        - quarter
                                                    - type: string
                                                      enum:
                                                        - year
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - entity
                                                value:
                                                  type: string
                                                  enum:
                                                    - entity
                                              required:
                                                - type
                                                - value
                                      required:
                                        - type
                                        - reportType
                                        - aggregation
                                - type: object
                                  allOf:
                                    - type: object
                                      properties:
                                        report:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - PL
                                            - type: string
                                              enum:
                                                - BS
                                            - type: string
                                              enum:
                                                - CF
                                        cardinality:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - value
                                                value:
                                                  type: number
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - percent
                                                value:
                                                  type: string
                                                  enum:
                                                    - revenue
                                              required:
                                                - type
                                                - value
                                        axisIdsToExclude:
                                          type: array
                                          items:
                                            type: string
                                        analyticalAxisIds:
                                          type: array
                                          items:
                                            type: string
                                      required:
                                        - report
                                        - cardinality
                                    - type: object
                                      properties:
                                        visualizationType:
                                          type: string
                                          enum:
                                            - table
                                      required:
                                        - visualizationType
                                    - type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - TABLE_DELTA
                                        deltaComparisonMethod:
                                          anyOf:
                                            - type: string
                                              enum:
                                                - budget
                                            - type: string
                                              enum:
                                                - yoy
                                        reportType:
                                          type: string
                                          enum:
                                            - delta
                                        aggregation:
                                          anyOf:
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - period
                                                value:
                                                  anyOf:
                                                    - type: string
                                                      enum:
                                                        - month
                                                    - type: string
                                                      enum:
                                                        - quarter
                                                    - type: string
                                                      enum:
                                                        - year
                                              required:
                                                - type
                                                - value
                                            - type: object
                                              properties:
                                                type:
                                                  type: string
                                                  enum:
                                                    - interval
                                                value:
                                                  type: string
                                                  enum:
                                                    - interval
                                              required:
                                                - type
                                                - value
                                      required:
                                        - type
                                        - deltaComparisonMethod
                                        - reportType
                                        - aggregation
                          required:
                            - id
                            - bookletId
                            - settings
                    required:
                      - bookletPages
    put:
      summary: Overwrite existing booklet by id
      tags:
        - Booklets
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                bookletPages:
                  type: array
                  items:
                    type: object
                    properties:
                      settings:
                        anyOf:
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_WATERFALL
                                required:
                                  - type
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_KPI
                                  aggregation:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - period
                                      value:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - month
                                          - type: string
                                            enum:
                                              - quarter
                                          - type: string
                                            enum:
                                              - year
                                    required:
                                      - type
                                      - value
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                  reportingLineIds:
                                    type: array
                                    items:
                                      type: string
                                  comparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                required:
                                  - visualizationType
                                  - reportingLineIds
                                  - comparisonMethod
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_PERCENTAGE
                                  aggregation:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - period
                                      value:
                                        anyOf:
                                          - type: string
                                            enum:
                                              - month
                                          - type: string
                                            enum:
                                              - quarter
                                          - type: string
                                            enum:
                                              - year
                                    required:
                                      - type
                                      - value
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  reportType:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - actuals
                                      - type: string
                                        enum:
                                          - forecast
                                      - type: string
                                        enum:
                                          - delta
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - reportType
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - graph
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - CHART_REPORT
                                  deltaComparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - interval
                                          value:
                                            type: string
                                            enum:
                                              - interval
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - analyticalAxis
                                          value:
                                            type: string
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                  reportingLineId:
                                    type: string
                                required:
                                  - type
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_ACTUALS
                                  reportType:
                                    type: string
                                    enum:
                                      - actuals
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - analyticalAxis
                                          value:
                                            type: string
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - reportType
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_FORECAST
                                  reportType:
                                    type: string
                                    enum:
                                      - forecast
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - entity
                                          value:
                                            type: string
                                            enum:
                                              - entity
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - reportType
                                  - aggregation
                          - type: object
                            allOf:
                              - type: object
                                properties:
                                  report:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - PL
                                      - type: string
                                        enum:
                                          - BS
                                      - type: string
                                        enum:
                                          - CF
                                  cardinality:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - value
                                          value:
                                            type: number
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - percent
                                          value:
                                            type: string
                                            enum:
                                              - revenue
                                        required:
                                          - type
                                          - value
                                  axisIdsToExclude:
                                    type: array
                                    items:
                                      type: string
                                  analyticalAxisIds:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - report
                                  - cardinality
                              - type: object
                                properties:
                                  visualizationType:
                                    type: string
                                    enum:
                                      - table
                                required:
                                  - visualizationType
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - TABLE_DELTA
                                  deltaComparisonMethod:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - budget
                                      - type: string
                                        enum:
                                          - yoy
                                  reportType:
                                    type: string
                                    enum:
                                      - delta
                                  aggregation:
                                    anyOf:
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - period
                                          value:
                                            anyOf:
                                              - type: string
                                                enum:
                                                  - month
                                              - type: string
                                                enum:
                                                  - quarter
                                              - type: string
                                                enum:
                                                  - year
                                        required:
                                          - type
                                          - value
                                      - type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - interval
                                          value:
                                            type: string
                                            enum:
                                              - interval
                                        required:
                                          - type
                                          - value
                                required:
                                  - type
                                  - deltaComparisonMethod
                                  - reportType
                                  - aggregation
                    required:
                      - settings
              required:
                - name
                - bookletPages
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: bookletId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      summary: Delete booklet by id
      tags:
        - Booklets
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: bookletId
          required: true
      responses:
        "204":
          description: Succesfully deleted booklet
  /organisations/{orgId}/graphs/KPI:
    get:
      summary: Get the graph data for the KPI graph
      tags:
        - Graphs
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            type: boolean
          in: query
          name: list
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    title:
                      type: string
                    rank:
                      type: number
                    data:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                          dateToMatch:
                            format: date
                            type: string
                          originalDate:
                            format: date
                            type: string
                        required:
                          - value
                          - dateToMatch
                          - originalDate
                    prevData:
                      type: array
                      items:
                        type: object
                        properties:
                          value:
                            type: string
                          dateToMatch:
                            format: date
                            type: string
                          originalDate:
                            format: date
                            type: string
                        required:
                          - value
                          - dateToMatch
                          - originalDate
                  required:
                    - id
                    - title
                    - rank
                    - data
                    - prevData
  /organisations/{orgId}/graphs/percentage:
    get:
      summary: Get the graph data for the percentage graph
      tags:
        - Graphs
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - month
              - type: string
                enum:
                  - quarter
          in: query
          name: aggregationValue
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            type: boolean
          in: query
          name: list
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  allOf:
                    - type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        rank:
                          type: number
                      required:
                        - id
                        - title
                        - rank
                    - type: object
                      properties:
                        data:
                          type: array
                          items:
                            type: object
                            properties:
                              value:
                                type: string
                                nullable: true
                              dateToMatch:
                                format: date
                                type: string
                              originalDate:
                                format: date
                                type: string
                            required:
                              - value
                              - dateToMatch
                              - originalDate
                        prevData:
                          type: array
                          items:
                            type: object
                            properties:
                              value:
                                type: string
                                nullable: true
                              dateToMatch:
                                format: date
                                type: string
                              originalDate:
                                format: date
                                type: string
                            required:
                              - value
                              - dateToMatch
                              - originalDate
                      required:
                        - data
                        - prevData
                nullable: true
  /organisations/{orgId}/graphs/waterfall:
    get:
      summary: Get the graph data for the waterfall graph
      tags:
        - Graphs
      parameters:
        - schema:
            format: date
            type: string
          in: query
          name: from
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: lda
          required: true
        - schema:
            format: date
            type: string
          in: query
          name: to
          required: true
        - schema:
            anyOf:
              - type: string
                enum:
                  - budget
              - type: string
                enum:
                  - yoy
          in: query
          name: deltaComparisonMethod
          required: true
        - schema:
            type: boolean
          in: query
          name: list
          required: true
        - schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: string
          in: query
          name: reportingLineIds
          required: false
        - schema:
            anyOf:
              - type: array
                items:
                  format: uuid
                  type: string
              - format: uuid
                type: string
          in: query
          name: budgetVersionIds
          required: false
        - schema:
            format: uuid
            type: string
          in: query
          name: consolidationGroupId
          required: false
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    title:
                      type: string
                    rank:
                      type: number
                    data:
                      type: number
                  required:
                    - title
                    - data
                nullable: true
  /organisations/{orgId}/templates/reporting/entity:
    get:
      summary: Get all entity reporting structures as template
      tags:
        - Templates
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    meta:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        description:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        autoMapped:
                          type: boolean
                        dashboard:
                          type: boolean
                        customMetrics:
                          type: boolean
                        imageSrc:
                          type: string
                      required:
                        - id
                        - title
                        - autoMapped
                        - imageSrc
                    definitions:
                      type: object
                      properties:
                        PL:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-0"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        BS:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-1"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        CF:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-2"
                      required:
                        - PL
                        - BS
                  required:
                    - meta
                    - definitions
  /organisations/{orgId}/templates/reporting:
    post:
      summary: Specify the reporting template you want to use, replaces all reporting
        configurations
      tags:
        - Reporting Lines
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                template:
                  type: object
                  properties:
                    meta:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        description:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        autoMapped:
                          type: boolean
                        dashboard:
                          type: boolean
                        customMetrics:
                          type: boolean
                        imageSrc:
                          type: string
                      required:
                        - id
                        - title
                        - autoMapped
                        - imageSrc
                    definitions:
                      type: object
                      properties:
                        PL:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-0"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        BS:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-1"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        CF:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-2"
                      required:
                        - PL
                        - BS
                  required:
                    - meta
                    - definitions
              required:
                - template
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/annual-accounts/notes-template:
    get:
      summary: Get the annual accounts notes templates
      tags:
        - Annual Accounts
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    organisationId:
                      format: uuid
                      type: string
                    supportedVersion:
                      type: object
                      properties:
                        countryCode:
                          minLength: 2
                          maxLength: 2
                          type: string
                        versionType:
                          type: string
                        versionModel:
                          type: string
                      required:
                        - countryCode
                        - versionType
                        - versionModel
                    name:
                      type: string
                    numberOfNotes:
                      type: number
                  required:
                    - id
                    - organisationId
                    - supportedVersion
                    - name
                    - numberOfNotes
    post:
      summary: Create new annual accounts notes template
      tags:
        - Annual Accounts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  minLength: 1
                  type: string
                countryCode:
                  minLength: 2
                  maxLength: 2
                  type: string
                versionType:
                  type: string
                versionModel:
                  type: string
              required:
                - name
                - countryCode
                - versionType
                - versionModel
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                required:
                  - id
  /organisations/{orgId}/annual-accounts/notes-template/{templateId}:
    delete:
      summary: Delete annual accounts notes template by id
      tags:
        - Annual Accounts
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    get:
      summary: Get the content of an annual accounts notes template by id
      tags:
        - Annual Accounts
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    annualAccountsNotesOrganisationTemplateId:
                      format: uuid
                      type: string
                    annualAccountsNoteId:
                      format: uuid
                      type: string
                    content:
                      type: string
                  required:
                    - id
                    - annualAccountsNotesOrganisationTemplateId
                    - annualAccountsNoteId
                    - content
    put:
      summary: Get the content of an annual accounts notes template by id
      tags:
        - Annual Accounts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                notes:
                  type: array
                  items:
                    type: object
                    allOf:
                      - type: object
                        properties:
                          annualAccountsNotesOrganisationTemplateId:
                            format: uuid
                            type: string
                          annualAccountsNoteId:
                            format: uuid
                            type: string
                          content:
                            type: string
                        required:
                          - annualAccountsNotesOrganisationTemplateId
                          - annualAccountsNoteId
                          - content
                      - type: object
                        properties:
                          id:
                            format: uuid
                            type: string
              required:
                - notes
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
  /organisations/{orgId}/group-consolidations/:
    get:
      summary: Get a list of all proportional consolidations for an organisation
      tags:
        - Organisations
        - Proportional Consolidations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    organisationId:
                      format: uuid
                      type: string
                    name:
                      type: string
                    proportions:
                      type: array
                      items:
                        type: object
                        properties:
                          entityId:
                            format: uuid
                            type: string
                          proportion:
                            minimum: 0
                            maximum: 10000
                            type: number
                        required:
                          - entityId
                          - proportion
                  required:
                    - id
                    - organisationId
                    - name
                    - proportions
    post:
      summary: Get a list of all proportional consolidations for an organisation
      tags:
        - Organisations
        - Proportional Consolidations
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  minLength: 1
                  type: string
                proportions:
                  type: array
                  items:
                    type: object
                    properties:
                      entityId:
                        format: uuid
                        type: string
                      proportion:
                        minimum: 0
                        maximum: 10000
                        type: number
                    required:
                      - entityId
                      - proportion
              required:
                - name
                - proportions
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
      responses:
        "201":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                required:
                  - id
  /organisations/{orgId}/group-consolidations/{propConsId}:
    put:
      summary: Get a list of all proportional consolidations for an organisation
      tags:
        - Organisations
        - Proportional Consolidations
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  minLength: 1
                  type: string
                proportions:
                  type: array
                  items:
                    type: object
                    properties:
                      entityId:
                        format: uuid
                        type: string
                      proportion:
                        minimum: 0
                        maximum: 10000
                        type: number
                    required:
                      - entityId
                      - proportion
              required:
                - name
                - proportions
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: propConsId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                required:
                  - id
    delete:
      summary: Get a list of all proportional consolidations for an organisation
      tags:
        - Organisations
        - Proportional Consolidations
      parameters:
        - schema:
            format: uuid
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: propConsId
          required: true
      responses:
        "200":
          description: Default Response
  /templates/reporting/sector/{type}:
    get:
      summary: Get all sector reporting templates created by Monitr
      tags:
        - Templates
      parameters:
        - schema:
            anyOf:
              - type: string
                enum:
                  - consultancy
              - type: string
                enum:
                  - retail
              - type: string
                enum:
                  - saas
          in: path
          name: type
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    meta:
                      type: object
                      properties:
                        id:
                          type: string
                        title:
                          type: string
                        description:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        autoMapped:
                          type: boolean
                        dashboard:
                          type: boolean
                        customMetrics:
                          type: boolean
                        imageSrc:
                          type: string
                      required:
                        - id
                        - title
                        - autoMapped
                        - imageSrc
                    definitions:
                      type: object
                      properties:
                        PL:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-0"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        BS:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-1"
                                  custom_metric:
                                    anyOf:
                                      - type: string
                                      - type: array
                                        items:
                                          type: string
                                  cash_flow_reporting_line_id:
                                    type: string
                                  dashboard:
                                    type: object
                                    properties:
                                      kpi_card:
                                        type: number
                                      key_metrics:
                                        type: number
                                      comparison_revenue:
                                        type: number
                                      waterfall:
                                        type: number
                        CF:
                          type: array
                          items:
                            type: object
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: string
                                  name:
                                    type: string
                                  top:
                                    type: boolean
                                  rank:
                                    type: number
                                  parent_id:
                                    type: string
                                    nullable: true
                                  type:
                                    anyOf:
                                      - type: string
                                        enum:
                                          - reporting_line
                                      - type: string
                                        enum:
                                          - mapping
                                  account:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      code:
                                        type: string
                                    required:
                                      - id
                                      - code
                                  analyticalAxis:
                                    type: object
                                    properties:
                                      id:
                                        format: uuid
                                        type: string
                                      account:
                                        type: string
                                    required:
                                      - id
                                      - account
                                required:
                                  - name
                                  - top
                                  - parent_id
                                  - type
                              - type: object
                                properties:
                                  children:
                                    type: array
                                    items:
                                      $ref: "#/components/schemas/def-2"
                      required:
                        - PL
                        - BS
                  required:
                    - meta
                    - definitions
  /templates/reporting/accountants/organisation:
    post:
      summary: Create template for an accountancy
      tags:
        - Templates
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                description:
                  type: string
              required:
                - title
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: query
          name: organisationId
          required: true
      responses:
        "200":
          description: Default Response
  /templates/reporting/accountants/user:
    post:
      summary: Create template for an accountant
      tags:
        - Templates
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                description:
                  type: string
              required:
                - title
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: entityId
          required: true
      responses:
        "200":
          description: Default Response
  /templates/reporting/accountants/organisation/{templateId}:
    put:
      summary: Update template for an accountancy by template id
      tags:
        - Templates
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                description:
                  type: string
              required:
                - title
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: query
          name: organisationId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      summary: Delete template for an accountancy by template id
      tags:
        - Templates
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: query
          name: organisationId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
  /templates/reporting/accountants/user/{templateId}:
    put:
      summary: Update template for an accountant by template id
      tags:
        - Templates
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                description:
                  type: string
              required:
                - title
        required: true
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
    delete:
      summary: Delete template for an accountant by template id
      tags:
        - Templates
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: entityId
          required: true
        - schema:
            format: uuid
            type: string
          in: path
          name: templateId
          required: true
      responses:
        "200":
          description: Default Response
  /templates/vat/periods:
    get:
      summary: Get all templates for VAT periods for a given year
      tags:
        - Templates
      parameters:
        - schema:
            type: number
          in: query
          name: year
          required: false
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    year:
                      type: number
                    periods:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          startDate:
                            format: date
                            type: string
                          endDate:
                            format: date
                            type: string
                          paymentDate:
                            format: date
                            type: string
                          refundDate:
                            format: date
                            type: string
                        required:
                          - name
                          - startDate
                          - endDate
                          - paymentDate
                          - refundDate
                  required:
                    - id
                    - name
                    - year
                    - periods
  /users/profile:
    get:
      summary: Get the profile details for the current user
      tags:
        - User
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  id:
                    format: uuid
                    type: string
                  firstName:
                    type: string
                  lastName:
                    type: string
                  email:
                    type: string
                  mfa:
                    type: boolean
                required:
                  - id
                  - firstName
                  - lastName
                  - email
                  - mfa
  /users/entities:
    get:
      summary: Get a list of entities that the current user has access to and that
        belong to the given organisation, with the permissions that are granted
        to the user for each entity.
      tags:
        - User
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: orgId
          required: false
      responses:
        "200":
          description: Default Response
  /users/organisations:
    get:
      summary: Get a list of organisations that the current user has access to, with
        the permissions that are granted to the user for each organisation.
      tags:
        - User
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                properties:
                  organisations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          format: uuid
                          type: string
                        name:
                          type: string
                        vat_number:
                          type: string
                          nullable: true
                        settings:
                          type: object
                          properties:
                            consolidation:
                              type: object
                              properties:
                                is_active:
                                  type: boolean
                                relations:
                                  type: object
                                  additionalProperties:
                                    type: object
                                    additionalProperties:
                                      type: array
                                      items:
                                        type: string
                              required:
                                - is_active
                                - relations
                        organisation_type:
                          anyOf:
                            - type: string
                              enum:
                                - accountant
                            - type: string
                              enum:
                                - business
                        permissions:
                          uniqueItems: true
                          type: array
                          items:
                            type: string
                            enum:
                              - organisation.organisation_data:read
                              - organisation.organisation_data:write
                              - organisation.teams:read
                              - organisation.teams:write
                              - organisation.reports:read
                              - organisation.general_ledger:read
                        subscriptionHolder:
                          type: object
                          properties:
                            id:
                              format: uuid
                              type: string
                            paymentProviderCustomerId:
                              type: string
                            paymentState:
                              type: string
                            paymentStateUpdatedAt:
                              type: string
                            trialPeriodEndDate:
                              type: string
                            organisationId:
                              format: uuid
                              type: string
                            tier:
                              anyOf:
                                - type: string
                                  enum:
                                    - lite
                                - type: string
                                  enum:
                                    - premium
                          required:
                            - id
                            - paymentProviderCustomerId
                            - paymentState
                            - paymentStateUpdatedAt
                            - trialPeriodEndDate
                            - organisationId
                            - tier
                        tier:
                          anyOf:
                            - type: string
                              enum:
                                - lite
                            - type: string
                              enum:
                                - premium
                      required:
                        - id
                        - name
                        - vat_number
                        - settings
                        - organisation_type
                        - permissions
                        - subscriptionHolder
                        - tier
                required:
                  - organisations
  /users/teams:
    get:
      summary: Get the teams that the user has access to of the given organisation.
      tags:
        - User
      description: If the user is an organisation admin, all teams of the
        organisations are returned. Else all teams that the user is member of
        are returned.
      parameters:
        - schema:
            format: uuid
            type: string
          in: query
          name: orgId
          required: true
      responses:
        "200":
          description: Default Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      format: uuid
                      type: string
                    name:
                      type: string
                    organisation_id:
                      format: uuid
                      type: string
                    default:
                      type: boolean
                    entities:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            format: uuid
                            type: string
                        required:
                          - id
                  required:
                    - id
                    - name
                    - organisation_id
                    - default
                    - entities
servers:
  - url: https://api.monitr.be
    description: Production
security:
  - bearerAuth: []
