openapi: 3.0.1
info:
  title: Visma Fivaldi Customer API
  description: API for 3rd party customers of Visma Fivaldi
  version: 2.11.0
  termsOfService: https://www.visma.com/trust-centre/smb/service-information/terms-of-service/
externalDocs:
  description: General information, how to authenticate requests, change log
  url: https://ohjeet.visma.fi/articles/#!visma-fivaldi/visma-fivaldi-api
servers:
- url: https://api.fivaldi.net/customer/api
tags:
- name: Customer
  description: Fivaldi customers
- name: Companies
  description: Fivaldi companies
- name: Purchase invoices
- name: Chart of accounts and dimensions
- name: Bookkeeping
- name: Archive
- name: Sales orders
  description: Fivaldi Sales orders
- name: Customer register
  description: Customer register of Fivaldi company
- name: Product register
  description: Product register of Fivaldi company
- name: Estate person
  description: Fivaldi estate person information
- name: Estate apartment
  description: Fivaldi estate apartment information
- name: Estate bond
  description: Fivaldi estate bond information
- name: Estate meter
  description: Fivaldi estate meter information
- name: Estate preferences
  description: Fivaldi estate preferences information
- name: Estate repair
  description: Fivaldi estate repair information
paths:
  /customers:
    get:
      tags:
      - Customer
      summary: Get a list of Fivaldi customers
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
        401:
          $ref: '#/components/responses/Unauthorized'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies:
    get:
      tags:
      - Companies
      summary: Get all companies, search by business id or Fivaldi customer id
      parameters:
      - name: businessId
        in: query
        description: Search by business id (Y-tunnus)
        schema:
          type: string
      - name: customerId
        in: query
        description: Search by Fivaldi customer id
        schema:
          type: string
      - name: fields
        in: query
        description: Filter fields of the response objects, only ones provided will
          be included
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/purchases/invoices:
    get:
      tags:
      - Purchase invoices
      summary: Get all purchase invoices
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      - name: lang
        in: query
        description: Language code for chain and step descriptions, defaults to FIN
        required: false
        schema:
          type: string
          enum:
          - FIN
          - SWE
          - ENG
      - name: addedManually
        in: query
        description: Filter invoices by how they have been brought to system. True = manually added, false = e-invoices. If no parameter is provided then returns all.
        required: false
        schema:
          type: boolean
      - name: invoiceStatus
        in: query
        description: Filter invoices by invoice status, S = entering, K = handling, H = accepted
        required: false
        schema:
          type: string
          enum:
          - S
          - K
          - H
      - name: createTimeAfter
        in: query
        description: Filter invoices by create time, dd.mm.yyyy%20hh:mm:ss
        required: false
        schema:
          type: string
          example: 01.12.2019%2000:00:00
      - name: createTimeBefore
        in: query
        description: Filter invoices by create time, dd.mm.yyyy%20hh:mm:ss
        required: false
        schema:
          type: string
          example: 01.12.2021%2000:00:00
      - name: changeTimeAfter
        in: query
        description: Filter invoices by change time, dd.mm.yyyy%20hh:mm:ss
        required: false
        schema:
          type: string
          example: 01.12.2019%2000:00:00
      - name: changeTimeBefore
        in: query
        description: Filter invoices by change time, dd.mm.yyyy%20hh:mm:ss
        required: false
        schema:
          type: string
          example: 01.12.2021%2000:00:00
      - name: fetchAllChangeTimes
        in: query
        description: Whether to include all invoice related changes in change time filter.
        required: false
        schema:
          type: boolean
      - name: includeRowChangeTimes
        in: query
        description: Whether to include row change times in change time filter. This parameter is unnecessary if fetchAllChangeTimes is used.
        required: false
        schema:
          type: boolean
      - name: includeAttachments
        in: query
        description: Include attachment ids related to invoices, increases query time
        schema:
          type: boolean
      - name: fields
        in: query
        description: Filter fields of the response objects, only ones provided will
          be included
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PurchaseInvoice'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
    post:
      tags:
        - Purchase invoices
      summary: Create a new purchase invoice
      description: Post endpoint to import purchase invoices to Fivaldi purchase invoice circulation. Imported invoices get new/no approval chain defined/"syötössä" -status.
      parameters:
        - name: cuid
          in: path
          description: Id of Fivaldi company
          required: true
          schema:
            type: string
      requestBody:
        description: Purchase invoice object that is imported. If supplierId is provided, supplier properties(names, addresses, paymentPriority, refNumber, bankMessageType) will get autofilled, if not also explicitly provided. If supplierId, workSiteKey, paymentTermId or currencyId(other than EUR) are provided, corresponding id must be already created in Fivaldi. If bookkeepingAccount is provided it must be found and be activated for purchase in Fivaldi. BankMessageType (provided with query or based on supplier) determines if bankRefNo is required(1) or bankMessage is required (2). If vatType is provided it must correspond to company settings.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseInvoicePostPutPatch'
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceResponseDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/purchases/invoices/{invoiceId}:
    get:
      tags:
      - Purchase invoices
      summary: Get a purchase invoice
      parameters:
      - name: cuid
        in: path
        description: Id of Fivaldi company
        required: true
        schema:
          type: string
      - name: invoiceId
        in: path
        description: Id of purchase invoice
        required: true
        schema:
          type: integer
      - name: lang
        in: query
        description: Language code for chain and step descriptions, defaults to FIN
        required: false
        schema:
          type: string
          enum:
          - FIN
          - SWE
          - ENG
      - name: includeAttachments
        in: query
        description: Include attachment ids related to this invoice, increases query time
        schema:
          type: boolean
      - name: fields
        in: query
        description: Filter fields of the response objects, only ones provided will
          be included
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoice'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
    put:
      tags:
        - Purchase invoices
      summary: Update a purchase invoice
      description: Update all the information in a purchase invoice. Missing properties or null values will delete previous data.  If supplierId is provided, supplier properties(names, addresses, paymentPriority, refNumber, bankMessageType) will get autofilled, if not also explicitly provided. If supplierId, workSiteKey, paymentTermId or currencyId(other than EUR) are provided, corresponding id must be already created in Fivaldi. If bookkeepingAccount is provided it must be found and be activated for purchase in Fivaldi. BankMessageType (provided with query or based on supplier) determines if bankRefNo is required(1) or bankMessage is required (2). If vatType is provided it must correspond to company settings.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: invoiceId
          in: path
          description: Purchase invoice id
          required: true
          schema:
            type: integer
      requestBody:
        description: Purchase invoice object that needs to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseInvoicePostPutPatch'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceResponseDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
    patch:
      tags:
        - Purchase invoices
      summary: Update a purchase invoice
      description: Update some of the properties in a purchase invoice. Missing properties or null values will have no effect. Note however, that if supplierId is provided, supplier names and addresses will get overridden, if not also explicitly provided. If supplierId, workSiteKey, paymentTermId or currencyId(other than EUR) are provided, corresponding id must be already created in Fivaldi. If bookkeepingAccount is provided it must be found and be activated for purchase in Fivaldi. BankMessageType (provided with query or based on supplier) determines if bankRefNo is required(1) or bankMessage is required (2). If vatType is provided it must correspond to company settings.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: invoiceId
          in: path
          description: Purchase invoice id
          required: true
          schema:
            type: integer
      requestBody:
        description: Properties of the purchase invoice object that need to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseInvoicePostPutPatch'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceResponseDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/purchases/invoices/{invoiceId}/approve:
    post:
      tags:
        - Purchase invoices
      summary: Approve current step of a purchase invoice
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: invoiceId
          in: path
          description: Purchase invoice id
          required: true
          schema:
            type: integer
        - name: stepId
          in: query
          description: Current step id of a purchase invoice
          required: true
          schema:
            type: integer
        - name: lang
          in: query
          description: Language code for messages, defaults to FIN
          required: false
          schema:
            type: string
            enum:
              - FIN
      responses:
        204:
          description: No content
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/purchases/invoices/{invoiceId}/attachment:
    post:
      tags:
      - Purchase invoices
      summary: postPurchaseInvoiceAttachment
      description: Invoice must already be in Fivaldi before sending attachments. Attachments can only be attached to invoices that have new/no approval chain defined/"syötössä" -status. Maximum number of attachments per invoice is 10. Attachments get new filename in Fivaldi according to what is defined in company` s archive settings (for example [documenttype]-[invoiceId]-[supplierId]). If supplierId is defined as a required field in company's archive settings, the related invoice must have supplierId set before sending attachments.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: invoiceId
          in: path
          description: Purchase invoice id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  description: Allowed file types are pdf, jpg, jpeg, jpe, png, gif, tif, doc, xls, xsl, txt, xml, htm, html, csv, docx, xlsx. Maximum filesize is 5 MB. Filename can contain following characters A-Z, 0-9, - and _.
                  type: string
                  format: binary
                attachmentOrderNo: 
                  description: Decides the order in which the attachments are shown in UI. If not provided the attachment gets the last number. 
                  type: integer
              required:
                - file
      responses:
        200:
          description: OK
          content:
            application/json:
              schema: 
                $ref: '#/components/schemas/ApiError'
        201:
          description: Created
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/purchases/invoices/{invoiceId}/comments:
    get:
      tags:
      - Purchase invoices
      summary: Get the comments related to a purchase invoice
      parameters:
      - name: cuid
        in: path
        description: Id of Fivaldi company
        required: true
        schema:
          type: integer
      - name: invoiceId
        in: path
        description: Id of purchase invoice
        required: true
        schema:
          type: integer
      - name: fields
        in: query
        description: Filter fields of the response objects, only ones provided will
          be included
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceComments'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
    post:
      tags:
        - Purchase invoices
      summary: Add a comment to a purchase invoice
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: integer
        - name: invoiceId
          in: path
          description: Purchase invoice id
          required: true
          schema:
            type: integer
      requestBody:
        description: Comment to be added
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/purchases/invoices/{invoiceId}/rows:
    get:
      tags:
      - Purchase invoices
      summary: Get all rows of a purchase invoice
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: integer
      - name: invoiceId
        in: path
        description: Purchase invoice id
        required: true
        schema:
          type: integer
      - name: fields
        in: query
        description: Filter fields of the response objects, only ones provided will
          be included
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PurchaseInvoiceRow'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
    post:
      tags:
      - Purchase invoices
      summary: Add a purchase invoice row
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: integer
      - name: invoiceId
        in: path
        description: Purchase invoice id
        required: true
        schema:
          type: integer
      requestBody:
        description: Purchase invoice row object that needs to be added
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseInvoiceRowPost'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceRow'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/purchases/invoices/{invoiceId}/rows/{rowId}:
    get:
      tags:
      - Purchase invoices
      summary: Get a purchase invoice row
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: integer
      - name: invoiceId
        in: path
        description: Purchase invoice id
        required: true
        schema:
          type: integer
      - name: rowId
        in: path
        description: Purchase invoice row id
        required: true
        schema:
          type: integer
      - name: fields
        in: query
        description: Filter fields of the response objects, only ones provided will
          be included
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceRow'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
    put:
      tags:
      - Purchase invoices
      summary: Update a purchase invoice row
      description: Update all the information in a purchase invoice row. Missing properties or null values will delete previous data. Cuid, invoiceId and rowId provided in the parameters take precedence over the corresponding object properties in case of conflict.
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: integer
      - name: invoiceId
        in: path
        description: Purchase invoice id
        required: true
        schema:
          type: integer
      - name: rowId
        in: path
        description: Purchase invoice row id
        required: true
        schema:
          type: integer
      requestBody:
        description: Purchase invoice row object that needs to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PurchaseInvoiceRowPut'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceRow'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
    patch:
      tags:
      - Purchase invoices
      summary: Update a purchase invoice row
      description: Update some of the properties in a purchase invoice row. Missing properties or null values will have no effect. Cuid, invoiceId and rowId provided in the parameters take precedence over the corresponding object properties in case of conflict.
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: integer
      - name: invoiceId
        in: path
        description: Purchase invoice id
        required: true
        schema:
          type: integer
      - name: rowId
        in: path
        description: Purchase invoice row id
        required: true
        schema:
          type: integer
      requestBody:
        description: Properties of the purchase invoice row object that need to be updated
        required: true
        content:
          application/json:
            schema:
                $ref: '#/components/schemas/PurchaseInvoiceRowPut'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceRow'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
    delete:
      tags:
      - Purchase invoices
      summary: Delete a purchase invoice row
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: integer
      - name: invoiceId
        in: path
        description: Purchase invoice id
        required: true
        schema:
          type: integer
      - name: rowId
        in: path
        description: Purchase invoice row id
        required: true
        schema:
          type: integer
      responses:
        204:
          description: No content, invoice row deleted successfully
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/purchases/invoices/{invoiceId}/rows/accrualData:
    post:
      tags:
        - Purchase invoices
      summary: Add a purchase invoice row accrual data
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: integer
        - name: invoiceId
          in: path
          description: Purchase invoice id
          required: true
          schema:
            type: integer
      requestBody:
        description: Accrual data object that needs to be added
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccrualDataPost'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceRow'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/purchases/invoices/{invoiceId}/rows/{rowId}/accrualData/{accrualNumber}:
    put:
      tags:
        - Purchase invoices
      summary: Update a purchase invoice row accrual data
      description: Update all the information in a purchase invoice row accrual data. Missing properties or null values will delete previous data. Cuid, invoiceId, rowId and accrualNumber provided in the parameters take precedence over the corresponding object properties in case of conflict.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: integer
        - name: invoiceId
          in: path
          description: Purchase invoice id
          required: true
          schema:
            type: integer
        - name: rowId
          in: path
          description: Purchase invoice row id
          required: true
          schema:
            type: integer
        - name: accrualNumber
          in: path
          description: Purchase invoice row accrual data number
          required: true
          schema:
            type: integer
      requestBody:
        description: Accrual data object that needs to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccrualDataPut'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceRow'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
    patch:
      tags:
        - Purchase invoices
      summary: Update a purchase invoice row accrual data
      description: Update some of the properties in a purchase invoice row accrual data. Missing properties or null values will have no effect. Cuid, invoiceId, rowId and accrualNumber provided in the parameters take precedence over the corresponding object properties in case of conflict.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: integer
        - name: invoiceId
          in: path
          description: Purchase invoice id
          required: true
          schema:
            type: integer
        - name: rowId
          in: path
          description: Purchase invoice row id
          required: true
          schema:
            type: integer
        - name: accrualNumber
          in: path
          description: Purchase invoice row accrual data number
          required: true
          schema:
            type: integer
      requestBody:
        description: Properties of the accrual data object that need to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccrualDataPut'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseInvoiceRow'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
    delete:
      tags:
        - Purchase invoices
      summary: Delete a purchase invoice row accrual data
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: integer
        - name: invoiceId
          in: path
          description: Purchase invoice id
          required: true
          schema:
            type: integer
        - name: rowId
          in: path
          description: Purchase invoice row id
          required: true
          schema:
            type: integer
        - name: accrualNumber
          in: path
          description: Purchase invoice row accrual data number
          required: true
          schema:
            type: integer
      responses:
        204:
          description: No content, invoice row deleted successfully
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/bookkeeping/vouchers/attachments:
    get:
      tags:
        - Bookkeeping
      summary: Get a list of voucher attachments for specific company
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      - name: voucherNumber
        in: query
        description: Voucher number
        required: true
        schema:
          type: string
      - name: voucherType
        in: query
        description: Voucher type
        required: true
        schema:
          type: number
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoucherAttachmentResponse'
        429:
          $ref: '#/components/responses/RateLimit'
  
  /companies/{cuid}/bookkeeping/vouchers/addAttachments:
    post:
      tags:
        - Bookkeeping
      summary: Add an attachment to a voucher in Fivaldi bookkeeping
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      - name: journalNo
        in: query
        description: Journal number
        required: true
        schema:
          type: string
      - name: voucherType
        in: query
        description: Voucher type
        required: true
        schema:
          type: number
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  description: Allowed file types are "doc", "docx", "xls", "xlsx", "ppt", "pptx", "odt", "ods", "odp", "txt", "rtf", "jpg", "jpeg", "jpe", "gif", "png", "pdf". Maximum filesize is 15 MB. Filename can contain following characters "A-Z, a-z, 0-9" and one "."
                  type: string
                  format: binary
              required:
                - file
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArchiveAppDocumentPutResponse'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
          
          
  /companies/{cuid}/bookkeeping/voucherTypes:
    get:
      tags:
        - Bookkeeping
      summary: Get a list of voucher types for specific company
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      - name: usage
        in: query
        description: Fetches voucher types with given usage
        required: false
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VoucherType'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/bookkeeping/vatCodes:
    get:
      tags:
        - Bookkeeping
      summary: Get a list of vat codes and vat categories defined in Fivaldi.
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VatCodeResponse'
        429:
          $ref: '#/components/responses/RateLimit'
 
  /companies/{cuid}/bookkeeping/fiscalYears:
    get:
      tags:
        - Bookkeeping
      summary: Get a list of fiscal years for specific company
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FiscalYear'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/bookkeeping/monthStatus:
    get:
      tags:
        - Bookkeeping
      summary: Get a list of bookkeeping month status.
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      - name: startMonth
        in: query
        description: Bookkeeping start month in yyyymm format.
        required: true
        schema:
          type: number
      - name: endMonth
        in: query
        description: Bookkeeping end month in yyyymm format.
        required: true
        schema:
          type: number
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BookkeepingMonth'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/bookkeeping/vouchers:
    get:
      tags:
        - Bookkeeping
      summary: Get a list of vouchers.
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      - name: startDate
        in: query
        description: fetches vouchers after this date.
        required: true
        schema:
          type: string
          format: date
      - name: endDate
        in: query
        description: fetches voucher before this date.
        required: true
        schema:
          type: string
          format: date
      - name: minAccount
        in: query
        description: fetches voucher entries having account number greater or same than minAccount.
        required: false
        schema:
          type: number
      - name: maxAccount
        in: query
        description: fetches voucher entries having account number smaller or same than maxAccount.
        required: false
        schema:
          type: number
      - name: dimension1
        in: query
        description: fetches voucher entries having provided dimension1.
        required: false
        schema:
          type: string
      - name: dimension2
        in: query
        description: fetches voucher entries having provided dimension2.
        required: false
        schema:
          type: string
      - name: dimension3
        in: query
        description: fetches voucher entries having provided dimension3.
        required: false
        schema:
          type: string
      - name: dimension4
        in: query
        description: fetches voucher entries having provided dimension4.
        required: false
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FetchVoucherResponse'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  
    post:
      tags:
        - Bookkeeping
      summary: Imports one voucher into Fivaldi bookkeeping.
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      requestBody:
        description: Voucher to be imported. Add original voucher number to the description field if you want to be able to see the original voucher number from Fivaldi bookkeeping.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoucherImportRequest'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoucherImportResponse'
        400:
          $ref: '#/components/responses/BadRequestWithCode'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  
  /companies/{cuid}/bookkeeping/vouchers/{voucherNumber}:
    get:
      tags:
        - Bookkeeping
      summary: Get one voucher by voucher id. 
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      - name: voucherNumber
        in: path
        required: true
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchVoucherResponse'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/bookkeeping/accountBalance:
    get:
      tags:
        - Bookkeeping
      summary: Get a list of account balances, credit and debit sums.
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      - name: month
        in: query
        description: Fetches accounts data for this month in yyyy/mm format.
        required: true
        schema:
          type: integer
      - name: minAccount
        in: query
        description: Fetches accounts data having account number greater or same than minAccount.
        required: false
        schema:
          type: string
      - name: maxAccount
        in: query
        description: Fetches accounts data having account number smaller or same than maxAccount.
        required: false
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountBalance'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/bookkeeping/budget:
    get:
      tags:
        - Bookkeeping
      summary: Get a list of company budgets for a fiscal year.
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      - name: fiscalYearId
        in: query
        description: Budgets to be fetched for this fiscal year id.
        required: true
        schema:
          type: integer
          nullable: false
          minimum: 1950
          exclusiveMinimum: true
          maximum: 2100
          exclusiveMaximum: true
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExternalBudgetResponseDTO'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
    post:
      tags:
        - Bookkeeping
      summary: Budget to be imported. FiscalYearId needs to exist for the company, bookkeepingPeriod needs to be on that fiscalYearId.
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: string
      requestBody:
        description: Budget to be imported
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalBudgetRequestDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalBudgetResponseDTO'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        409:
          $ref: '#/components/responses/Conflict'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/chart-of-accounts:
    get:
      tags:
      - Chart of accounts and dimensions
      summary: Get all bookkeeping accounts
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: integer
      - name: dimension
        in: query
        description: Account dimension, defaults to 0
        schema:
          type: string
          enum:
          - all
          - 0 (default. accounts)
          - 1 (customer defined dimension)
          - 2 (customer defined dimension)
          - 3 (customer defined dimension)
          - 4 (customer defined dimension)
      - name: lang
        in: query
        description: Language code, defaults to FIN
        required: false
        schema:
          type: string
          enum:
          - FIN
          - SWE
          - ENG
      - name: inUseBookkeeping
        in: query
        description: Return accounts and dimensions used in bookkeeping
        required: false
        schema:
          type: boolean
      - name: inUseEstate
        in: query
        description: Return accounts and dimensions used in estate
        required: false
        schema:
          type: boolean
      - name: inUsePurchases
        in: query
        description: Return accounts and dimensions used in purchases
        required: false
        schema:
          type: boolean
      - name: inUseSalaries
        in: query
        description: Return accounts and dimensions used in salaries
        required: false
        schema:
          type: boolean
      - name: inUseSales
        in: query
        description: Return accounts and dimensions used in sales
        required: false
        schema:
          type: boolean
      - name: fields
        in: query
        description: Filter fields of the response objects, only ones provided will
          be included
        schema:
          type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChartOfAccounts'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/chart-of-accounts/dimensions:
    post:
      tags:
      - Chart of accounts and dimensions
      summary: Add accounts for a single dimension
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: integer
      - name: dimension
        in: query
        description: Dimension
        required: true
        schema:
          type: string
          enum:
          - 1 (customer defined dimension)
          - 2 (customer defined dimension)
          - 3 (customer defined dimension)
          - 4 (customer defined dimension)
      requestBody:
        description: Dimensions to be imported
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ExternalAccountInformationDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalAccountInformationDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/archive/files/{fileId}:
    get:
      tags:
      - Archive
      summary: Get download url for a file
      parameters:
      - name: cuid
        in: path
        description: Fivaldi company id
        required: true
        schema:
          type: integer
      - name: fileId
        in: path
        description: Archive file id
        required: true
        schema:
          type: integer
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: string
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/sales/company-invoicing-details:
    get:
      tags:
      - Sales orders
      summary: Get Fivaldi Company invoicing details
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: string
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/sales/sales-orders/batch/{externalBatchId}:
    get:
      tags:
      - Sales orders
      summary: Get sales orders from batch
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: externalBatchId
          in: path
          description: Unique external batch id
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SalesOrderDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/sales/sales-orders:
    get:
      tags:
      - Sales orders
      summary: Get sales orders
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: fromDate
          in: query
          description: Limit results with created at date (dd.mm.yyyy)
          required: false
          schema:
            type: string
        - name: status
          in: query
          description: Limit results with status DRAFT | INVOICED
          required: false
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SalesOrderDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/sales/sales-order/{id}:
    get:
      tags:
      - Sales orders
      summary: Get unique sales order
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: sales order id
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesOrderDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
    put:
      tags:
      - Sales orders
      summary: Update unique sales order. Sums to order will be calculated eihter based on Row total sum with tax or unit price excluding tax. Only one of those can be given on row details.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: sales order id
          required: true
          schema:
            type: string
      requestBody:
        description: Sales order to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesOrderDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalesOrderDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'

  /companies/{cuid}/sales/sales-order:
    post:
      tags:
        - Sales orders
      summary: Create sales order. Sums to order will be calculated eihter based on Row total sum with tax or unit price excluding tax. Only one of those can be given on row details.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      requestBody:
        description: Sales order to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesOrderDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  /companies/{cuid}/sales/multiple-sales-orders:
    post:
      tags:
        - Sales orders
      summary: Create multiple sales orders with one batch. Sums to order will be calculated eihter based on Row total sum with tax or unit price excluding tax. Only one of those can be given on row details.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      requestBody:
        description: List of sales orders to be created on this batch
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/SalesOrderDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: string
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/customers/getCustomerRegisterBasicDetails':
    get:
      tags:
        - Customer register
      summary: Fivaldi Company's basic details for using correct id values on customer
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: fields
          in: query
          description: Filter fields of the response objects, only ones provided will be included on response
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: string
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/customers':
    get:
      tags:
        - Customer register
      summary: Get list of Fivaldi company's customers
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: searchWord
          in: query
          description: Limit results with search word
          required: false
          schema:
            type: string
        - name: fromDate
          in: query
          description: Limit results with changed at date is given date or newer (dd.mm.yyyy)
          required: false
          schema:
            type: string
        - name: fields
          in: query
          description: Filter fields of the response objects, only ones provided will be included on response
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomerEntityDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/customers/{id}':
    get:
      tags:
        - Customer register
      summary: Get Fivaldi company's unique customer with all details from register
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Customer id of customer from register
          required: true
          schema:
            type: string
        - name: fields
          in: query
          description: Filter fields of the response objects, only ones provided will be included on response
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntityDetailsDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/customers/createCustomer':
    post:
      tags:
        - Customer register
      summary: Create Customer with addresses and bank accounts
      description: Customer id is set by Fivaldi as next available customer number.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      requestBody:
        description: Customer to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerEntityDetailsDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntityDetailsDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/customers/{id}/updateCustomerAllFields':
    post:
      tags:
        - Customer register
      summary: Update existing Customer details
      description: Update existing Customer details. Addresses and bank accounts will not be updated (they have own endpoints).
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: string
      requestBody:
        description: Customer to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerEntityDetailsDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntityDetailsDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/customers/{id}/updateCustomer':
    post:
      tags:
        - Customer register
      summary: Update existing Customer details with given fields
      description: Update existing Customer details only with given fields. Addresses and bank accounts will not be updated (they have own endpoints).
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: string
      requestBody:
        description: Customer to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerEntityDetailsDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntityDetailsDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/customers/{id}/createAddress':
    post:
      tags:
        - Customer register
      summary: Create new address for existing Customer
      description: Creates a new address for existing customer. Address id will be created by Fivaldi. If address is marked as main address, existing main address will be set as not main address.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: string
      requestBody:
        description: Customer address to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerEntityAddressDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntityAddressDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/customers/{id}/address/{address-id}/updateAddressAllFields':
    post:
      tags:
        - Customer register
      summary: Update existing address for existing Customer
      description: Updates address for existing customer. Address id that is updated will be taken from url. If address is marked as main address, existing main address will be set as not main address.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: string
        - name: address-id
          in: path
          description: Address id
          required: true
          schema:
            type: string
      requestBody:
        description: Customer address to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerEntityAddressDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntityAddressDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'

  '/companies/{cuid}/customers/{id}/createBankAccount':
    post:
      tags:
        - Customer register
      summary: Create new bank account for existing Customer
      description: Creates a new bank account for existing customer. Bank account id will be created by Fivaldi. If iban is given, bban and swift will be set based on IBAN. If IBAN is not given, IBAN and swift will be set based on bban. 
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: string
      requestBody:
        description: Customer bank account to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerEntityBankAccountDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntityBankAccountDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/customers/{id}/bank-account/{account-id}/updateBankAccountAllFields':
    post:
      tags:
        - Customer register
      summary: Update existing bank account for existing Customer
      description: Updates bank account for existing customer. Bank account id that is updated will be taken from url. If iban is given, bban and swift will be set based on IBAN. If IBAN is not given, IBAN and swift will be set based on bban. 
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Customer id
          required: true
          schema:
            type: string
        - name: account-id
          in: path
          description: Bank account id
          required: true
          schema:
            type: string
      requestBody:
        description: Customer bank account to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomerEntityBankAccountDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerEntityBankAccountDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/products/getProductRegisterBasicDetails':
    get:
      tags:
        - Product register
      summary: Fivaldi Company's basic details for using correct id values on product
      description: Endpoint returns list of id values and descriptions for product groups, units, posting groups and posting codes
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: fields
          in: query
          description: Filter fields of the response objects, only ones provided will be included on response
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: string
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/products':
    get:
      tags:
        - Product register
      summary: Get Fivaldi company's product register
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: searchWord
          in: query
          description: Limit results with search word
          required: false
          schema:
            type: string
        - name: fromDate
          in: query
          description: Limit results with changed at date is given date or newer (dd.mm.yyyy)
          required: false
          schema:
            type: string
        - name: fields
          in: query
          description: Filter fields of the response objects, only ones provided will be included on response
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProductEntityDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/products/{id}':
    get:
      tags:
        - Product register
      summary: (Deprecated) Get Fivaldi Company's unique product with all details from register
      description: Endpoint returns complete product details, product descriptions with languages, product postings
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Product code of product from register
          required: true
          schema:
            type: string
        - name: fields
          in: query
          description: Filter fields of the response objects, only ones provided will be included on response
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductEntityDetailsDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'

  '/companies/{cuid}/products/getProduct':
    get:
      tags:
        - Product register
      summary: Get Fivaldi Company's unique product with all details from register
      description: Endpoint returns complete product details, product descriptions with languages, product postings
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: productCode
          in: query
          description: Product code of product from register encoded format (supports special characters on productCode). Max length 20
          required: true
          schema:
            type: string
        - name: fields
          in: query
          description: Filter fields of the response objects, only ones provided will be included on response
          schema:
            type: string
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductEntityDetailsDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        429:
          $ref: '#/components/responses/RateLimit'


  '/companies/{cuid}/products/createProduct':
    post:
      tags:
        - Product register
      summary: Create Product with descriptions and postings
      description: If descriptions is not given, Fivaldi will create one description with Company's language. Fivaldi will set missing posting groups to product that are not given.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      requestBody:
        description: Product to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductEntityDetailsDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductEntityDetailsDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/products/updateProductAllFields':
    post:
      tags:
        - Product register
      summary: Update Product details
      description: Update existing product details. Descriptions and accountings will not be updated even if they exist on request body. They have their own endpoints. ProductEntityDetailsDTO's productCode (product that will be updated) must exist on Company product register
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      requestBody:
        description: Product to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductEntityDetailsDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductEntityDetailsDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/products/updateProduct':
    post:
      tags:
        - Product register
      summary: Update Product details with given fields
      description: Update existing product details only with given fields, also null values will be updated. Descriptions and accountings will not be updated. They have their own endpoints. Query parameter productCode (product that will be updated) must exist on Company product register
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: productCode
          in: query
          description: Product code where to update given fields
          required: true
          schema:
            type: string
      requestBody:
        description: Product fields to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductEntityDetailsDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductEntityDetailsDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/products/createProductDescription':
    post:
      tags:
        - Product register
      summary: Create Product description to existing product
      description: Creates new description to product with given language. Description on product with given language must not exist. Product code will be given on query parameter. Language code must exist on ProductEntityDescriptionDTO - object (description will be added with that language).
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: productCode
          in: query
          description: Product code where to add new description with given language
          required: true
          schema:
            type: string
      requestBody:
        description: Product description to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductEntityDescriptionDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductEntityDescriptionDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/products/updateProductDescriptionAllFields':
    post:
      tags:
        - Product register
      summary: Update Product description to existing products existing description
      description: Updates description to product with given language. Description on product with given language must exist. Product code will be given on query parameter. Language code must exist on ProductEntityDescriptionDTO - object (description with that language will be updated).
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: productCode
          in: query
          description: Product code where to update existing description with given language
          required: true
          schema:
            type: string
      requestBody:
        description: Product description to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductEntityDescriptionDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductEntityDescriptionDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/products/updateProductPostingAllFields':
    post:
      tags:
        - Product register
      summary: Update Product posting to existing products existing posting
      description: Updates posting to product with given posting group. Posting group with given posting group id must exist. Product code will be given on query parameter. Posting group id must exist on ProductEntityPostingDTO - object.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: productCode
          in: query
          description: Product code where to update existing posting with given posting group
          required: true
          schema:
            type: string
      requestBody:
        description: Product posting to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductEntityPostingDTO'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductEntityPostingDTO'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        403:
          $ref: '#/components/responses/Forbidden'
        429:
          $ref: '#/components/responses/RateLimit'
  '/companies/{cuid}/estate-person/persons':        
    get:
      tags:
        - Estate person
      summary: Get list of Fivaldi estate persons
      description: Returns all persons for a Fivaldi company or all persons whose data has been changed if changedAfter-parameter has been used. This endpoint also returns persons who have non-disclosure for personal safety reasons (securityRestriction (Turvakielto)) activated in Fivaldi person register.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: changedAfter
          in: query
          description: Only returns persons that has been changed at this date or after this date. Format dd.MM.yyyy
          required: false
          schema:
            type: string
            format: date
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalEstatePersonResponseDTO'
  '/companies/{cuid}/estate-person/persons/{id}':
    get:
      tags:
        - Estate person
      summary: Get Fivaldi estate person
      description: Returns person's all information. This endpoint also returns addresses for persons who have non-disclosure for personal safety reasons (securityRestriction (Turvakielto)) activated in Fivaldi person register.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalEstatePersonDetailsResponseDTO'
  '/companies/{cuid}/estate-person/persons/createPerson':
    post:
      tags:
        - Estate person
      summary: Create estate person
      description: Create a new person to the Fivaldi estate person registry.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      requestBody:
        description: Estate person to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalEstatePersonDetailsRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalEstatePersonDetailsResponseDTO'
  '/companies/{cuid}/estate-person/persons/{id}/addAddress':
    post:
      tags:
        - Estate person
      summary: Add address for a estate person
      description: Add a new address for a person in the Fivaldi person register.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
      requestBody:
        description: Address to be added to estate person
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalAddressRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalAddressResponseDTO'
  '/companies/{cuid}/estate-person/persons/{id}/addPersonRole':
    post:
      tags:
        - Estate person
      summary: Add person role for a estate person
      description: Add a person role for a person in the Fivaldi person register. Person role is typically used for indicating if a person is a member of board in an apartment housing company. List of Fivaldi person roles that can be assigned to a person can be found by using endpoint <GET
        /companies/{cuid}/estate-person/getCompanyPersonRolesInUse>
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
      requestBody:
        description: Person role to be added to estate person
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalPersonRoleRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalPersonRoleResponseDTO'
  '/companies/{cuid}/estate-person/persons/{id}/addEInvoiceInformation':
    post:
      tags:
        - Estate person
      summary: Add einvoice information for a estate person
      description: Add e-invoice information for a person in the Fivaldi person register. Parameter “directDebit” stands for “Suoramaksu”. “Suoramaksu” is used when you don’t have a netbank and
        you want to have paper invoices.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
      requestBody:
        description: Einvoice information to be added to estate person
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalEInvoiceAddressRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalEInvoiceAddressResponseDTO'
  '/companies/{cuid}/estate-person/persons/{id}/updatePersonAllFields':
    post:
      tags:
        - Estate person
      summary: Update estate person
      description: Update person details for a Fivaldi person register.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
      requestBody:
        description: Estate person to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalEstatePersonRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalEstatePersonResponseDTO'
  '/companies/{cuid}/estate-person/persons/{id}/address/{addressId}/updateAddressAllFields':
    post:
      tags:
        - Estate person
      summary: Update address for a estate person
      description: Update address for a Fivaldi person register. Parameter "type" stands for “Osoitetyyppi”. Parameter "typeDescription" stands for type of address (“Posti osoite”, “Käynti osoite”, “Väliaikainen osoite”, “Edellinen osoite”). Parameter "validEnd" stands for “Loppupvm”. Parameter "validStart" stands for “Alkupvm”.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
        - name: addressId
          in: path
          description: Address id
          required: true
          schema:
            type: integer
      requestBody:
        description: Address to be updated on estate person
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalAddressRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalAddressResponseDTO'
  '/companies/{cuid}/estate-person/persons/{id}/person-role/{personRoleId}/updatePersonRoleAllFields':
    post:
      tags:
        - Estate person
      summary: Update person role for a estate person
      description: Update a person role for a person in the Fivaldi person register. Person role is typically used for indicating if a person is a member of board in an apartment housing company. List of Fivaldi person roles that can be assigned to a person can be found by using endpoint <GET
        /companies/{cuid}/estate-person/getCompanyPersonRolesInUse>
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
        - name: personRoleId
          in: path
          description: Person role id
          required: true
          schema:
            type: integer
      requestBody:
        description: Person role to be updated on estate person
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalPersonRoleUpdateRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalPersonRoleResponseDTO'
  '/companies/{cuid}/estate-person/persons/{id}/einvoice-address/{addressId}/updateEInvoiceInformationAllFields':
    post:
      tags:
        - Estate person
      summary: Update einvoice information for a estate person
      description: Update e-invoice information for a person in Fivaldi person register.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
        - name: addressId
          in: path
          description: Einvoice address id
          required: true
          schema:
            type: integer
      requestBody:
        description: Einvoice information to be updated on estate person
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalEInvoiceAddressUpdateRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalEInvoiceAddressResponseDTO'
  '/companies/{cuid}/estate-person/getCompanyPersonRolesInUse':
    get:
      tags:
        - Estate person
      summary: Get list of Fivaldi person roles that can be assigned to a person
      description: Get a list of Fivaldi person roles that can be assigned to a person for a Fivaldi company. These person roles can then be assigned to persons in Fivaldi person register by using the endpoint <POST /companies/{cuid}/estate-person/persons/{id}/addPersonRole> by using "Person id" as a parameter.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalCompanyPersonRoleResponseDTO'
  '/companies/{cuid}/estate-person/getTransmissionTypes':
    get:
      tags:
        - Estate person
      summary: Get list of Fivaldi transmission types
      description: Get list of Fivaldi transmission types (Välitystapa). “Välitystapa” is used to define how invoices are sent (AutoInvoice, e-invoice, paper invoice, etc).
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/TransmissionTypeDTO'
  '/companies/{cuid}/estate-apartment/apartments':
    get:
      tags:
        - Estate apartment
      summary: Get list of Fivaldi apartments
      description: Get list of Fivaldi apartments.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: changedAfter
          in: query
          description: Earliest date that apartment is changed that will be considered. Format dd.mm.yyyy
          required: false
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalApartmentResponseDTO'
  '/companies/{cuid}/estate-apartment/apartments/{id}':
    get:
      tags:
        - Estate apartment
      summary: Get Fivaldi apartment
      description: Get Fivaldi apartment details.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Apartment id
          required: true
          schema:
            type: integer
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalApartmentDetailsResponseDTO'
  '/companies/{cuid}/estate-bond/bonds':
    get:
      tags:
        - Estate bond
      summary: Get list of Fivaldi bonds
      description: Get list of Fivaldi bonds. Bond stands for “Sidos” in Fivaldi. “Sidos” is one part of Fivaldi registries which combines a Fivaldi person and a Fivaldi apartment as a one unit.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: changedAfter
          in: query
          description: Earliest date that bond is changed that will be considered. Format dd.mm.yyyy
          required: false
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalBondResponseDTO'
  '/companies/{cuid}/estate-bond/bonds/{reference-number}':
    get:
      tags:
        - Estate bond
      summary: Get Fivaldi bond
      description: Get list of Fivaldi bond details.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: reference-number
          in: path
          description: bond reference number
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalBondDetailsResponseDTO'
  '/companies/{cuid}/estate-person/persons/{person-id}/bonds':
    get:
      tags:
        - Estate bond
      summary: Get list of Fivaldi bonds by person
      description: Get list of Fivaldi bonds by person ID.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: person-id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalBondDetailsResponseDTO'
  '/companies/{cuid}/estate-apartment/apartments/{apartment-id}/bonds':
    get:
      tags:
        - Estate bond
      summary: Get list of Fivaldi bond by apartment
      description: Get a list of Fivaldi bonds by apartment ID.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: apartment-id
          in: path
          description: Apartment id
          required: true
          schema:
            type: integer
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalBondDetailsResponseDTO'
  '/companies/{cuid}/estate-bond/bond-paymenttypes':
    get:
      tags:
        - Estate bond
      summary: Get list of changed bond payment types
      description: Get a list of Fivaldi bond payment types.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: changedAfter
          in: query
          description: Earliest date that bond is changed that will be considered. Format dd.mm.yyyy
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalBondDetailsResponseDTO'
  '/companies/{cuid}/estate-meter/meters':
    get:
      tags:
        - Estate meter
      summary: Get list of Fivaldi meters
      description: Get list of Fivaldi meters.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalMeterResponseDTO'
  '/companies/{cuid}/estate-meter/meter-readings/saveConsumptionReadings':
    post:
      tags:
        - Estate meter
      summary: Create consumption readings for Fivaldi meter
      description: Add consumption readings for a Fivaldi meter. Meter can have two different saving methods (Tallennustapa). 1) Reading from the meter (Mittarin lukema) 2) Consumption comparing to the previous reading (Kulutus). By using endpoint <GET /companies/{cuid}/estate-meter/meters> you can get saving method types for the meters. If the meter has spinned, then parameter "meterSpinFlag" should be used. If the meter is replaced, then parameter "replaceValueFlag" should be used.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      requestBody:
        description: Consumption reading to be created for meter
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ExternalMeterConsumptionRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalMeterConsumptionResponseDTO'
  '/companies/{cuid}/estate-meter/meter-readings/apartments/{apartment-id}':
    get:
      tags:
        - Estate meter
      summary: Get consumption readings for specific apartment
      description: Get consumption readings for specific Fivaldi apartment.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: apartment-id
          in: path
          description: Apartment id
          required: true
          schema:
            type: string
        - name: readAfter
          in: query
          description: Earliest date that meter consumption has been read. Format dd.mm.yyyy
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalApartmentMeterConsumptionsDTO'
  '/companies/{cuid}/estate-preferences/housingCompanyDetails':
    get:
      tags:
        - Estate preferences
      summary: Get Fivaldi housing company details
      description: Get Fivaldi housing company details.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalHousingCompanyDetailsResponseDTO'
  '/companies/{cuid}/estate-payment-types/payment-types':
    get:
      tags:
        - Estate payment types
      summary: Get Fivaldi payment type information
      description: Get list of Fivaldi payment types
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalPaymentTypeResponseDTO'
  '/companies/{cuid}/estate-rent-ledger/getReceivablesAndPrepayments/{reference-number}':
    get:
      tags:
        - Estate rent ledger
      summary: Get list of receivables and prepayments for spesific bond
      description: Get a list of receivables and prepayments for a specific bond. List of bonds can be found by using endpoint <GET /companies/{cuid}/estate-bond/bonds>. API returns real time values for the receivables and prepayments.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: reference-number
          in: path
          description: bond reference number
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalBondRentLedgerResponseDTO'
  '/companies/{cuid}/estate-rent-ledger/getReceivablesAndPrepayments/persons/{person-id}':
    get:
      tags:
        - Estate rent ledger
      summary: Get list of receivables and prepayments for spesific person
      description: Get a list of receivables and prepayments for a specific person. List of apartment repairs can be found by using endpoint <GET /companies/{cuid}/estate-person/persons>. API returns real time values for the receivables and prepayments.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: person-id
          in: path
          description: Person id
          required: true
          schema:
            type: integer
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalBondRentLedgerWithApartmentResponseDTO'
  '/companies/{cuid}/estate-rent-ledger/getReceivablesAndPrepayments/apartments/{apartment-id}':
    get:
      tags:
        - Estate rent ledger
      summary: Get list of receivables and prepayments for spesific apartment
      description: Get a list of receivables and prepayments for a specific apartment. List of apartment repairs can be found by using endpoint <GET /companies/{cuid}/estate-apartment/apartments>. API returns real time values for the receivables and prepayments.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: apartment-id
          in: path
          description: Apartment id
          required: true
          schema:
            type: integer
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalBondRentLedgerWithPersonResponseDTO'
  
  '/companies/{cuid}/estate-apartment-housing-company/repairs':
    get:
      tags:
        - Estate repair
      summary: Get list of Fivaldi apartment housing company repairs
      description: Get list of Fivaldi housing company repairs.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalCompanyRepairResponseDTO'
  '/companies/{cuid}/estate-apartment/repairs':
    get:
      tags:
        - Estate repair
      summary: Get list of changed apartment repairs
      description: Get list of changed Fivaldi housing company repairs by using “changedAfter” parameter.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: changedAfter
          in: query
          description: Earliest date that repair is changed that will be considered. Format dd.mm.yyyy
          required: true
          schema:
            type: string
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalApartmentRepairResponseDTO'
  '/companies/{cuid}/estate-apartment/repairs/apartments/{id}/repairs':
    get:
      tags:
        - Estate repair
      summary: Get list of repairs about Fivaldi apartment
      description: Get a list of repairs of one Fivaldi apartment by using apartment ID.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Apartment id
          required: true
          schema:
            type: integer
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        404:
          description: Not Found
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        type: array
                        items:
                          $ref: '#/components/schemas/ExternalApartmentRepairResponseDTO'
  '/companies/{cuid}/estate-apartment/repairs/createApartmentRepair':
    post:
      tags:
        - Estate repair
      summary: Create Fivaldi apartment repair
      description: Create an apartment repair for one apartment in Fivaldi. List of Fivaldi apartments can be found by using endpoint <GET /companies/{cuid}/estate-apartment/apartments>
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      requestBody:
        description: Apartment repair to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalApartmentRepairRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalApartmentRepairResponseDTO'
  '/companies/{cuid}/estate-apartment/repairs/{id}/updateApartmentRepairAllFields':
    post:
      tags:
        - Estate repair
      summary: Update apartment repair
      description: Update an apartment repair for one Fivaldi apartment. "Repair id" can be used as a parameter. List of apartment repairs can be found by using endpoint <GET /companies/{cuid}/estate-apartment/repairs/apartments/{id}/repairs>
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: Repair id
          required: true
          schema:
            type: integer
      requestBody:
        description: Apartment repair to be updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalApartmentRepairRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalApartmentRepairResponseDTO'
  '/companies/{cuid}/estate-apartment-housing-company/repairs/createCompanyRepair':
    post:
      tags:
        - Estate repair
      summary: Create Fivaldi apartment housing company repair
      description: Create a repair for a Fivaldi company.
      parameters:
        - name: cuid
          in: path
          description: Fivaldi company id
          required: true
          schema:
            type: string
      requestBody:
        description: Apartment housing company repair to be created
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalCompanyRepairRequestDTO'
      responses:
        200:
          description: OK
        400:
          description: Bad Request
        401:
          description: Unauthorized
        403:
          description: Forbidden
        429:
          $ref: '#/components/responses/RateLimit'
        default:
          description: Response
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/GeneralResponseEnvelope'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ExternalCompanyRepairResponseDTO'

components:
  responses:
    BadRequest:
      description: Bad request, request parameter or body in invalid format
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorList'
    BadRequestWithCode:
      description: Bad request, request parameter or body in invalid format
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErroCodeList'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorList'
    Forbidden:
      description: Forbidden, authorization failed
    NotFound:
      description: No data found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized, authentication failed
    RateLimit:
      description: Too many requests
  schemas:
    ProductEntityDTO:
      type: object
      properties:
        productCode:
          type: string
          minLength: 1
          maxLength: 20
          nullable: false
          description: Product code (Tuotekoodi)
        description:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Product description. This is description of product using Fivaldi company's language (Selite)
        eanCode:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Ean-code (Ean-koodi)
        changeTime:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this when product is inserted or updated (Muutosaika)
    ProductEntityDetailsDTO:
      type: object
      properties:
        productCode:
          type: string
          minLength: 1
          maxLength: 20
          nullable: false
          description: Product code (Tuotekoodi)
        description:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Product description. This is description of product using Fivaldi company's language (Selite)
        eanCode:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Ean-code (Ean-koodi)
        changeTime:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this when product is inserted or updated (Muutosaika)
        changeUser:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this when product is inserted or updated (Muutoskäyttäjä)
        productGroup:
          type: string
          minLength: 0
          maxLength: 3
          nullable: true
          description: Product group id for product (Tuoteryhmä)
        unitId:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Unit id for product (Yksikkö)
        defaultToInvoice:
          type: boolean
          description: Is this product set as default to new sales orders (Vakiorivi myyntidokumentilla)
        purchaseCostPrice:
          type: number
          maximum: 9999999999.999999
          description:  Purchase cost price for this product with max. 6 decimals (Omakustannushinta)
        salesPrice:
          type: number
          maximum: 9999999999.999999
          description:  Sales price without tax for this product with max. 6 decimals (Myyntihinta)
        cnCode:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: CN code for customs data (CN nimike)
        cnUnit:
          type: string
          minLength: 0
          maxLength: 20
          nullable: true
          description: CN unit for customs data (CN toinen paljous yksikkö)
        cnNetWeight:
          type: number
          maximum: 9999999999.999999
          description:  CN net weight(kg) for customs data with max. 6 decimals (CN nettopaino (kg))
        cnMultiplier:
          type: number
          maximum: 9999999999.999999
          description:  CN multiplier for Customs data with max. 6 decimals (Toinen paljous kerroin)
        originCountry:
          type: string
          minLength: 2
          maxLength: 2
          nullable: true
          description: Origin country code for customs data with ISO 3166-1 standard (Alkuperämaa)
        productEntityDescriptionDTOList:
          type: array
          items:
            $ref: '#/components/schemas/ProductEntityDescriptionDTO'
        productEntityPostingDTOList:
          type: array
          items:
            $ref: '#/components/schemas/ProductEntityPostingDTO'
    ProductEntityDescriptionDTO:
      type: object
      properties:
        languageCode:
          type: string
          minLength: 3
          maxLength: 3
          nullable: false
          description: Description language code  (Kielikoodi). Selitteet (FIN = Suomi, ENG = Englanti, SWE = Ruotsi)
          enum:
          - 'FIN'
          - 'ENG'
          - 'SWE'
        description:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Product description with given language. Description of product using Fivaldi company's language will be shown on product description (Selite)
        publicDescriptionText:
          type: string
          minLength: 0
          maxLength: 512
          nullable: true
          description: Public description text. This will be set as extra description to product row on sales order row (Ulkoinen kuvaus)
        internalDescriptionText:
          type: string
          minLength: 0
          maxLength: 512
          nullable: true
          description: Internal description text. This will be set as internal information to product row on sales order row (Sisäinen kuvaus)
        changeTime:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this when product description is inserted or updated (Muutosaika)
        changeUser:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: Fivaldi will set this when product description is inserted or updated (Muutoskäyttäjä)
    ProductEntityPostingDTO:
      type: object
      properties:
        postingGroupId:
          type: string
          minLength: 1
          maxLength: 10
          nullable: false
          description: Posting group id (Tiliöintiryhmä)
        postingCodeId:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Posting id. If empty product uses posting groups default posting on sales order if it is set (Tiliöintikoodi)
        changeTime:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this when product posting is inserted or updated (Muutosaika)
        changeUser:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: Fivaldi will set this when product posting is inserted or updated (Muutoskäyttäjä)
    CustomerEntityDTO:
      type: object
      properties:
        customerId:
          type: string
          minLength: 1
          maxLength: 10
          nullable: true
          description: Fivaldi will set this id to new customer (Asiakastunnus)
        businessId:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: Business id (Y-tunnus)
        customerName:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Customer name (Asiakkaan nimi)
        customerName2:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Customer name2 (Asiakkaan nimi2)
        email:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Customer email address (Asiakkaan sähköposti)
        email2:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Customer email address2 (Asiakkaan sähköposti2)
        phoneNumber:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Customer phone number (Asiakkaan puhelin)
        phoneNumber2:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Customer phone number2 (Asiakkaan puhelin2)
        externalId:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: External id of customer (Ulkoinen asiakastunnus)
        changeTime:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this when customer is inserted or updated (Muutosaika)
    CustomerEntityDetailsDTO:
      type: object
      properties:
        customerId:
          type: string
          minLength: 1
          maxLength: 10
          nullable: true
          description: Fivaldi will set this id to new customer (Asiakastunnus)
        businessId:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: Business id (Y-tunnus)
        customerName:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Customer name (Asiakkaan nimi)
        customerName2:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Customer name2 (Asiakkaan nimi2)
        email:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Customer email address (Asiakkaan sähköposti)
        email2:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Customer email address2 (Asiakkaan sähköposti2)
        phoneNumber:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Customer phone number (Asiakkaan puhelin)
        phoneNumber2:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Customer phone number2 (Asiakkaan puhelin2)
        changeTime:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this when customer is inserted or updated (Muutosaika)
        changeUser:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Latest change user of customer details (Muutoskäyttäjä)
        accountDimension1:
          type: string
          minLength: 0
          maxLength: 8
          nullable: true
          description: Default account dimension 1 value on sales (Seurantakohde 1)
        accountDimension2:
          type: string
          minLength: 0
          maxLength: 8
          nullable: true
          description: Default account dimension 2 value on sales (Seurantakohde 2)
        accountDimension3:
          type: string
          minLength: 0
          maxLength: 8
          nullable: true
          description: Default account dimension 3 value on sales (Seurantakohde 3)
        accountDimension4:
          type: string
          minLength: 0
          maxLength: 8
          nullable: true
          description: Default account dimension 4 value on sales (Seurantakohde 4)
        currency:
          type: string
          minLength: 3
          maxLength: 3
          nullable: true
          description: Currency or customer (Asiakkaan valuutta)
        customerSegment:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Customer segment of customer (Asiakassegmentti)
        customerInterestPercent:
          type: number
          maximum: 9999.999999
          description: Customer interest percent (Viivästyskorko)
        debtCollectionDisabled:
          type: boolean
          description: Is debt collection and reminders disabled for customer (Perintäkielto)
        deliveryMethod:
          type: string
          minLength: 0
          maxLength: 3
          nullable: true
          description: Customer default delivery method (Toimitustapa)
        externalId:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: External id of customer (Ulkoinen asiakastunnus)
        finvoiceBuyerPartyIdentifier:
          type: string
          minLength: 0
          maxLength: 1
          nullable: true
          description: Buyerpartyidentifier  (Ostajan asiakastunnukseksi). selitteet (O = OVT, A = Yritystunnus, M = Verkkolaskuosoitteessa annettu muu tunnus, null = Y-tunnus)
          enum:
          - 'O'
          - 'A'
          - 'M'
        finvoiceDimensionTextMask:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Finvoice dimensiontext mask for purchase invoice circulation (Seurantakohde-ehdotuksen tulkintasääntö)
        finvoiceNoPostingRows:
          type: boolean
          description: Don't handle incoming Finvoice postings (Älä tuo Finvoicen tiliöintirivejä)
        finvoiceOtherIdentifier:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: Receivers MessageReceiverDetails ToIdentifier on Finvoice (Vastaanottajan verkkolaskuosoitteen tunnus)
        fivaldiBankAccountId:
          type: string
          minLength: 0
          maxLength: 4
          nullable: true
          description: Fivaldi company's bank account id default to sales invoice (Pankkitili laskulle)
        languageCode:
          type: string
          minLength: 3
          maxLength: 3
          nullable: true
          description: Customer language code  (Asiakkaan kielikoodi). Selitteet (FIN = Suomi, ENG = Englanti, SWE = Ruotsi)
          enum:
          - 'FIN'
          - 'ENG'
          - 'SWE'
        instantMessagingType:
          type: string
          minLength: 0
          maxLength: 1
          nullable: true
          description: Purchase instant messaging type code  (Pankkisiirto-Viestityyppi). Selitteet (1 = Viite, 2  = Viesti, 3 = Veroviesti)
          enum:
          - '1'
          - '2'
          - '3'
        interestDisabled:
          type: boolean
          description: Interest invoices disabled for customer (Korkokielto)
        intermediatorCode:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: Finvoice reciever MessageReceiverDetails ToIntermediator (Vastaanottajan välittäjän tunnus)
        isCustomer:
          type: boolean
          description: Is this customer marked as customer (Asiakas)
        ovtIdentifier:
          type: string
          minLength: 0
          maxLength: 17
          nullable: true
          description: OVT-identifier for customer (OVT-tunnus)
        paymentPriority:
          type: integer
          maximum: 9
          nullable: true
          description: Payment pririty for purchases (Ostojen maksuprioriteetti). Selitteet (1 = Kiireellinen, 2 = Tärkeä, 3 = Normaali, 4 = Ei niin tärkeä, 5 = Voi odottaa)
          enum:
          - 1
          - 2
          - 3
          - 4
          - 5
        purchasePaymentTerm:
          type: string
          minLength: 0
          maxLength: 4
          nullable: true
          description: Purchase payment term (Maksuehto ostot)
        supplierCustomerId:
          type: string
          minLength: 0
          maxLength: 20
          nullable: true
          description: Suppliers customer id (Ostojen oma asiakastunnus)
        purchasePostingGroup:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Posting group id for purchases (Ostojen tiliöintiryhmä)
        additionalInformation:
          type: string
          minLength: 0
          maxLength: 2048
          nullable: true
          description: Additional info for customer (Lisätieto)
        privateAdditionalInfo:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Private additional info for customer (Sisäinen lisätieto)
        purchaseDeliveryMethodId:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Delivery method on purchases (Ostojen toimitustapa)
        purchasePostingCode:
          type: string
          minLength: 0
          maxLength: 4
          nullable: true
          description: Posting code for purchases (Ostojen tiliöintikoodi)
        salesPostingGroup:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Posting group for sales (Myynnin tiliöintiryhmä)
        purchaseDeliveryTermId:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Delivery term on purchases (Ostojen toimitusehto)
        responsablePerson:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Responsable person for customer (Vastuuhenkilö)
        referenceFormat:
          type: string
          minLength: 0
          maxLength: 2
          nullable: true
          description: Reference format (Viitenumeron muoto). Selitteet (LV = Laskunumero + vakio, VL = Vakio + laskunumero, VA = Vakioarvo)
          enum:
          - 'LV'
          - 'VL'
          - 'VA'
        referenceDefaultValue:
          type: string
          minLength: 0
          maxLength: 20
          nullable: true
          description: Reference default value (Vakioviite)
        salesPersonId:
          type: string
          minLength: 0
          maxLength: 20
          nullable: true
          description: Sales person for customer (Myyjä)
        salesPaymentTerm:
          type: string
          minLength: 0
          maxLength: 4
          nullable: true
          description: Payment term for sales to this customer (Myynnin maksuehto)
        isSupplier:
          type: boolean
          description: Is customer a supplier (Toimittaja)
        salesDeliveryTermId:
          type: string
          minLength: 0
          maxLength: 3
          nullable: true
          description: Sales delivery term (Myynnin toimitusehto)
        transmissionTypeId:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Transmissiontype for sales (Välitystapa)
        website:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Website for customer (www-osoite)
        specificationIdentifier:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: SpecificationIdentifier element on Finvoice (EU-normin mukainen verkkolaskukoodi)
        buyerCountrySubdivision:
          type: string
          minLength: 2
          maxLength: 35
          nullable: true
          description: BuyerCountrySubdivision element on Finvoice (Asiakkaan alueellinen yksikkö)
        classificationCode:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: ClassificationCode element on Finvoice (Turvalaskun koodi)
        classificationText:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: ClassificationText element on Finvoice (Turvalaskun selite)
        agreementIdentifier:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: AgreementIdentifier element on Finvoice (Sopimus)
        buyerReferenceIdentifier:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: BuyerReferenceIdentifier element on Finvoice (Asiakkaan ilmoittama viite)
        accountDimensionText:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: AccountDimensionText element on Finvoice (Tiliöintiviite)
        tenderReference:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: TenderReference element on Finvoice (Tarjouspyynnön viite)
        isConsumer:
          type: boolean
          description: Is customer a consumer (Kuluttaja-asiakas)
        einvoiceDirectPaymentprintingType:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: Direct payment printing type for e-invoice, can be used if eInvoiceDirectPayment is true (E-laskun suoramaksun tulostustapa)
        einvoiceDirectPayment:
          type: boolean
          description: Direct payment for e-invoice, can be used if customer transmissiontype is e-invoice (E-laskun suoramaksu)
        customerEntityAddressDTOS:
          type: array
          items:
            $ref: '#/components/schemas/CustomerEntityAddressDTO'
        customerEntityBankAccountDTOS:
          type: array
          items:
            $ref: '#/components/schemas/CustomerEntityBankAccountDTO'
    CustomerEntityBankAccountDTO:
      type: object
      properties:
        bankAccountId:
          type: string
          minLength: 1
          maxLength: 10
          nullable: true
          description: Fivaldi will set this id to new bank accounts (Id)
        bbanNumber:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this based on IBAN- number if FI bank account and IBAN is given (Tilinumero)
        bankAddress:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: Address of bank account (Pankin osoite)
        bankName:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: Name of bank account (Pankkitilin nimi)
        changeTime:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this when bank account is inserted or updated (Muutosaika)
        changeUser:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: Latest change user of bank account (Muutoskäyttäjä)
        clearingCode:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Clearing code of bank account (Clearing-koodi)
        countryId:
          type: string
          minLength: 2
          maxLength: 2
          nullable: false
          description: Country code of bank account with ISO 3166-1 standard (Pankkitilin maakoodi)
        foreignPaymentCharge:
          type: string
          minLength: 0
          maxLength: 1
          nullable: true
          description: Foreign payment charge code (Valuuttamaksun palvelumaksut). Selitteet (J = Jaettu, T = Maksaja maksaa)
          enum:
          - 'J'
          - 'T' 
        foreignPaymentType:
          type: string
          minLength: 0
          maxLength: 1
          nullable: true
          description: Foreign payment type code (Valuuttamaksun maksutapa). Selitteet (M = Maksumääräys, P = Pikamääräys, Q = SWIFT- shekki, S = Shekki, T = Pankin sisäinen tilisiirto, K = Konsernimaksu, B = Eu-maksu OP)
          enum:
          - 'M'
          - 'P'
          - 'Q'
          - 'S'
          - 'T'
          - 'K'
          - 'B'
        ibanNumber:
          type: string
          minLength: 0
          maxLength: 50
          nullable: true
          description: IBAN number of bank account if FI bank account (IBAN)
        swift:
          type: string
          minLength: 0
          maxLength: 11
          nullable: true
          description: SWIFT / BIC of bank account (SWIFT)
    CustomerEntityAddressDTO:
      type: object
      properties:
        addressType:
          type: string
          minLength: 0
          maxLength: 2
          nullable: true
          description: Address type (Osoitetyyppi). Selitteet (01 = Postiosoite, 02 = Käyntiosoite, 03 = Laskutusosoite, 04 = Toimitusosoite)
          enum:
          - '01'
          - '02'
          - '03'
          - '04'
        addressId:
          type: number
          minLength: 1
          maxLength: 10
          nullable: true
          description: Fivaldi will set this id to new address (Id)
        streetAddress:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Street address (Katuosoite)
        streetAddress2:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Street address2 (Katuosoite2)
        postalCode:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Postal code (Postinumero)
        postalAddress:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Postal address of address (Postitoimipaikka)
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
          nullable: true
          description: Country code with ISO 3166-1 standard (Osoitteen maakoodi)
        isMainAddress:
          type: boolean
          description: Main address of customer (Pääosoite)
        changeTime:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Fivaldi will set this when address is inserted or updated (Muutosaika)
        changeUser:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: Latest change user of address (Muutoskäyttäjä)
    SalesOrderDTO:
      type: object
      properties:
        accountDimensionText:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Finvoice3 AccountDimensionText element (Tiliöintiviite)
        agreementIdentifier:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: Finvoice3 agreement identifier (Sopimus)
        buyer:
          $ref: '#/components/schemas/BuyerDTO'
        buyerReferenceIdentifier:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: Finvoice3 BuyerReferenceIdentifier element (Asiakkaan ilmoittama viite)
        changeTime:
          type: string
          description: Change time of sales order (Muutosaika)
        changeUser:
          type: string
          description: Change user of sales order (Muutoskäyttäjä)
        createTime:
          type: string
          description: Create time of sales order (Luontiaika)
        createUser:
          type: string
          description: Create user of sales order (Luontikäyttäjä)
        cuid:
          type: string
          minLength: 32
          maxLength: 32
          nullable: true
          description: Fivaldi company id (cuid) set by Fivaldi from endpoint authenticated url
        currency:
          type: string
          minLength: 3
          maxLength: 3
          nullable: false
          enum:
          - EUR
          description: Currency of order / Only EUR supported (Valuutta)
        currencyRate:
          type: number
          description: Currency rate of currency / Only 1 supported (Kurssi)
        customerId:
          type: string
          minLength: 1
          maxLength: 10
          nullable: false
          description: Customer id of customer on Fivaldi company's customer register (Asiakastunnus)
        deliveryDate:
          type: string
          minLength: 10
          maxLength: 10
          nullable: true
          description: Delivery date , format dd.mm.yyyy (Toimituspäivä)
        deliveryMethodId:
          type: string
          minLength: 1
          maxLength: 3
          nullable: true
          description: Valid id from Fivaldi company's delivery methods (Toimitustapa)
        deliveryTermId:
          type: string
          minLength: 1
          maxLength: 3
          nullable: true
          description: Valid id from Fivaldi company's delivery terms (Toimitusehto)
        externalBatchId:
          type: string
          nullable: true
          description: Unique batch id set by Fivaldi. Will be returned on response (Ulkoinen erä id)
        externalOrderNumber:
          type: string
          minLength: 1
          maxLength: 100
          nullable: true
          description: External order number from 3rd party application (Ulkoinen tilausnumero)
        id:
          type: string
          nullable: true
          description: Unique document id set by Fivaldi (Id)
        invoiceReference:
          type: string
          minLength: 1
          maxLength: 80
          nullable: true
          description: Invoice reference (Viitteemme)
        languageCode:
          type: string
          minLength: 3
          maxLength: 3
          nullable: false
          enum:
          - FIN
          - SWE
          - ENG
          description: Language code of sales order (Kieli)
        orderDate:
          type: string
          minLength: 10
          maxLength: 10
          nullable: true
          description: Order date (dd.mm.yyyy) (Tilauspäivä)
        orderIdentifier:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: Order identifier (Tilauksenne)
        orderNumber:
          type: string
          nullable: true
          description: Unique order number set by Fivaldi (Tilausnumero)
        orderStatus:
          type: string
          minLength: 0
          maxLength: 100
          nullable: true
          enum:
          - DRAFT
          - INVOICED
          description: Order status, new orders will be set as DRAFT by Fivaldi (Tilauksen tila)
        paymentTermId:
          type: string
          minLength: 0
          maxLength: 70
          nullable: false
          description: Valid id from Fivaldi company's payment terms (Maksuehto)
        postingGroupId:
          type: string
          minLength: 1
          maxLength: 10
          nullable: false
          description: Valid id from Fivaldi company's posting groups (Tiliöintiryhmä)
        readyToInvoice:
          type: boolean
          description: Ready to invoice information (Laskutusvalmis)
        recipient:
          $ref: '#/components/schemas/RecipientDTO'
        salesOrderRowDTOS:
          type: array
          items:
            $ref: '#/components/schemas/SalesOrderRowDTO'
        salesPersonId:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Valid id from Fivaldi company's sales persons (Myyjä)
        tenderReference:
          type: string
          minLength: 0
          maxLength: 70
          nullable: true
          description: Finvoice3 TenderReference element (Tarjouspyynnön viite)
        totalVatAmount:
          type: number
          maximum: 999999999999.99
          description: Total vat amount of order calculated by Fivaldi from row total sums (Vero yhteensä)
        totalVatExcludedAmount:
          type: number
          maximum: 999999999999.99
          description: Total vat excluded amount of order calculated by Fivaldi from row total sums (Veroton summa yhteensä)
        totalVatIncludedAmount:
          type: number
          maximum: 999999999999.99
          description: Total vat included amount of order calculated by Fivaldi from row total sums (Verolinen summa yhteensä)
        transmissionTypeId:
          type: string
          minLength: 10
          maxLength: 10
          nullable: true
          description: Valid id from Fivaldi company's transmission types (Välitystapa)
    SalesOrderRowDTO:
      type: object
      properties:
        accountDimension1:
          type: string
          minLength: 0
          maxLength: 8
          nullable: true
          description: Valid accountId value from Fivaldi company's Account dimensions (seurantakohde 1)
        accountDimension2:
          type: string
          minLength: 0
          maxLength: 8
          nullable: true
          description: Valid accountId value from Fivaldi company's Account dimensions (seurantakohde 2)
        accountDimension3:
          type: string
          minLength: 0
          maxLength: 8
          nullable: true
          description: Valid accountId value from Fivaldi company's Account dimensions (seurantakohde 3)
        accountDimension4:
          type: string
          minLength: 0
          maxLength: 8
          nullable: true
          description: Valid accountId value from Fivaldi company's Account dimensions (seurantakohde 4)
        changeTime:
          type: string
          description: Change time of sales order row (Muutosaika)
        changeUser:
          type: string
          description: Change user of sales order row (Muutoskäyttäjä)
        description:
          type: string
          minLength: 0
          maxLength: 80
          nullable: true
          description: Description of product code, set value if not textRow (selite)
        discountRate:
          type: number
          maximum: 100.00
          description: discount percent with maxium of 2 decimals for row, set value if not textRow (Alennusprosentti)
        internalDescription:
          type: string
          description: Internal description of product code, set value if not textRow (Sisäinen lisätieto)
        productCode:
          type: string
          minLength: 0
          maxLength: 20
          nullable: true
          description: Valid product code from Fivaldi comany's product register, set value if not textRow (Tuotekoodi)
        quantity:
          type: number
          maximum: 9999999999.999
          description: Quoantity of products on row, set value if not textRow (Määrä)
        rowFreeText:
          type: string
          minLength: 0
          maxLength: 512
          nullable: true
          description: Row free text, if textRow then this is it's value, if not, this is additional row free text to given product row (Lisätieto)
        textRow:
          type: boolean
          description: Boolean if row is product row or textrow (Tekstirivi)
        unitPriceExcludingTax:
          type: number
          maximum: 9999999999.999999
          description:  Give this value if you wan't to calculate row total sum based on this. UnitPriceExcludingTax and totalSumIncludingTax can not be given on same row! Unit price excluding tax with maxium 6 decimals. Fivaldi will calculate row total sum including tax based on this, discount percent and vat code from posting, set value if not textRow (Rivin verollinen summa yhteensä)
        totalSumIncludingTax:
          type: number
          maximum: 999999999999.99
          description:  Give this value if you wan't to calculate unit price based on this. UnitPriceExcludingTax and totalSumIncludingTax can not be given on same row! Row total sum including tax with 2 decimals. Fivaldi will calculate unit price based on this, discount percent and vat code from posting, set value if not textRow (Rivin verollinen summa yhteensä)
        unitId:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Valid id from Fivaldi company's units, set value if not textRow (Yksikkö)
    BuyerDTO:
      type: object
      properties:
        buyerOrganisationName:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Name of sales order buyer (Laskutusosoitteen nimi)
        buyerOrganisationName2:
          type: string
          minLength: 0
          maxLength: 40
          nullable: true
          description: Name2 of sales order buyer (Laskutusosoitteen nimi2)
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
          nullable: true
          description: Country code of buyer address with ISO 3166-1 starndard (Laskutusosoitteen maakoodi)
        countryName:
          type: string
          description: Country description. Fivaldi will set this based on Country code (Laskutusosoitteen maan selite)
        postCodeIdentifier:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Postal code of sales order buyer address (Laskutusosoitteen postinumero)
        streetName:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Street name of sales order buyer address (Laskutusosoitteen lähiosoite)
        streetName2:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Street name2 of sales order buyer address (Laskutusosoitteen lähiosoite2)
        townName:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Town name of sales order buyer address (Laskutusosoitteen postitoimipaikka)
    RecipientDTO:
      type: object
      properties:
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
          nullable: true
          description: Country code of recipient address with ISO 3166-1 standard (Toimitusosoitteen maakoodi)
        countryName:
          type: string
          description: Country description. Fivaldi will set this based on Country code (Toimitusosoitteen maan selite)
        postCodeIdentifier:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Postal code of sales order recipient address(Toimitusosoitteen postinumero)
        recipientOrganisationName:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Name of sales order recipient (Toimitusosoitteen nimi)
        recipientOrganisationName2:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Name2 of sales order recipient (Toimitusosoitteen nimi2)
        streetName:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Street name of sales order recipient (Toimitusosoitteen lähiosoite)
        streetName2:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Street name2 of sales order recipient (Toimitusosoitteen lähiosoite2)
        townName:
          type: string
          minLength: 0
          maxLength: 35
          nullable: true
          description: Town name of sales order recipient address(Toimitusosoitteen postitoimipaikka)
    Customer:
      type: object
      properties:
        customerId: 
          type: string
        name1: 
          type: string
        name2: 
          type: string
        businessId: 
          type: string
    Company:
      type: object
      properties:
        companyId:
          type: integer
          description: Fivaldi company id
        databaseId:
          type: string
          description: Fivaldi database schema
        cuid:
          type: string
          description: Fivaldi internal company id
        customerId:
          type: string
          description: Fivaldi customer id
        name1:
          type: string
        name2:
          type: string
        streetAddress:
          type: string
        postalAddress:
          type: string
        countryId:
          type: string
        phone:
          type: string
        fax:
          type: string
        website:
          type: string
        email:
          type: string
        businessId:
          type: string
          description: Y-tunnus
        currency:
          type: string
        city:
          type: string
        language:
          type: string
          enum:
          - FIN
          - SWE
          - ENG
    ApiError:
      type: object
      properties:
        status:
          type: object
          properties: {}
          description: HTTP Status code
        message:
          type: string
          description: Error message
    ApiErrorList:
      type: object
      properties:
        status:
          type: object
          properties: {}
          description: HTTP Status code
        message:
          type: string
          description: Error message
        errors:
          type: array
          description: List of errors
          items:
            type: string
    ApiErroCodeList:
      type: object
      properties:
        message:
          type: string
          description: Error message text.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorCode'
    ApiErrorCode:
      type: object
      properties:
        errorCode:
          type: number
          description: Error code that is described in ErrorCodes
        message:
          type: string
    ErrorCodes:
      type: object
      properties:
        erorCode:
          type: string
          enum: 
            - 10. BINDING_PARAMETER_ERROR
            - 20. ERROR_IMPORT_VOUCHERS
            - 21. INVALID_DATE_INSIDE_VOUCHERS
            - 22. INVALID_CUID_MISMATCH
            - 23. INVALID_ACCOUNTING_TYPE_MISMATCH
            - 30. DATE_MISMATCH_INSIDE_VOUCHER_ENTRIES
            - 31. CUID_PARAMS_MISMATCH
            - 32. ACCOUNTING_TYPE_PARAMS_MISMATCH
            - 33. EXPORTING_ACCOUNTING_TYPE
            - 34. INVALID_VAT_TYPE
            - 35. VAT_CODE_NOT_EXIST
            - 40. GETTING_ACCOUNT_BALANCES
            - 41. INCORECT_ACCOUNT_PARAMETERS
            - 42. INVALID_ACCOUNT INVALID_DIMENSION
            - 43. INVALID_DIMENSION
            - 44. INVALID_VOUCHER_NUMBER
            - 45. INVALID_VOUCHER_MONTH
            - 46. INVALID_VOUCHER_FISCAL_YEAR
    ExternalBudgetResponseDTO:
      type: object
      properties:
        budgetId:
          type: string
          description: Unique id of budget
        fiscalYearId:
          type: integer
          description: Identifier for the fiscal year
        budgetName:
          type: string
          description: Name of the budget
        changeTime:
          type: string
          description: Fivaldi will set this when budget is inserted or updated in format "dd.MM.YYYY hh:mm:ss" (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when budget is inserted or updated (Muutoskäyttäjä)
        budgetEntries:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalBudgetEntryResponseDTO'
    ExternalBudgetEntryResponseDTO:
      type: object
      properties:
        bookkeepingPeriod:
          type: integer
          description: Bookkeeping period for fiscal year.
          example:  201101
        accountNumber:
          type: string
          description: Number of account in Fivaldi account chart
        accountName:
          type: string
          description: Name of account in Fivaldi account chart
        sum:
          type: number
        dimension:
          $ref: '#/components/schemas/BudgetBookkeepingDimension'
        changeTime:
          type: string
          description: Fivaldi will set this when budget entry is inserted or updated in format "dd.MM.YYYY hh:mm:ss" (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when budget entry is inserted or updated (Muutoskäyttäjä)
    ExternalBudgetRequestDTO:
      type: object
      properties:
        budgetId:
          type: string
          description: Id of the budget, must be unique
          nullable: false
          minLength: 1
          maxLength: 20
        fiscalYearId:
          type: integer
          description: Fiscal year for the budget, must be existing for the company
          nullable: false
          minimum: 1950
          exclusiveMinimum: true
          maximum: 2100
          exclusiveMaximum: true
        budgetName:
          type: string
          description: Name of the budget
          nullable: true
          maxLength: 255
        budgetEntries:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalBudgetEntryRequestDTO'
    ExternalBudgetEntryRequestDTO:
      type: object
      properties:
        bookkeepingPeriod:
          type: integer
          description: Bookkeeping period for fiscal year.
          nullable: false
          minimum: 200001
          exclusiveMinimum: true
          maximum: 209912
          exclusiveMaximum: true
          example:  209901
        accountNumber:
          type: string
          description: Number of the account in Fivaldi account chart
          nullable: false
          minLength: 1
          maxLength: 8
        sum:
          type: number
          description: Budget sum
        dimension:
          type: object
          properties:
            description: 
              $ref: '#/components/schemas/BudgetDimensionsDTO'
    BudgetBookkeepingDimension:
      type: object
      description: Object of containing bookkeeping dimensions(seurantakohteet) and their names from Fivaldi account chart
      properties:
        dimension1:
          type: string
        dimension1Name:
          type: string
        dimension2:
          type: string
        dimension2Name:
          type: string
        dimension3:
          type: string
        dimension3Name:
          type: string
        dimension4:
          type: string
        dimension4name:
          type: string
    BudgetDimensionsDTO:
      type: object
      nullable: true
      description: Object that contains keys for the dimensions 1-4 (Seurantakohteet), if key is given it must exist on Fivaldi account chart
      properties:
        dimension1:
          type: string
          nullable: true
          minLength: 1
          maxLength: 8
          description: Seurantakohde1 key
        dimension2:
          type: string
          nullable: true
          minLength: 1
          maxLength: 8
          description: Seurantakohde2 key
        dimension3:
          type: string
          nullable: true
          minLength: 1
          maxLength: 8
          description: Seurantakohde3 key
        dimension4:
          type: string
          nullable: true
          minLength: 1
          maxLength: 8
          description: Seurantakohde4 key
    PurchaseInvoice:
      type: object
      properties:
        cuid:
          type: string
          description: Id of Fivaldi company
        invoiceId:
          type: integer
          description: Purchase invoice id
        journalNo:
          type: string
          description: Bookkeeping journal number
        chainId:
          type: integer
        chain:
          type: string
        currentStepId:
          type: integer
        currentStep:
          type: string
        invoiceStatus:
          type: string
        supplierId:
          type: string
        supplierName1:
          type: string
        supplierName2:
          type: string
        supplierAddress1:
          type: string
        supplierAddress2:
          type: string
        supplierPostalCode:
          type: string
        supplierCity:
          type: string
        supplierCountryId:
          type: string
        typeSepaOrCrossBorder:
          type: string
        typeInvoiceOrCashPayment:
          type: string
        iban:
          type: string
        bic:
          type: string
        bankRefNo:
          type: string
        bankMessage:
          type: string
        bankMessageType:
          type: string
        invoiceDate:
          type: string
        invoiceType:
          type: string
        bookingDate:
          type: string
        dueDate:
          type: string
        total:
          type: integer
        cashDiscountDueDate:
          type: string
        cashDiscountPercent:
          type: integer
        cashTotal:
          type: integer
        currencyId:
          type: string
        currencyRate:
          type: number
        paymentTermId:
          type: integer
        originalInvoiceNo:
          type: string
        paymentPriority:
          type: string
        clearingCode:
          type: string
        crossBorderPaymentType:
          type: string
        crossBorderBankFeeSharing:
          type: string
        deleted:
          type: boolean
        bookkeepingAccount:
          type: string
        bookkeepingDimension1:
          type: string
        bookkeepingDimension2:
          type: string
        bookkeepingDimension3:
          type: string
        bookkeepingDimension4:
          type: string
        approvedForPaying:
          type: boolean
        vatType:
          type: string
        ibanFrom:
          type: string
        workSiteKey:
          type: integer
        additionalInfo1:
          type: string
        additionalInfo2:
          type: string
        additionalInfo3:
          type: string
        createTime:
          type: string
        createUser:
          type: string
        changeTime:
          type: string
        changeUser:
          type: string
        deleteTime:
          type: string
        deleteUser:
          type: string
        buyerRefId:
          type: string
        sellerRefId:
          type: string
        archiveFileIds:
          type: array
          items:
            type: integer
        stepsLeft:
          type: integer
    PurchaseInvoiceResponseDTO:
      type: object
      properties:
        message: 
          type: string
        warnings: 
          type: array
          items:
            type: string
        invoiceDTO: 
          $ref: '#/components/schemas/PurchaseInvoiceDTO'
    PurchaseInvoiceDTO:
      type: object
      properties:
        cuid:
          type: string
          description: Id of Fivaldi company
        invoiceId:
          type: integer
          description: Purchase invoice Fivaldi id
        journalNo:
          type: string
          description: Bookkeeping journal number
        chainId:
          type: integer   
        invoiceStatus:
          type: string
        supplierId:
          type: string
        supplierName1:
          type: string
        supplierName2:
          type: string
        supplierAddress1:
          type: string
        supplierAddress2:
          type: string
        supplierPostalCode:
          type: string
        supplierCity:
          type: string
        supplierCountryId:
          type: string
        typeSepaOrCrossBorder:
          type: string
        typeInvoiceOrCashPayment:
          type: string
        iban:
          type: string
        bic:
          type: string
        bankRefNo:
          type: string
        bankMessage:
          type: string
        bankMessageType:
          type: string
        invoiceDate:
          type: string
        bookingDate:
          type: string
        dueDate:
          type: string
        total:
          type: integer
        cashDiscountDueDate:
          type: string
        cashDiscountPercent:
          type: integer
        cashTotal:
          type: integer
        currencyId:
          type: string
        currencyRate:
          type: number
        paymentTermId:
          type: integer
        originalInvoiceNo:
          type: string
        paymentPriority:
          type: string
        clearingCode:
          type: string
        crossBorderPaymentType:
          type: string
        crossBorderBankFeeSharing:
          type: string
        deleted:
          type: boolean
        bookkeepingAccount:
          type: string
        bookkeepingDimension1:
          type: string
        bookkeepingDimension2:
          type: string
        bookkeepingDimension3:
          type: string
        bookkeepingDimension4:
          type: string
        approvedForPaying:
          type: boolean
        vatType:
          type: string
        ibanFrom:
          type: string
        workSiteKey:
          type: integer
        additionalInfo1:
          type: string
        additionalInfo2:
          type: string
        additionalInfo3:
          type: string
        createTime:
          type: string
        createUser:
          type: string
        changeTime:
          type: string
        changeUser:
          type: string
        deleteTime:
          type: string
        deleteUser:
          type: string
        buyerRefId:
          type: string
        sellerRefId:
          type: string
        comments:
          type: array
          items:
            $ref: '#/components/schemas/Comment'
    PurchaseInvoicePostPutPatch:
      type: object
      properties:
        supplierId:
          type: string
          maxLength: 10
        supplierName1:
          type: string
          maxLength: 40
          description: Can be autofilled if supplierId is provided
        supplierName2:
          type: string
          maxLength: 40
          description: Can be autofilled if supplierId is provided
        supplierAddress1:
          type: string
          maxLength: 80
          description: Can be autofilled if supplierId is provided
        supplierAddress2:
          type: string
          maxLength: 80
          description: Can be autofilled if supplierId is provided
        supplierPostalCode:
          type: string
          maxLength: 10
          description: Can be autofilled if supplierId is provided
        supplierCity:
          type: string
          maxLength: 80
          description: Can be autofilled if supplierId is provided
        supplierCountryId:
          type: string
          maxLength: 2
          description: Can be autofilled if supplierId is provided.
        iban:
          type: string
          maxLength: 50
        bic:
          type: string
        bankRefNo:
          type: string
          maxLength: 25
          description: Finnish or RF reference number
        bankMessage:
          type: string
          maxLength: 420
        bankMessageType:
          type: string
          enum:
            - '1'
            - '2'
            - '3'
          description: 1 bankRefNo, 2 bankMessage. Can be autofilled if supplierId is provided.
        invoiceDate:
          type: string
          example: 'dd.MM.yyyy'
        bookingDate:
          type: string
          example: 'dd.MM.yyyy'
        dueDate:
          type: string
          example: 'dd.MM.yyyy'
        total:
          type: integer
        cashDiscountDueDate:
          type: string
          example: 'dd.MM.yyyy'
        cashDiscountPercent:
          type: integer
        cashTotal:
          type: integer
        currencyId:
          type: string
          maxLength: 3
          nullable: false
        currencyRate:
          type: number
          description: Can be autofilled if currencyId is provided.
        paymentTermId:
          type: integer
        originalInvoiceNo:
          type: string
          maxLength: 20
        paymentPriority:
          type: string
          enum:
            - '1'
            - '2'
            - '3'
            - '4'
            - '5'
          description: Can be autofilled if supplierId is provided.
        clearingCode:
          type: string
          maxLength: 35
        crossBorderPaymentType:
          type: string
          enum:
            - 'P'
            - 'K'
            - 'M'
            - 'Q'
            - 'B'
            - 'T'
            - 'S'
          description: P urgent payment, K consolidated company payment, M payment order, Q SWIFT-cheque, B EU-payment (Osuuspanki), T Transfer between own accounts, S Cheque
        crossBorderBankFeeSharing:
          type: string
          enum:
            - 'T'
            - 'J'
          description: T payer pays them, J shared
        bookkeepingAccount:
          type: string
          maxLength: 8
        bookkeepingDimension1:
          type: string
          maxLength: 8
        bookkeepingDimension2:
          type: string
          maxLength: 8
        bookkeepingDimension3:
          type: string
          maxLength: 8
        bookkeepingDimension4:
          type: string
          maxLength: 8
        vatType:
          type: string
          maxLength: 1
          enum:
            - 'B'
            - 'N'
        approvedForPaying:
          type: boolean
          maxLength: 8
        ibanFrom:
          type: string
          maxLength: 50
        workSiteKey:
          type: number
        additionalInfo1:
          type: string
          maxLength: 80
        additionalInfo2:
          type: string
          maxLength: 80
        additionalInfo3:
          type: string
          maxLength: 80
        buyerRefId:
          type: string
          maxLength: 70
        sellerRefId:
          type: string
          maxLength: 70
    PurchaseInvoiceRow:
      type: object
      properties:
        cuid:
          type: integer
          description: Fivaldi company id
        invoiceId:
          type: integer
          description: Purchase invoice id
        rowId:
          type: integer
          description: Purchase invoice row id
        total:
          type: integer
        totalVatIncluded:
          type: integer
        bookkeepingCode:
          type: string
        bookkeepingAccount:
          type: string
        bookkeepingDimension1:
          type: string
        bookkeepingDimension2:
          type: string
        bookkeepingDimension3:
          type: string
        bookkeepingDimension4:
          type: string
        description:
          type: string
        vatPercentageCode:
          type: string
        vatStatus:
          type: string
        vatPercent:
          type: number
        vatDeductionPercent:
          type: number
        productCode:
          type: string
        productAmount:
          type: integer
        productUnit:
          type: string
        exportType:
          type: string
        workSiteKey:
          type: integer
        accrualNumber:
          type: integer
        accrualBeginDate:
          type: string
        accrualEndDate:
          type: string
        accrualType:
            type: string
        accrualAccount:
          type: string
        accrualgVatIncluded:
          type: boolean
        createTime:
          type: string
        createUser:
          type: string
        changeTime:
          type: string
        changeUser:
          type: string
    PurchaseInvoiceRowPost:
      properties:
        cuid:
          type: integer
          description: Fivaldi company id
        invoiceId:
          type: integer
          description: Purchase invoice id
        total:
          type: integer
        totalVatIncluded:
          type: integer
        bookkeepingCode:
          type: string
        bookkeepingAccount:
          type: string
        bookkeepingDimension1:
          type: string
        bookkeepingDimension2:
          type: string
        bookkeepingDimension3:
          type: string
        bookkeepingDimension4:
          type: string
        description:
          type: string
        vatPercentageCode:
          type: string
        vatStatus:
          type: string
        vatPercent:
          type: number
        vatDeductionPercent:
          type: number
        productCode:
          type: string
        productAmount:
          type: integer
        productUnit:
          type: string
        exportType:
          type: string
        workSiteKey:
          type: integer
    PurchaseInvoiceRowPut:
      properties:
        cuid:
          type: integer
          description: Fivaldi company id
        invoiceId:
          type: integer
          description: Purchase invoice id
        rowId:
          type: integer
          description: Purchase invoice row id
        total:
          type: integer
        totalVatIncluded:
          type: integer
        bookkeepingCode:
          type: string
        bookkeepingAccount:
          type: string
        bookkeepingDimension1:
          type: string
        bookkeepingDimension2:
          type: string
        bookkeepingDimension3:
          type: string
        bookkeepingDimension4:
          type: string
        description:
          type: string
        vatPercentageCode:
          type: string
        vatStatus:
          type: string
        vatPercent:
          type: number
        vatDeductionPercent:
          type: number
        productCode:
          type: string
        productAmount:
          type: integer
        productUnit:
          type: string
        exportType:
          type: string
        workSiteKey:
          type: integer
    AccrualDataPost:
      properties:
        cuid:
          type: integer
          description: Fivaldi company id
        invoiceId:
          type: integer
          description: Purchase invoice id
        rowId:
          type: integer
          description: Purchase invoice row id
        beginDate:
          type: string
        endDate:
          type: string
        type:
          type: string
        account:
          type: string
        vatIncluded:
          type: boolean
    AccrualDataPut:
      properties:
        cuid:
          type: integer
          description: Fivaldi company id
        invoiceId:
          type: integer
          description: Purchase invoice id
        rowId:
          type: integer
          description: Purchase invoice row id
        accrualNumber:
          type: integer
          description: Accrual data number
        beginDate:
          type: string
        endDate:
          type: string
        type:
          type: string
        account:
          type: string
        vatIncluded:
          type: boolean
    ChartOfAccounts:
      type: object
      properties:
        cuid:
          type: integer
          description: Fivaldi company id
        lang:
          type: string
          description: Language code of the account descriptions
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/BookkeepingDimension'
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/BookkeepingAccount'
    ExternalAccountInformationDTO:
      type: object
      properties:
        account:
          type: string
          maxLength: 8
          nullable: false
        finDescription:
          type: string
          maxLength: 80
          nullable: false
        sweDescription:
          type: string
          maxLength: 80
          nullable: true
        engDescription:
          type: string
          maxLength: 80
          nullable: true
        inUseBookkeeping:
          type: boolean
        inUseEstate:
          type: boolean
        inUsePurchases:
          type: boolean
        inUseSalaries:
          type: boolean
        inUseSales:
          type: boolean
    BookkeepingAccount:
      type: object
      properties:
        dimension:
          type: string
        account:
          type: string
        description:
          type: string
        inUseBookkeeping:
          type: boolean
        inUseEstate:
          type: boolean
        inUsePurchases:
          type: boolean
        inUseSalaries:
          type: boolean
        inUseSales:
          type: boolean
    BookkeepingDimension:
      type: object
      properties:
        dimension:
          type: string
        description:
          type: string
        inUseBookkeeping:
            type: boolean
        inUseEstate:
          type: boolean
        inUsePurchases:
          type: boolean
        inUseSalaries:
          type: boolean
        inUseSales:
          type: boolean
    VoucherType:
      type: object
      properties:
        id:
          type: integer
          description: Account type id.
        usage:
          type: string
          description: Account type usage.
        description:
          type: string
    FiscalYear:
      type: object
      properties:
        id:
          type: integer
          description: Fiscal year id
        startDate:
          type: string
          description: Begin date of fiscal year in "yyyy-mm-dd" format.
        endDate:
          type: string
          description: End date of fiscal year in "yyyy-mm-dd" format.
        fiscalYearStatus:
          type: string
          enum:
          - OPEN
          - CLOSED 
          - PERMANENTLY_CLOSED
    BookkeepingMonth:
      type: object
      properties:
        bookkeepingMonth:
          type: integer
          description: Bookkeeping month id.
        status:
          type: string
          enum:
            - OPEN
            - CLOSED
        fiscalYear:
          type: integer
          description: Corresponding fiscal year.
    ArchiveAppDocumentPutResponse:
      type: object
      properties:
        branchId:
          type: number
        hasErrors:
          type: boolean
        errorMessage:
          type: string
          
    VoucherAttachmentResponse:
      type: object
      properties:
        searchId:
          type: number
        searchCount:
          type: number
        hasErrors:
          type: boolean
        errorMessage:
          type: string
        archiveObjects:
          type: array
          description: List of attachment files
          items:
            $ref: '#/components/schemas/ArchiveObjectResponse' 
    ArchiveObjectResponse:
      type: object
      properties:
        objectId:
          type: string
        objectDescription:
          type: string
        sizeBytes:
          type: number
        mimeType:
          type: string
    
    VatCodeResponse:
      type: object
      properties:
        vatId:
          type: number
          description: Vat id in Fivaldi.
        vatAccount:
          type: number
        vatAccount2:
          type: number
        vatPercentages:
          type: array
          description: List of vat percentages order descending by start date.
          items:
            $ref: '#/components/schemas/VatPercentageResponse' 
    VatPercentageResponse:
      type: object
      properties:
        vatPercentageCode:
          type: string
          description: Vat code in Fivaldi.
        percentage:
          type: number
        deductionPercentage:
          type: number
        description:
          type: string
        startDate:
          type: string
          format: date
          description: Vat percentage start date. 
    FetchVoucherResponse:
      type: object
      properties:
        voucherType:
          type: number
          description: Id of voucher type.
        voucherTypeName:
          type: string
          description: Voucher Type name.
        voucherNumber:
          type: string
          description: Fivaldi voucher number.
        voucherDate:
          type: string
          format: date
          description: Date when voucher was issued.
        dueDate:
          type: string
          format: date
          description: Voucher due date.
        accountingPeriod:
          type: number
          description: Voucher period id yyyyMM format.
        fiscalYearId:
          type: string
          description: fiscal year id
        customerId:
          type: string
          description: Customer id
        customerName:
          type: string
          description: Customer name
        isDeleted:
          type: boolean
          description: flag for deleted status
        voucherEntries:
          type: array
          items:
            $ref: '#/components/schemas/VoucherEntryResponse'
    VoucherEntryResponse:
      type: object
      properties:
        entryNumber:
          type: number
          description: Voucher entry number inside voucher.
        description:
          type: string
          description: Description of the voucher entry.
        amount:
          type: number
          description: Ammount of the voucher entry. 
        balanceCode:
          type: number
          description: Balance code of the voucher entry.
        accountNumber:
          type: number
          description: Account number of the voucher entry.
        accountName:
          type: string
          description: Account name of the voucher entry.
        dimension:
          $ref: '#/components/schemas/VoucherEntryDimension'
        vat:
          $ref: '#/components/schemas/EntryVat'
    EntryVat:
      type: object
      properties:
        vatCode:
          type: string
          description: Fivaldi vat code of the voucher entry.
        vatAmount:
          type: number
          description: Vat amount of the voucher entry.
        vatAccount:
          type: string
          description: Vat account number of the voucher entry.
        vatAccountName:
          type: string
          description: Vat account name of the voucher entry.
        vatAccount2:
          type: string
          description: Second vat account number of the voucher entry.
        vatAccount2Name:
          type: string
          description: Second vat account name of the voucher entry.
    VoucherEntryDimension:
      type: object
      properties:
        dimension1:
          type: string
          description: First dimension of the voucher entry
        dimension1Name:
          type: string
          description: Name of the first dimension in the voucher entry
        dimension2:
          type: string
          description: Second dimension of the voucher entry
        dimension2Name:
          type: string
          description: Name of the second dimension in the voucher entry
        dimension3:
          type: string
          description: Voucher entry's third dimension
        dimension3Name:
          type: string
          description: Name of the third dimension in the voucher entry
        dimension4:
          type: string
          description: Voucher entry's fourth dimension
        dimension4Name:
          type: string
          description: Name of the fourth dimension in the voucher entry
    VoucherImportRequest:
      type: object
      properties:
        voucherTypeId:  
          type: number
          description: Id of voucher type. It can be fetched using GET voucher type endpoint.
          nullable: false
        originalVoucherNumber:
          type: string
          description: Voucher number generated by client.
          nullable: false
        voucherDate:
          type: string
          format: date (yyyy-MM-dd)
          description: Date of voucher.
          nullable: false
        bookkeepingMonth:
          type: integer
          description: Bookkeeping month in yyyyMM format.
          nullable: false
          minimum: 200001
          maximum: 209912
        vatType: 
          type: string
          enum: [CALCULATED, AUTO]
          description: Voucher vat type. CALCULATED- Fivaldi will not make any calculation. AUTO- Fivaldi will calculate vat based on default settings.
          nullable: false
        validateEntrySum:
          type: boolean
          description: A flag that instructs Fivaldi if it should validate sum of voucher entries belonging to a voucher to be 0.
          nullable: true
        voucherEntries:
          type: array
          items:
            $ref: '#/components/schemas/VoucherEntryRequest'
    VoucherEntryRequest:
      type: object
      properties:
        amount:
          type: number
          description: Amount of voucher entry.
          nullable: false
        accountNumber:
          type: string
          description: Account number of the voucher entry.
          nullable: false
        balanceCode:
          type: string
          description: Balance code of the voucher entry.
          nullable: true
          maxLength: 2
        dimensionValue1:
          type: string
          description: First dimension's value of the voucher entry
          nullable: true
        dimensionValue2:
          type: string
          description: Second dimension's value of the voucher entry
          nullable: true
        dimensionValue3:
          type: string
          description: Third dimension's value of the voucher entry
          nullable: true
        dimensionValue4:
          type: string
          description: Fourth dimension's value of the voucher entry
          nullable: true
        description:
          type: string
          description: Description of the voucher entry.
          nullable: true
        vat:
          $ref: '#/components/schemas/VoucherEntryVatRequest'
    VoucherEntryVatRequest:
      type: object
      properties:
        vatCode:
          type: string
          description: Vat code in Fivaldi.
          nullable: true
        vatAmount:
          type: number
          description: Voucher entry vat amount.
          nullable: true
        account:
          type: string
          description: Vat account number of the voucher entry.
          nullable: true
        account2:
          type: string
          description: Second vat account number of the voucher entry.
          nullable: true
    VoucherImportResponse:
      type: object
      properties:
        fivaldiVoucherNumber:
          type: integer
          description: A voucher number that will be generated by Fivaldi.
    AccountBalance:
      type: object
      properties:
        account:
          type: string
          description: Account number
        balance:
          type: number
          description: Account balance
        debitSum:
          type: number
          description: Account credit sum
        creditSum:
          type: number
          description: Account debit sum
    PurchaseInvoiceComments:
      type: array
      items:
        $ref: '#/components/schemas/Comment'
    Comment:
      type: object
      properties: 
        companyId:
          type: integer
          description: Company identifier
        commentId:
          type: integer
          description: Comment identifier (will be generated in the API)
        invoiceId:
          type: integer
          description: Invoice identifier
        nodeId:
          type: integer
          description: Node identifier
        text:
          type: string
          description: Comment's text
        createTime:
          type: string
          pattern: date
          description: Create time of the comment (will be generated in the API)
        createUser:
          type: string
          description: User that created the comment (checked by the API)
        isImportant:
          type: boolean
          description: Marks important comments
        deleteOn:
          type: string
          pattern: date
          description: Date when the comment is deleted
    GeneralResponseEnvelope:
      type: object
      properties:
        status:
          type: string
          description: Status of the http request
        httpResponseCode:
          type: string
          description: HTTP status code
        fetchedAt:
          type: string
          description: Fetch time in milliseconds
        errors:
          type: array
          items: 
            $ref: '#/components/schemas/ResponseError'
          description: List of errors
    ResponseError:
      type: object
      properties:
        code:
          type: string
          description: Unique error code
        fieldName:
          type: string
          description: Name of the field (if applicable) where error occured
        errorMsg:
          type: string
          description: error message
    ExternalAddressResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when address is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when address is inserted or updated (Muutoskäyttäjä)
        country:
          type: string
          description: Name of country that correspond to countryCode (Maa)
        countryCode:
          type: string
          description: Country code for address with ISO 3166-1 standard (VAT-maakoodi)
        id:
          type: integer
          description: Address id
        name:
          type: string
          description: Address pecific person name to address (Yhteyshenkilön nimi)
        personId:
          type: integer
          description: Person id links the address to person 
        phoneNumber:
          type: string
          description: Address pecific phone number to address (Yhteyshenkilön numero)
        postalAddress:
          type: string
          description: Postal address (Postitoimipaikka)
        postalCode:
          type: string
          description: Postal code (Postinumero)
        streetAddress:
          type: string
          description: Street address (Lähiosoite)
        type:
          type: string
          enum:
            - MAILING_ADDRESS
            - STREET_ADDRESS
            - TEMPORARY_ADDRESS
            - PREVIOUS_ADDRESS
          description: Type of the address (Osoitetyyppi)
        typeDescription:
          type: string
          description: Address type description
        validEnd:
          type: string
          description: Address is valid until. (Voimassa)
        validStart:
          type: string
          description: Address validity starts. (Voimassa)
    ExternalSendingGroupsResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when address is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when address is inserted or updated (Muutoskäyttäjä)
        personId:
          type: integer
          description: Person id links the address to person 
        sendingGroupId:
          type: integer
          description: Person id links the address to person 
        defaultSendingMethod:
          type: string
          enum:
            - PRINTING
            - EMAIL
            - PRINTING_SERVICE
          description: Default sending method
        sendingMethod:
          type: string
          enum:
            - PRINTING
            - EMAIL
            - PRINTING_SERVICE
            - DEFAULT_SENDING_METHOD
          description: Sending method
        sendingGroupName:
          type: string
          description: Name of the sending group
    ExternalEInvoiceAddressResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when e-invoice address is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when e-invoice address is inserted or updated (Muutoskäyttäjä)
        directDebit:
          type: boolean
          description: Direct debit (Suoramaksu)
        invoiceTransmissionType:
          type: string
          description: Invoice method id in Fivaldi (Välitystapa)
        invoiceRecipientAddress:
          type: string
          description: Invoice recipient address (Verkkolaskuosoite)
        invoiceRecipientIntermediatorAddress:
          type: string
          description: Invoice recipient intermediator address (Välittäjätunnus)
        personId:
          type: integer
          description: Person id links the invoice address to person
    ExternalEstatePersonResponseDTO:
      type: object
      properties:
        additionalInformation:
          type: string
          description: Additional information for person
        businessId:
          type: string
          description: Business id (Y-tunnus)
        changeTime:
          type: string
          description: Fivaldi will set this when person is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when person is inserted or updated (Muutoskäyttäjä)
        dateOfBirth:
          type: string
          description: Date of birth. values can be null or date of birth. Format dd.mm.yyyy (Syntymäaika)
        email:
          type: string
          description: E-mail (Sähköposti)
        firstName:
          type: string
          description: First name (Etunimi)
        lastName:
          type: string
          description: Last name (Sukunimi)
        mobilePhoneNumber:
          type: string
          description: Mobile phone number (Matkapuhelin)
        nationality:
          type: string
          description: ationality for person with ISO 3166-1 standard (Kansalaisuus)
        otherNames:
          type: string
          description: Person other names (Muut nimet)
        personId:
          type: integer
          description: Id that identifies person in Fivaldi
        previousName:
          type: string
          description: Person previous name (Entinen nimi)
        securityRestriction:
          type: boolean
          description: True if person is non-disclosure for personal safety reasons (Turvakiellossa)
        socialSecurityNumber:
          type: string
          description: Social security number. values=null or full social security number. (Henkilötunnus)
        vatCountryCode:
          type: string
          description: VAT country code (VAT-maakoodi)
        workPhoneNumber:
          type: string
          description: Work phone number (Työpuhelin)
    ExternalEstatePersonDetailsResponseDTO:
      type: object
      properties:
        additionalInformation:
          type: string
          description: Additional information for person
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/ExternalAddressResponseDTO'
        businessId:
          type: string
          description: Business id (Y-tunnus)
        changeTime:
          type: string
          description: Fivaldi will set this when Person is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when person is inserted or updated (Muutoskäyttäjä)
        dateOfBirth:
          type: string
          description: Date of birth. values can be null or date of birth. Format dd.mm.yyyy (Syntymäaika)
        einvoiceInformation:
          type: array
          items:
            $ref: '#/components/schemas/ExternalEInvoiceAddressResponseDTO'
        email:
          type: string
          description: Business id (Y-tunnus)
        firstName:
          type: string
          description: First name (Etunimi)
        homePhoneNumber:
          type: string
          description: Home phone number (Kotipuhelin)
        lastName:
          type: string
          description: Last name (Sukunimi)
        mobilePhoneNumber:
          type: string
          description: Mobile phone number (Matkapuhelin)
        nationality:
          type: string
          description: ationality for person with ISO 3166-1 standard (Kansalaisuus)
        otherNames:
          type: string
          description: Person other names (Muut nimet)
        personId:
          type: integer
        personRoles:
          type: array
          items:
            $ref: '#/components/schemas/ExternalPersonRoleResponseDTO'
        previousName:
          type: string
          description: Person previous name (Entinen nimi)
        securityRestriction:
          type: boolean
          description: True if person is non-disclosure for personal safety reasons (Turvakiellossa)
        socialSecurityNumber:
          type: string
          description: Social security number. values=null or full social security number. (Sosiaaliturvatunnus)
        vatCountryCode:
          type: string
          description: VAT country code (VAT-maakoodi)
        workPhoneNumber:
          type: string
          description: Work phone number (Työpuhelin)
        sendingGroups:
          type: array
          items:
            $ref: '#/components/schemas/ExternalSendingGroupsResponseDTO'
    ExternalPersonRoleResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when person role is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when person role is inserted or updated (Muutoskäyttäjä)
        endDate:
          type: string
          description: Person role end date (Voimassa)
        roleId:
          type: integer
          description: Fivaldi role id. List of role id's can be fetched from /companies/{cuid}/estate-person/getCompanyPersonRolesInUse API.
        personGroupName:
          type: string
          description: Person role name (Henkilörooli)
        personId:
          type: integer
          description: Person id links the role to person
        startDate:
          type: string
          description: Start date of person role (Voimassa)
    ExternalAddressRequestDTO:
      type: object
      properties:
        country:
          type: string
          minLength: 0
          maxLength: 60
          nullable: true
          description: Name of country that correspond to countryCode (Maa)
        countryCode:
          type: string
          minLength: 0
          maxLength: 3
          nullable: true
          description: Country code for address with ISO 3166-1 standard (VAT-maakoodi)
        name:
          type: string
          minLength: 0
          maxLength: 60
          nullable: true
          description: Address pecific person name to address (Yhteyshenkilön nimi)
        phoneNumber:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Address pecific phone number to address (Yhteyshenkilön numero)
        postalAddress:
          type: string
          minLength: 0
          maxLength: 60
          nullable: true
          description: Postal address (Postitoimipaikka)
        postalCode:
          type: string
          minLength: 0
          maxLength: 10
          nullable: true
          description: Postal code (Postinumero)
        streetAddress:
          type: string
          minLength: 0
          maxLength: 60
          nullable: false
          description: Street address (Lähiosoite)
        type:
          type: string
          enum:
            - MAILING_ADDRESS
            - STREET_ADDRESS
            - TEMPORARY_ADDRESS
            - PREVIOUS_ADDRESS
          nullable: false
          description: Address type (Osoitetyyppi)
        typeDescription:
          type: string
          minLength: 0
          maxLength: 30
          nullable: true
          description: Address type description
        validEnd:
          type: string
          description: Address is valid until. Format dd.mm.yyyy (Voimassa)
          nullable: true
        validStart:
          type: string
          description: Address is validity starts. Format dd.mm.yyyy (Voimassa)
          nullable: true
    ExternalEInvoiceAddressRequestDTO:
      type: object
      properties:
        directDebit:
          type: boolean
          description: Direct debit (Suoramaksu)
          nullable: true
        invoiceTransmissionType:
          type: string
          minLength: 1
          maxLength: 10
          nullable: false
          description: Invoice method id in Fivaldi (Välitystapa)
        invoiceRecipientAddress:
          type: string
          minLength: 1
          maxLength: 35
          nullable: false
          description: Invoice recipient address (Verkkolaskuosoite)
        invoiceRecipientIntermediatorAddress:
          type: string
          minLength: 1
          maxLength: 30
          nullable: false
          description: Invoice recipient intermediator address (Välittäjätunnus)
    ExternalEInvoiceAddressUpdateRequestDTO:
      type: object
      properties:
        directDebit:
          type: boolean
          description: Direct debit (Suoramaksu)
          nullable: true
        invoiceRecipientAddress:
          type: string
          minLength: 1
          maxLength: 35
          nullable: false
          description: Invoice recipient address (Verkkolaskuosoite)
        invoiceRecipientIntermediatorAddress:
          type: string
          minLength: 1
          maxLength: 30
          nullable: false
          description: Invoice recipient intermediator address (Välittäjätunnus)
    ExternalEstatePersonRequestDTO:
      type: object
      properties:
        additionalInformation:
          type: string
          minLength: 0
          maxLength: 4000
          nullable: true
          description: Additional information for person (Lisätiedot)
        businessId:
          type: string
          minLength: 0
          maxLength: 12
          nullable: true
          description: Business id (Y-tunnus)
        dateOfBirth:
          type: string
          description: Date of birth. Values can be null or date of birth in format dd.mm.yyyy (Syntymäaika)
          nullable: true
        email:
          type: string
          minLength: 0
          maxLength: 128
          nullable: true
          description: E-mail (Sähköposti)
        firstName:
          type: string
          minLength: 0
          maxLength: 60
          nullable: true
          description: First name (Etunimi)
        homePhoneNumber:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Home phone number (Kotipuhelin))
        lastName:
          type: string
          minLength: 0
          maxLength: 60
          nullable: false
          description: Last name (Sukunimi)
        mobilePhoneNumber:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Mobile phone number (Matkapuhelin)
        nationality:
          type: string
          minLength: 0
          maxLength: 3
          nullable: false
          description: Nationality for person with ISO 3166-1 standard  (Kansalaisuus)
        otherNames:
          type: string
          minLength: 0
          maxLength: 60
          nullable: true
          description: Person other names (Muut nimet)
        previousName:
          type: string
          minLength: 0
          maxLength: 60
          nullable: true
          description: Person previous name (Entinen nimi)
        socialSecurityNumber:
          type: string
          minLength: 0
          maxLength: 4
          nullable: false
          description: Social security number. values=null or full social security number. (Henkilötunnus)
        vatCountryCode:
          type: string
          minLength: 0
          maxLength: 2
          nullable: true
          description: VAT country code (VAT-maakoodi)
        workPhoneNumber:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Work phone number (Työpuhelin)
    ExternalEstatePersonDetailsRequestDTO:
      type: object
      properties:
        additionalInformation:
          type: string
          minLength: 0
          maxLength: 4000
          nullable: true
          description: Additional information for person (Lisätiedot)
        addresses:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ExternalAddressRequestDTO'
        businessId:
          type: string
          minLength: 0
          maxLength: 12
          nullable: true
          description: Business id (Y-tunnus)
        dateOfBirth:
          type: string
          description: Date of birth. Values can be null or date of birth in format dd.mm.yyyy (Syntymäaika)
          nullable: true
        einvoiceInformation:
          type: array
          items:
            $ref: '#/components/schemas/ExternalEInvoiceAddressRequestDTO'
        email:
          type: string
          minLength: 0
          maxLength: 128
          nullable: true
          description: E-mail (Sähköposti)
        firstName:
          type: string
          minLength: 0
          maxLength: 60
          nullable: true
          description: First name (Etunimi)
        homePhoneNumber:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Home phone number (Kotipuhelin)
        lastName:
          type: string
          minLength: 0
          maxLength: 60
          description: Last name (Sukunimi)
          nullable: false
        mobilePhoneNumber:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Mobile phone number (Matkapuhelin)
        nationality:
          type: string
          minLength: 0
          maxLength: 3
          nullable: false
          description: Nationality for person with ISO 3166-1 standard (Kansalaisuus)
        otherNames:
          type: string
          minLength: 0
          maxLength: 60
          nullable: true
          description: Person other names (Muut nimet)
        personRoles:
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/ExternalPersonRoleRequestDTO'
        previousName:
          type: string
          minLength: 0
          maxLength: 60
          nullable: true
          description: Person previous name (Entinen nimi)
        socialSecurityNumber:
          type: string
          minLength: 0
          maxLength: 4
          nullable: false
          description: Social security number. values=null or full social security number. (Henkilötunnus)
        vatCountryCode:
          type: string
          minLength: 0
          maxLength: 2
          nullable: true
          description: VAT country code (VAT-maakoodi)
        workPhoneNumber:
          type: string
          minLength: 0
          maxLength: 25
          nullable: true
          description: Work phone number (Työpuhelin)
    ExternalPersonRoleRequestDTO:
      type: object
      properties:
        endDate:
          type: string
          description: Person role end date. Format dd.mm.yyyy (Voimassa)
          nullable: true
        roleId:
          type: integer
          nullable: false
          description: Fivaldi role id.
        startDate:
          type: string
          description: Start date of person role. Format dd.mm.yyyy (Voimassa)
          nullable: true
    ExternalPersonRoleUpdateRequestDTO:
      type: object
      properties:
        endDate:
          type: string
          description: Person role end date. Format dd.mm.yyyy (Voimassa)
          nullable: true
        startDate:
          type: string
          description: Person role start date. Format dd.mm.yyyy (Voimassa)
          nullable: true
    ExternalCompanyPersonRoleResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when company person role is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when company person role is inserted or updated (Muutoskäyttäjä)
        companyPersonGroupId:
          type: integer
          description: Fivaldi role id
        name:
          type: string
          description: Person role name (Henkilörooli)
    TransmissionTypeDTO:
      type: object
      properties:
        transmissionId:
          type: string
          maxLength: 10
          minLength: 0
          nullable: true
          description: Fivaldi invoice method id (Välitystapa id)
        description:
          type: string
          maxLength: 40
          minLength: 0
          nullable: true
          description: Fivaldi invoice method id description (Välitystapa)
        type:
          type: string
          maxLength: 2
          minLength: 2
          nullable: true
          description: Fivaldi invoice method id type (Tyyppi id)
    ExternalApartmentResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          format: date-time
          nullable: true
          description: Fivaldi will set this when apartment is inserted or updated (Muutosaika)
        changeUser:
          type: string
          maxLength: 30
          nullable: true
          description: Fivaldi will set this when apartment is inserted or updated (Muutoskäyttäjä)
        apartmentId:
          type: integer
          minimum: 1
          maximum: 999999999
          nullable: true
          description: Apartment id
        buildingId:
          type: integer
          maximum: 999
          nullable: true
          description: Building id
        apartmentIdentifier:
          type: string
          maxLength: 20
          nullable: true
          description: Apartment identifier (Tunnus)
        floor:
          type: string
          maxLength: 6
          nullable: true
          description: Apartment floor (Kerros)
        stair:
          type: string
          maxLength: 2
          nullable: true
          description: Building stair (Porras)
        apartmentType:
          type: string
          maxLength: 2
          nullable: true
          description: Apartment type. Apartment type created in Fivaldi (Huoneistotyyppi)
        apartmentSort:
          type: string
          maxLength: 2
          nullable: true
          description: Apartment sort (Yhtiöjärjestyksen mukainen käyttötarkoitus. AS = Asuinhuoneisto, AH = Autohallipaikka, A = Autotalli, L = Liikehuoneisto, M = Muu, T = Tehda- tai työhuoneisto, K = Toimistohuoneisto, V = Varasto)
          enum:
            - AS
            - AH
            - A
            - L
            - M
            - T
            - K
            - V
        otherPremises:
          type: string
          maxLength: 30
          nullable: true
          description: Other premises (Muut tilat)
        otherRestrictions:
          type: string
          maxLength: 30
          nullable: true
          description: Other restrictions (Muu rajoitus)
        otherPosessionRestriction:
          type: string
          maxLength: 30
          nullable: true
          description: Other posession restriction (Muu hallintarajoitus)
        widowRightOfPosession:
          type: boolean
          nullable: true
          description: Right of possession (Lesken hallintaoikeus)
        specialFinancingForm:
          type: string
          maxLength: 80
          nullable: true
          description: Special finance form (Erityinen rahoitusmuoto)
        significantFailure:
          type: string
          maxLength: 80
          nullable: true
          description: Significant failure (Huomattava vika)
        confiscation:
          type: string
          maxLength: 30
          nullable: true
          description: Confiscation description (Haltuunotto selite)
        confiscationStart:
          type: string
          format: date-time
          nullable: true
          description: Confiscation start. Format dd.MM.yyyy HH:mm:ss (Haltuunottoaika alku)
        confiscationEnd:
          type: string
          format: date-time
          nullable: true
          description: Confiscation end. Format dd.MM.yyyy HH:mm:ss (Haltuunottoaika loppu)
        confiscationCompanyRent:
          type: boolean
          nullable: true
          description: Confiscation company rent (Yhtiön toimesta vuokrattu)
        rightToExpropriate:
          type: string
          maxLength: 30
          nullable: true
          description: Expropriate right (Lunastusoikeus)
        orderNumber:
          type: integer
          maximum: 999999999
          nullable: true
          description: Order number (Järjestysnumero)
        validStart:
          type: string
          format: date-time
          nullable: true
          description: Valid start (Huoneisto voimassa alku)
        validEnd:
          type: string
          format: date-time
          nullable: true
          description: Valid end (Huoneisto voimassa loppu)
        isInHouseManagersCertificate:
          type: boolean
          nullable: true
          description: Is apartment shown in house managers certificate (Ilmoita isännöitsijäntodistuksella)
        ownedByCompany:
          type: boolean
          nullable: true
          description: Company owned (Yhtiön omistama)
        shareholdersApartmentType:
          type: string
          maxLength: 2
          nullable: true
          description: Share holders apartment type (Osakkeenomistajan ilmoittama huoneistotyyppi)
        appliedForVatTaxable:
          type: boolean
          description: Applied as VAT taxable (Hakeutunut ALV-verolliseksi)
        shareGroupType:
          type: string
          description: Share group type (Osakeryhmätunnus)
        buildingPermitApartmentSort:
          type: string
          maxLength: 2
          nullable: true
          description: Apartment usage as reported in building permit (Rakennusluvan mukainen käyttötarkoitus. AS = Asuinhuoneisto, AH = Autohallipaikka, A = Autotalli, L = Liikehuoneisto, M = Muu, T = Tehda- tai työhuoneisto, K = Toimistohuoneisto, V = Varasto)
          enum:
            - AS
            - AH
            - A
            - L
            - M
            - T
            - K
            - V
        purposedUse:
          type: string
          description: Purposed use (Käyttötarkoitus)
        managementTargetType:
          type: string
          description: Management target type (Hallintakohdetyyppi)
        otherPurposedUseDescription:
          type: string
          description: Other purposed use description (Muu käyttötarkoitus selite)
        electronicRegistrationOfOwnership:
          type: boolean
          description: Electronic registration of ownership for an apartment in the Residential and Commercial Property Information System (Sähköinen omistajamerkintä)
    ExternalApartmentDetailsResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when apartment is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when apartment is inserted or updated (Muutoskäyttäjä)
        apartmentId:
          type: integer
          description: Apartment id
        buildingId:
          type: integer
          description: Building id
        apartmentIdentifier:
          type: string
          description: Apartment identifier (Tunnus)
        floor:
          type: string
          description: Apartment floor (Kerros)
        stair:
          type: string
          description: Building stair (Porras)
        apartmentType:
          type: string
          description: Apartment type. Apartment type created in Fivaldi (Huoneistotyyppi)
        apartmentSort:
          type: string
          description: Apartment sort (Yhtiöjärjestyksen mukainen käyttötarkoitus. AS = Asuinhuoneisto, AH = Autohallipaikka, A = Autotalli, L = Liikehuoneisto, M = Muu, T = Tehda- tai työhuoneisto, K = Toimistohuoneisto, V = Varasto)
          enum:
            - AS
            - AH
            - A
            - L
            - M
            - T
            - K
            - V
        otherPremises:
          type: string
          description: Other premises (Muut tilat)
        otherRestrictions:
          type: string
          description: Other restrictions (Muu rajoitus)
        otherPosessionRestriction:
          type: string
          description: Other posession restriction (Muu hallintarajoitus)
        widowRightOfPosession:
          type: boolean
          description: Right of possession (Lesken hallintaoikeus)
        specialFinancingForm:
          type: string
          description: Special finance form (Erityinen rahoitusmuoto)
        significantFailure:
          type: string
          description: Significant failure (Huomattava vika)
        confiscation:
          type: string
          description: Confiscation description (Haltuunotto selite)
        confiscationStart:
          type: string
          description: Confiscation start. Format dd.mm.yyyy (Haltuunottoaika alku)
        confiscationEnd:
          type: string
          description: Confiscation end. Format dd.mm.yyyy (Haltuunottoaika loppu)
        confiscationCompanyRent:
          type: boolean
          description: Confiscation company rent (Yhtiön toimesta vuokrattu)
        rightToExpropriate:
          type: string
          description: Expropriate right (Lunastusoikeus)
        orderNumber:
          type: integer
          description: Order number (Järjestysnumero)
        validStart:
          type: string
          description: Valid start (Huoneisto voimassa alku)
        validEnd:
          type: string
          description: Valid end (Huoneisto voimassa loppu)
        isInHouseManagersCertificate:
          type: boolean
          description: Is apartment shown in house managers certificate (Ilmoita isännöitsijäntodistuksella)
        ownedByCompany:
          type: boolean
          description: Company owned (Yhtiön omistama)
        shareholdersApartmentType:
          type: string
          description: Share holders apartment type (Osakkeenomistajan ilmoittama huoneistotyyppi)
        appliedForVatTaxable:
          type: boolean
          description: Applied as VAT taxable (Hakeutunut ALV-verolliseksi)
        purposedUse:
          type: string
          description: Purposed use (Käyttötarkoitus)
        managementTargetType:
          type: string
          description: Management target type (Hallintakohdetyyppi)
        otherPurposedUseDescription:
          type: string
          description: Other purposed use description (Muu käyttötarkoitus selite)
        shareGroupType:
          type: string
          description: Share group type (Osakeryhmätunnus)
        electronicRegistrationOfOwnership:
          type: boolean
          description: Electronic registration of ownership for an apartment in the Residential and Commercial Property Information System (Sähköinen omistajamerkintä)
        buildingPermitApartmentSort:
          type: string
          description: Apartment usage as reported in building permit (Rakennusluvan mukainen käyttötarkoitus. AS = Asuinhuoneisto, AH = Autohallipaikka, A = Autotalli, L = Liikehuoneisto, M = Muu, T = Tehda- tai työhuoneisto, K = Toimistohuoneisto, V = Varasto)
          enum:
            - AS
            - AH
            - A
            - L
            - M 
            - T
            - K
            - V
        shareseries:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalApartmentShareSeriesDTO'
        apartmentAmounts:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalApartmentAmountsDTO'
        additionalInfo:
          $ref: '#/components/schemas/ExternalAdditionalInfoDTO'
        apartmentNotInUsePeriods:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalApartmentNotInUsePeriodsDTO'
        apartmentChangingAmounts:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalApartmentChangingAmountsDTO'
        building:
          $ref: '#/components/schemas/ExternalBuildingResponseDTO'
    ExternalAdditionalInfoDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when person additional information is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when person additional information is inserted or updated (Muutoskäyttäjä)
        typeNumber:
          type: integer
          description: If these are company level additional informations then typeNumber is 0. If these are additional informations for apartment then typeNumber will be apartment id.
        bothHouseCertificates:
          type: string
          description: Text that will show in both house certificate and rent house certificate. (Molemmille isännöitsijäntodistuksille)
        houseCertificate:
          type: string
          description: Text that will show in house managers certificate. (Isännöitsijäntodistukselle)
        rentHouseCertificate:
          type: string
          description: Text that will show in rent house managers certificate. (Isännöitsijäntodistukselle vuokrausta varten)
        other:
          type: string
          description: Other additional information. Won't show in house managers certificate. (Muut lisätiedot)
        registerOfOccupants:
          type: string
          description: Text that will show in register of occupants. (Talonkirjaotteelle)
    ExternalApartmentAmountsDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when apartment amount is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when apartment amount is inserted or updated (Muutoskäyttäjä)
        apartmentId:
          type: integer
          description: Apartment id in Fivaldi
        apartmentAmountId:
          type: string
          description: Apartment amount id in Fivaldi (P = Pinta-ala, J = Jyvitetty pinta-ala, T = Tarkistettu pinta-ala, M = Muu, K = Kerrostasoala)
          enum:
            - P
            - J
            - T
            - M
            - K
        name:
          type: string
          description: Name (Määrän perusteen nimi)
        amount:
          type: number
          description: Amount (Määrän perusteen määrä)
        unit:
          type: string
          description: Unit (Yksikkö)
        unitDescription:
          type: string
          description: Unit description (Yksikön selite)
        order:
          type: integer
          description: Order in which amounts are returned (Määrän perusteiden tulostusjärjestys)
    ExternalApartmentChangingAmountsDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when apartment changing amount is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when apartment changing amount is inserted or updated (Muutoskäyttäjä)
        apartmentId:
          type: integer
          description: Apartment id
        apartmentChangingAmountId:
          type: integer
          description: Apartment changing amount id
        startDate:
          type: string
          description: Start date. Format dd.mm.yyyy (Alkamisaika)
        amount:
          type: integer
          description: Amount (Määrä)
    ExternalApartmentNotInUsePeriodsDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when apartment not in use period is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when apartment not in use period is inserted or updated (Muutoskäyttäjä)
        apartmentId:
          type: integer
          description: Apartment id
        apartmentNotInUseId:
          type: integer
          description: Apartment not in use id
        startDate:
          type: string
          description: Start date (Pois käytöstä alku)
        endDate:
          type: string
          description: End date (Pois käytöstä loppu)
        description:
          type: string
          description: Description (Selite) 
    ExternalApartmentShareSeriesDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when apartment share series is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when apartment share series is inserted or updated (Muutoskäyttäjä)
        apartmentId:
          type: integer
          description: Apartment id
        apartmentShareSeriesId:
          type: integer
          description: Apartment share series id
        shareSeriesId:
          type: string
          description: Share series id (Osakesarja)
        differentDateOfIssue:
          type: string
          description: different date of issue (Poikkeava antopäivä)
        begin:
          type: integer
          description: begin (Asakkeet alkavat)
        end:
          type: integer
          description: end (Osakkeet päättyvät)
        sum:
          type: integer
          description: sum (Yhteensä)
    ExternalBondResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when bond is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when bond is inserted or updated (Muutoskäyttäjä)
        apartmentId:
          type: integer
          description: Apartment id
        personId:
          type: integer
          description: Person id
        type:
          type: string
          description: Bond type (Sidostyyppi. OWNER = Omistaja, TENANT = Vuokralainen, OTHER = Muu)
          enum:
            - OWNER
            - TENANT
            - OTHER
        apartmentUsage:
          type: string
          description: Apartment usage (Käyttö. OWNER = Omistaja, RENTED = Vuokrattu)
          enum:
            - OWNER
            - RENTED
        beginDate:
          type: string
          description: Bond begin date. Format dd.mm.yyyy (Voimassa alku)
        endDate:
          type: string
          description: Bond end date. Format dd.mm.yyyy (Voimassa loppu)
        movingInDate:
          type: string
          description: Moving in date. Format dd.mm.yyyy (Muuttopäivä)
        leavingDate:
          type: string
          description: Leaving date. Format dd.mm.yyyy (Lähtöpäivä)
        tradingDate:
          type: string
          description: Trading date. Format dd.mm.yyyy (Kauppapäivä)
        markingDate:
          type: string
          description: Marking date. Format dd.mm.yyyy (Merkintäpäivä)
        ownersShareNumerator:
          type: number
          description: Owner share numerator (Omistusosuus osoittaja)
        ownersShareDenominator:
          type: integer
          description: Owner share denominator (Omistusosuus nimittäjä)
        regulationHabit:
          type: string
          description: Regulation habit (Osakkeiden Saantotapa)
        oldOwnersShareNumerator:
          type: number
          description: Old owner share numerator (Vanha omistusosuus osoittaja)
        oldOwnersShareDenominator:
          type: string
          description: Old owner share numerator (Vanha omistusosuus nimittäjä)
        referenceNumber:
          type: integer
          description: Bond id (Sidosnumero)
        deviantDueDay:
          type: integer
          description: deviant due day (Poikkeava eräpäivä)
        print:
          type: string
          description: Print (Tuloste. COMPANY_DEFAULT = Käytetään yrityksen oletusta, WIRE_TRANSFER = Tilisiirto, WIRE_TRANSFER_MONTHLY_COMBINED = Tilisiirto, kk yhdistetty, PAYMENT_LIST = Maksulista, PAYMENT_LIST_MONTHLY_COMBINED = Maksu, kk yhdistetty)
          enum:
            - COMPANY_DEFAULT
            - WIRE_TRANSFER
            - WIRE_TRANSFER_MONTHLY_COMBINED
            - PAYMENT_LIST
            - PAYMENT_LIST_MONTHLY_COMBINED
        bank:
          type: string
          description: Bank (Pankkitili tilisiirrolla)
        inhabitant:
          type: boolean
          description: Inhabitant (Asuminen)
        collectionBan:
          type: boolean
          description: Collection ban (Perintäkielto)
        interestBan:
          type: boolean
          description: Interest ban (Korkokielto)
        combinePayment:
          type: boolean
          description: Compines all payments bonds payments that has same person id under same payment slip (Yhdistä maksut)
        noEInvoice:
          type: boolean
          description: Bond can't be e-invoiced or direct debited. (Ei e-laskua eikä suoramaksua)
        oldReferenceNumber:
          type: string
          description: Old reference number (Vanha viitenumero)
        iban:
          type: string
          description: Iban (IBAN)
        bic:
          type: string
          description: Bic (BIC)
    ExternalBondDetailsResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when bond is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when bond is inserted or updated (Muutoskäyttäjä)
        apartmentId:
          type: integer
          description: Apartment id
        personId:
          type: integer
          description: Person id
        type:
          type: string
          description: Bond type (Sidostyyppi. OWNER = Omistaja, TENANT = Vuokralainen, OTHER = Muu)
          enum:
            - OWNER
            - TENANT
            - OTHER
        apartmentUsage:
          type: string
          description: Apartment usage  (Käyttö. OWNER = Omistaja, TENANT = Vuokrattu)
          enum:
            - OWNER
            - TENANT
        beginDate:
          type: string
          description: Bond begin date. Format dd.mm.yyyy (Voimassa alku)
        endDate:
          type: string
          description: Bond end date. Format dd.mm.yyyy (Voimassa loppu)
        movingInDate:
          type: string
          description: Moving in date. Format dd.mm.yyyy (Muuttopäivä)
        leavingDate:
          type: string
          description: Leaving date. Format dd.mm.yyyy (Lähtöpäivä)
        tradingDate:
          type: string
          description: Trading date. Format dd.mm.yyyy (Kauppapäivä)
        markingDate:
          type: string
          description: Marking date. Format dd.mm.yyyy (Merkintäpäivä)
        ownersShareNumerator:
          type: number
          description: Owner share numerator (Omistusosuus osoittaja)
        ownersShareDenominator:
          type: integer
          description: Owner share denominator (Omistusosuus nimittäjä)
        regulationHabit:
          type: string
          description: Regulation habit (Osakkeiden saantotapa)
        oldOwnersShareNumerator:
          type: number
          description: Old owner share numerator (Vanha omistusosuus osoittaja)
        oldOwnersShareDenominator:
          type: string
          description: Old owner share numerator (Vanha omistusosuus nimittäjä)
        referenceNumber:
          type: integer
          description: Bond id (Sidosnumero)
        deviantDueDay:
          type: integer
          description: deviant due day (Poikkeava eräpäivä)
        print:
          type: string
          description: Print (Tuloste. COMPANY_DEFAULT = Käytetään yrityksen oletusta, WIRE_TRANSFER = Tilisiirto, WIRE_TRANSFER_MONTHLY_COMBINED = Tilisiirto, kk yhdistetty, PAYMENT_LIST = Maksulista, PAYMENT_LIST_MONTHLY_COMBINED = Maksu, kk yhdistetty)
          enum:
            - COMPANY_DEFAULT
            - WIRE_TRANSFER
            - WIRE_TRANSFER_MONTHLY_COMBINED
            - PAYMENT_LIST
            - PAYMENT_LIST_MONTHLY_COMBINED
        bank:
          type: string
          description: Bank (Pankkitili tilisiirrolla)
        inhabitant:
          type: boolean
          description: Inhabitant (Asuminen)
        collectionBan:
          type: boolean
          description: Collection ban (Perintäkielto)
        interestBan:
          type: boolean
          description: Interest ban (Korkokielto)
        combinePayment:
          type: boolean
          description: Compines all payments bonds payments that has same person id under same payment slip (Yhdistä maksut)
        noEInvoice:
          type: boolean
          description: Bond can't be e-invoiced or direct debited. (Ei e-laskua ja suoramaksua)
        oldReferenceNumber:
          type: string
          description: Old reference number (Vanha viitenumero)
        iban:
          type: string
          description: Iban (IBAN)
        bic:
          type: string
          description: Bic (BIC)
        bondInfoTexts:
          type: array
          items: 
            type: string
        personAdditionalInformation:
          $ref: '#/components/schemas/ExternalAdditionalInformationResponseDTO'
        paymentTypes:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalBondPaymentTypeResponseDTO'
    ExternalAdditionalInformationResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when additional information is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when additional information is inserted or updated (Muutoskäyttäjä)
        additionalInfo:
          type: string
          description: Person additional information (Henkilötietojen lisätieto)
    ExternalBondPaymentTypeResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when bond payment type is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when bond payment type is inserted or updated (Muutoskäyttäjä)
        startDate:
          type: string
          description: Start date (Voimassa alku)
        endDate:
          type: string
          description: End date (Voimassa loppu)
        basisForAmount:
          type: string
          description: Basis for amount (Määrän peruste)
        basisForAmountDescription:
          type: string
          description: Description of the basis for amount  (Määrän perusteen selite)
        paymentTypeName:
          type: string
          description: Payment type name (Maksulajin nimi))
        amount:
          type: number
          description: Amount (Määrä)
        paymentTypeMultiplier:
          type: number
          description: Payment type multiplier (Maksulajin hintatiedon kerroin)
        multiplier:
          type: number
          description: Multiplier (Sidoksella maksulajin kerroin)
        unitPrice:
          type: number
          description: Unit price (A-hinta)
        unit:
          type: string
          description: Payment types unit (Yksikkö)
    ExternalMeterResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when meter is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when meter is inserted or updated (Muutoskäyttäjä)
        meterId:
          type: integer
          description: Meter id (Mittari nro)
        apartmentId:
          type: integer
          description: Apartment id (Huoneisto)
        connectionId:
          type: string
          enum:
            - BUILDING
            - APARTMENT
            - COMPANY
          description: Connection id (Kytkentä. BUILDING = Rakennukseen, APARTMENT = Huoneistoon, COMPANY = Yhtiön mittari)
        unit:
          type: string
          description: Unit
        categoryName:
          type: string
          description: category name (Kulutuslajin nimi)
        integerCount:
          type: integer
          description: Integer count (Kokonaislukujen määrä)
        decimalCount:
          type: integer
          description: Decimal count (Desimaalien määrä)
        multiplier:
          type: number
          description: Multiplier (Kerroin)
        saveType:
          type: string
          enum:
            - METER
            - CONSUMPTION
          description: Save type (Tallennustapa. METER = Mittarin lukema, CONSUMPTION = Kulutus)
        prepaymentStartDate:
          type: string
          description: Prepayment start date (Lähtötilanteessa ennakkojen alkupäivä)
        prepaymentSum:
          type: number
          description: Prepayment sum (Lähtötilanteessa ennakkojen alkusumma)
        status:
          type: string
          description: Status (Tila)
        mainMeter:
          type: integer
          description: Main meter (Päämittari)
        buildingNumber:
          type: integer
          description: Building number (Rakennus)
        warmWaterUsageMeter:
          type: integer
          description: Meter that is used for warm water usage (Lämpimän käyttöveden mittari)
        notToReport:
          type: boolean
          description: not to report (Ei kulutusraporttiin)
        noMeasureInput:
          type: boolean
          description: No measured input (Ei kulutuslukemien syöttöä)
        externalMeterId:
          type: string
          description: External meter id (Rajapinta id)
    ExternalMeterConsumptionResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when meter consumption is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when meter consumption is inserted or updated (Muutoskäyttäjä)
        meterId:
          type: integer
          description: Fivaldi meter id 
        readDate:
          type: string
          description: Read date
        startAmount:
          type: number
          description: Start amount
        reading:
          type: number
          description: Meter value is saved by meter reading and not with consumption
        consumption:
          type: number
          description: Meter value is saved by consumption and not with meter reading
    ExternalApartmentMeterConsumptionsDTO:
      type: object
      properties:
        meterId:
          type: integer
          description: Meter id
        categoryName:
          type: string
          description: category name (Kulutuslajin nimi)
        consumptions:
          type: array
          items: 
            $ref: '#/components/schemas/ConsumptionDTO'
    ConsumptionDTO:
      type: object
      properties:
        readDate:
          type: string
          description: Read date
        reading:
          type: number
          description: Meter reading value
        consumption:
          type: number
          description: Meter consumption value
        changeTime:
          type: string
          description: Fivaldi will set this when meter consumption is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when meter consumption is inserted or updated (Muutoskäyttäjä)
    ExternalMeterConsumptionRequestDTO:
      type: object
      properties:
        meterId:
          type: integer
          nullable: false
          description: Meter id (Mittari id)
        consumptionUnit:
          type: string
          minLength: 1
          nullable: false
          description: Consumption unit. Can be found from ExternalMeterResponseDTO unit-field.
        readDate:
          type: string
          format: date
          description: Read date. Format dd.mm.yyyy
          nullable: false
        reading:
          type: number
          nullable: true
          description: Meter value is saved by meter reading and not with consumption.
        consumption:
          type: number
          nullable: true
          description: Meter value is saved by consumption and not with meter reading. If this is used then reading should not be given.
        meterSpinFlag:
          type: boolean
          nullable: false
          description: Has meter spined (Mittarinpyörähdys)
        replacementValueFlag:
          type: boolean
          nullable: false
          description: When true and readDate same as previous readDate then reading or consumpsion will replace lastly added value.
    ExternalBondRentLedgerResponseDTO:
      type: object
      properties:
        referenceNumber:
          type: string
          description: Bond id
        receivable:
          type: number
          description: Amount of receivable
        prepayment:
          type: number
          description: Amount of prepayment
    ExternalBondRentLedgerWithApartmentResponseDTO:
      type: object
      allOf:
        - $ref: '#/components/schemas/ExternalBondRentLedgerResponseDTO'
        - type: object
          properties:
            apartmentId:
              type: integer
              description: Apartment id
            apartmentIdentifier:
              type: string
              description: Apartment identifier
    ExternalBondRentLedgerWithPersonResponseDTO:
      type: object
      allOf: 
        - $ref: '#/components/schemas/ExternalBondRentLedgerResponseDTO'
        - type: object
          properties:
            personId:
              type: integer
              description: Person id
            firstName:
              type: string
              description: Person's first name
            lastName:
              type: string
              description: Person's last name
            otherNames:
              type: string
              description: Person's other names
            previousName:
              type: string
              description: Person's previous name
    ExternalPaymentTypeResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when housing company details is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when housing company details is inserted or updated (Muutoskäyttäjä)
        name:
          type: string
          description: Name of the payment type (Maksulajin nimi)
        paymentTypeId:
          type: integer
          description: Number of the payment type (Maksulajin numero)
        consumptionType:
          type: string
          description: Consumption type of the payment type (Maksulajin kulutuslaji)
        unit:
          type: string
          description: Unit of the payment type (Maksulajin yksikkö)
        accounts:
          $ref: '#/components/schemas/ExternalPaymentTypeAccountResponseDTO'
        dimensions:
          $ref: '#/components/schemas/ExternalPaymentTypeDimensionResponseDTO'
        convergencePriority:
          type: integer
          description: Priority of the payment type (Kohdistusprioriteetti)
        validityMonths:
          $ref: '#/components/schemas/ExternalPaymentTypeValidityDTO'
        priceInfos:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalPaymentTypePriceResponseDTO'
    ExternalPaymentTypeAccountResponseDTO:
      type: object
      properties:
        kpAccount:
          type: string
          description: Account number (Tulotilin numero)
        kpAccountName:
          type: string
          description: Account name (Tulotilin selite)
        incomingEarningAccount:
          type: string
          description: Account number (Siirtosaamistilin numero)
        incomingEarningAccountName:
          type: string
          description: Account name (Siirtosaamistilin selite)
        incomingDepthAccount:
          type: string
          description: Account number (Siirtovelkatilin numero)
        incomingDepthAccountName:
          type: string
          description: Account name (Siirtovelkatilin selite)
    ExternalPaymentTypeDimensionResponseDTO:
      type: object
      properties:
        dimension1:
          type: string
          description: Dimension 1 number (Seurantakohde 1)
        dimension1Name:
          type: string
          description: Dimension 1 name
        dimension2:
          type: string
          description: Dimension 2 number (Seurantakohde 2)
        dimension2Name:
          type: string
          description: Dimension 2 name
        dimension3:
          type: string
          description: Dimension 3 number (Seurantakohde 3)
        dimension3Name:
          type: string
          description: Dimension 3 name
        dimension4:
          type: string
          description: Dimension 4 number (Seurantakohde 4)
        dimension4Name:
          type: string
          description: Dimension 4 name
    ExternalPaymentTypePriceResponseDTO:
      type: object
      properties:
        beginDate:
          type: string
          description: Begin date of the payment type (Alkukuukausi)
        vatType:
          type: string
          description: Alv% of the payment type(alv-prosentti)
        vatPrice:
          type: string
          description: Price of the payment type (A-hinta)
        multiplier:
          type: string
          description: Multiplier of the payment type (Kerroin)
        changeTime:
          type: string
          description: Fivaldi will set this when housing company details is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when housing company details is inserted or updated (Muutoskäyttäjä)
    ExternalPaymentTypeValidityDTO:
      type: object
      properties:
        kk1:
          type: boolean
          description: tammi
        kk2:
          type: boolean
          description: helmi
        kk3:
          type: boolean
          description: maalis
        kk4:
          type: boolean
          description: huhti
        kk5:
          type: boolean
          description: touko
        kk6:
          type: boolean
          description: kesä
        kk7:
          type: boolean
          description: heinä
        kk8:
          type: boolean
          description: elo
        kk9:
          type: boolean
          description: syys
        kk10:
          type: boolean
          description: loka
        kk11:
          type: boolean
          description: marras
        kk12:
          type: boolean
          description: joulu
    ExternalHousingCompanyDetailsResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when housing company details is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when housing company details is inserted or updated (Muutoskäyttäjä)
        officialName:
          type: string
          description: First official name (Virallinen nimi)
        officialName2:
          type: string
          description: Second official name (Lisänimi)
        cadasterDate:
          type: string
          description: Cadaster date (Kaupparekisteripäivämäärä)
        articlesOfAssociationDate:
          type: string
          description: Articles of association date (Yhtiöjärjestyksen päivämäärä)
        deviantArticlesOfAssociation:
          type: boolean
          description: Deviant article of association (Poikkeava yhtiöjärjestys)
        sharesInSafetyPress:
          type: boolean
          description: Are shares in safety press (Osakkeet painettava turvapainossa)
        rightToExpropriate:
          type: string
          description: Right to expropriate (Kunnan lunastusoikeus)
        loanSharePayable:
          type: string
          description: Loan share payable (Lainaosuus maksettavissa)
        consumptionHeat:
          type: number
          description: Consumption heat (Kulutus lämpö)
        consumptionElectricity:
          type: number
          description: Consumption electricity (Kulutus sähkö)
        consumptionWater:
          type: number
          description: Consumption water (Kulutus vesi)
        consumptionYear:
          type: integer
          description: Consumption year (Kulutus vuosi)
        antennaSystem:
          type: string
          description: Antenna system (Antennijärjestelmä)
        fullValueInsurance:
          type: boolean
          description: Full value insurance (Täysarvovakuutus)
        otherInsurances:
          type: string
          description: Other insurances (Muut vakuutukset)
        insuranceValue:
          type: number
          description: Insurance value (Vakuuutusksen arvo EUR)
        apartmentRegisterChanged:
          type: boolean
          description: Apartment register changed (Huoneistoluettelo muutettu 1.5.1972 jälkeen)
        expropriationShareholder:
          type: boolean
          description: Is expropriate share holder (Lunastusoikeus osakkaalla)
        expropriationCompany:
          type: boolean
          description: Is expropriation company (Lunastusoikeus yhtiöllä)
        otherExpropriation:
          type: string
          description: Other expropriation (Muu lunastusoikeus)
        mortgages:
          type: number
          description: Mortgages (Kiinnitykset)
        aravaFunded:
          type: boolean
          description: Is arava funded (Arava-rahoitettu)
        sameMaintenanceFee:
          type: boolean
          description: Has same maintenance fee (Kaikilla huoneistoilla sama vasikeperuste)
        realEstateMaintenanceSystem:
          type: string
          description: Real estate maintenance system (Kiinteistönhoitojärjestelmä)
        vatTaxableCompany:
          type: string
          description: VAT taxable company (ALV-verollinen yhtiö. NO = Ei, YES = Kyllä, PARTLY = Osittain)
          enum:
            - NO
            - YES
            - PARTLY
        telecommunicationSystem:
          type: string
          description: Telecommunication system (Tietoliikennejärjestelmä)
        allApartmentsHouseManagersCertificate:
          type: boolean
          description: Are all apartments in house manager certificate (Kaikki rakennukset näytetään isännöitsijäntodistuksella)
        apartmentDataSystem:
          type: boolean
          description: Is in apartment data system in use (Osakehuoneistorekisteri käytössä)
        companyType:
          type: string
          description: Company type (Yhtiön tyyppi)
        vendors:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalCompanyVendorResponseDTO'
        shareSeries:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalCompanyShareSeriesResponseDTO'
        lots:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalCompanyLotResponseDTO'
        buildings:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalBuildingResponseDTO'
        realPropertyUnits:
          type: array
          items: 
            $ref: '#/components/schemas/ExternalRealPropertyUnitResponseDTO'
    ExternalCompanyVendorResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when vendor is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when vendor is inserted or updated (Muutoskäyttäjä)
        partyTypeName:
          type: string
          description: Party type name (Tyyppi)
        customerName:
          type: string
          description: Customer name (Toimittaja)
        customerPersonName:
          type: string
          description: Customer person name (Henkilö)
        onHouseManagerCertificate:
          type: boolean
          description: In house manager certificate (Näytetään isannoitsijantodistuksella)
    ExternalCompanyShareSeriesResponseDTO:
      type: object
      properties:
        shareSeriesId:
          type: string
          description: Share series id (Osakesarja)
        changeTime:
          type: string
          description: Fivaldi will set this when share series is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when share series is inserted or updated (Muutoskäyttäjä)
        type:
          type: string
          enum:
            - Huoneisto osakkeet
            - Kiinteistö osakkeet
          description: type of the share series (Tyyppi)
        description:
          type: string
          description: Description (Selite)
        seriesIdentifier:
          type: string
          description: Series identifier (Tunnus)
        start:
          type: number
          description: Where share series starts (Numerot alku)
        end:
          type: number
          description: Where share series ends (Numerot loppu)
        together:
          type: number
          description: Total number of share series (Yhteensä)
        nominalValue:
          type: number
          description: Nominal value (Nimellisarvo)
        taxableValue:
          type: number
          description: Taxable value (Verotusarvo)
        issuedDate:
          type: string
          description: Issued date (Antopäivä)
    ExternalCompanyLotResponseDTO:
      type: object
      properties:
        lotId:
          type: string
          description: Lot id
        changeTime:
          type: string
          description: Fivaldi will set this when lot is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when lot is inserted or updated (Muutoskäyttäjä)
        lotName:
          type: string
          description: Lot name (Mimi)
        lotNumber:
          type: number
          description: lot number (Tontin numero)
        townName:
          type: string
          description: Town name (Kunnan nimi)
        townNumber:
          type: number
          description: Town number (Kunnan numero)
        districtName:
          type: string
          description: District name (Kaupunginosan nimi)
        districtNumber:
          type: number
          description: District number (Kaupunginosan numero)
        blockName:
          type: string
          description: Block name (Korttelin nimi)
        blockNumber:
          type: number
          description: Block number (Korttelin numero)
        checksum:
          type: string
          description: Checksum (Tarkiste)
        lotSize:
          type: number
          description: Size of a lot (Pinta-ala)
        footprint:
          type: number
          description: Footprint (Kerrosala)
        footprintUnused:
          type: number
          description: Footprint not used (Käyttämätön rakennusoikeus)
        ownershipStatus:
          type: string
          enum:
            - Vuokratontti
            - Oma tontti
          description: Ownership status (Omistus)
        rentPeriod:
          type: number
          description: Rent period (Vuokra-aika)
        rentEndingYear:
          type: number
          description: When the rent time is ending (Vuokra-ajan päättymisvuosi)
        rentInspectionGrounds:
          type: string
          description: Rent inspection ground (Vuokran tarkistusperuste)
        rentSum:
          type: number
          description: Rent amount (Vuosivuokra)
        owner:
          type: string
          description: Owner of the rent lot (Vuokratontin omistaja)
    ExternalBuildingResponseDTO:
      type: object
      properties:
        buildingId:
          type: integer
          description: Building id
        changeTime:
          type: string
          description: Fivaldi will set this when building is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when building is inserted or updated (Muutoskäyttäjä)
        name:
          type: string
          description: Name (Nimi)
        streetAddress:
          type: string
          description: Street address (Lähiosoite)
        postalCode:
          type: string
          description: Postal code (Postinumero)
        postalAddress:
          type: string
          description: Post office (Postiosoite)
        buildingType:
          type: string
          description: Building type (Talotyyppi)
        buildingMaterial:
          type: string
          description: Building material (Rakennusaine)
        roofType:
          type: string
          description: Roof type (Kattotyyppi)
        roofingMaterial:
          type: string
          description: Roofing material (Kateaine)
        heating:
          type: string
          description: heating (Lämmitys)
        airConditioning:
          type: string
          description: Air conditioning (Ilmanvaihto)
        heatDistributionMethod:
          type: string
          description: Heat distribution method (Lämmönjakotapa)
        coolingSystem:
          type: string
          description: Cooling system (Jäähdytysjärjestelmä)
        buildingCompletedYear:
          type: integer
          description: Building completed year (Valmistumisvuosi)
        conditionSurvey:
          type: integer
          description: Condition survey (Kuntoarvio)
        managementPlanStart:
          type: integer
          description: Management plan start (PTS tehty alkuvuosi)
        managementPlanEnd:
          type: integer
          description: Management plan end (PTS tehty loppuvuosi)
        accountDimension1:
          type: string
          description: Account dimension 1 (Seurantakohde 1)
        accountDimension2:
          type: string
          description: Account dimension 2 (Seurantakohde 2)
        accountDimension3:
          type: string
          description: Account dimension 3 (Seurantakohde 3)
        accountDimension4:
          type: string
          description: Account dimension 4 (Seurantakohde 4)
        lotName:
          type: string
          description: lot name (Nimi)
        onHouseManagerCertificate:
          type: boolean
          description: Is shown in house managers certificate (Näytetään isännöitsijäntodistuksella)
        lotId:
          type: string
          description: Lot id
    ExternalRealPropertyUnitResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when real property unit is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when real property unit is inserted or updated (Muutoskäyttäjä)
        unitName:
          type: string
          description: Unit name (Arvon yksikön nimi)
        type:
          type: string
          description: Type (Tilan tyyppi)
        onHouseManagerCertificate:
          type: boolean
          description: Is shown in house manager certificate (Näytetään isännöitsijäntodistuksella)
        description:
          $ref: '#/components/schemas/ExternalRealPropertyUnitDescriptionResponseDTO'
        amount:
          type: number
          description: Amount (Arvo)
    ExternalRealPropertyUnitDescriptionResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when real property unit description is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when real property unit description is inserted or updated (Muutoskäyttäjä)
        description:
          type: string
          description: Description (Nimi)
    ExternalApartmentRepairResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when apartment repair is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when apartment repair is inserted or updated (Muutoskäyttäjä)
        repairId:
          type: integer
          description: Repair id
        heading:
          type: string
          description: Repair heading (Otsikko)
        text:
          type: string
          description: Repair description (Selite)
        apartmentId:
          type: integer
          description: Fivaldi apartment id
        status:
          type: string
          enum:
            - PLANNED
            - WITHOUT_DECISION
            - DECISION_RECEIVED
            - STARTED
            - FINISHED
          description: Repair status (Tila. PLANNED = Suunniteltu, WITHOUT_DECISION = Odottaa päätöstä, DECISION_RECEIVED = Päätös tehty, STARTED = Aloitettu, FINISHED = Valmis)
        decisionDate:
          type: string
          description: Decision date. Format dd.mm.yyyy (Ilmoitettu)
        beginDate:
          type: string
          description: Begin date. Format dd.mm.yyyy (Ilmoitus hyväksytty)
        finishedDate:
          type: string
          description: Finished date. Format dd.mm.yyyy (Valmis)
        houseManagersCertificateStatus:
          type: string
          enum:
            - NOTIFIED
            - NOTIFICATION_APPROVED
            - FINISHED
          description: House manager certificate status (Tila. NOTIFIED = Ilmoitettu, NOTIFICATION_APPROVED = Ilmoitus hyväksytty, FINISHED = Valmis)
        houseManagersCertificateDateType:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
          description: Accuracy of repair date (Päivämäärän tarkkuus. DAY = Päivä, MONTH = Kuukausi, YEAR = Vuosi)
        internalText:
          type: string
          description: Internal text (Sisäiset tiedot)
        onExtractOfTheRegisterOfOccupants:
          type: boolean
          description: On extract of the register of occupants (Näytetään talonkirjaotteella)
        onApartmentInformation:
          type: boolean
          description: On house managers certificate apartment information (Näytetään isännöitsijäntodistuksella huoneiston tiedoissa)
        onHouseManagersCertificateForRenting:
          type: boolean
          description: On house managers certificate for renting (Näytetään isännöitsijäntodistuksella vuokrausta varten)
    ExternalCompanyRepairResponseDTO:
      type: object
      properties:
        changeTime:
          type: string
          description: Fivaldi will set this when company repair is inserted or updated (Muutosaika)
        changeUser:
          type: string
          description: Fivaldi will set this when company repair is inserted or updated (Muutoskäyttäjä)
        repairId:
          type: integer
          description: Repair id
        heading:
          type: string
          description: Repair heading (Otsikko)
        text:
          type: string
          description: Repair description (Selite)
        apartmentId:
          type: integer
          description: Apartment id
        status:
          type: string
          enum:
            - PLANNED
            - WITHOUT_DECISION
            - DECISION_RECEIVED
            - STARTED
            - FINISHED
          description: Repair status (Tila. PLANNED = Suunniteltu, WITHOUT_DECISION = Odottaa päätöstä, DECISION_RECEIVED = Päätös tehty, STARTED = Aloitettu, FINISHED = Valmis)
        decisionDate:
          type: string
          description: Decision date. Format dd.mm.yyyy (Suunnitteilla)
        beginDate:
          type: string
          description: Begin date. Format dd.mm.yyyy (Päätös tehty)
        finishedDate:
          type: string
          description: Finished date. Format dd.mm.yyyy (Valmis)
        houseManagersCertificateStatus:
          type: string
          enum:
            - IN_PLANNING
            - DECISION_MADE
            - FINISHED
          description: House manager certificate status (IN_PLANNING = Suunnitteilla, DECISION_MADE = Päätös tehty, FINISHED = Valmis)
        houseManagersCertificateDateType:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
          description: Accuracy of repair date (Päivämäärän tarkkuus. DAY = Päivä, MONTH = Kuukausi, YEAR = Vuosi)
        internalText:
          type: string
          description: Internal text (Sisäiset tiedot)
        onExtractOfTheRegisterOfOccupants:
          type: boolean
          description: On extract of the register of occupants (Näytetään talonkirjaotteella)
        onCompanyInformation:
          type: boolean
          description: On house managers certificate company information (Näytetään isännöitsijäntodistuksella yhtiön tiedoissa)
        onApartmentInformation:
          type: boolean
          description: On house managers certificate apartment information (Näytetään isännöitsijäntodistuksella vuokrausta varten)
        onHouseManagersCertificateForRenting:
          type: boolean
          description: On house managers certificate for renting (Näytetään isännöitsijäntodistuksella vuokrausta varten)
    ExternalApartmentRepairRequestDTO:
      type: object
      properties:
        heading:
          type: string
          maxLength: 60
          nullable: true
          description: Repair heading (Otsikko)
        text:
          type: string
          maxLength: 4000
          nullable: true
          description: Repair description (Selite)
        apartmentId:
          type: integer
          maximum: 999999999
          nullable: false
          description: Apartment id
        status:
          type: string
          enum:
            - PLANNED
            - WITHOUT_DECISION
            - DECISION_RECEIVED
            - STARTED
            - FINISHED
          nullable: false
          description: Repair status (Tila. PLANNED = Suunniteltu, WITHOUT_DECISION = Odottaa päätöstä, DECISION_RECEIVED = Päätös tehty, STARTED = Aloitettu, FINISHED = Valmis)
        decisionDate:
          type: string
          description: Decision date. Format dd.mm.yyyy (Ilmoitettu)
          nullable: true
        beginDate:
          type: string
          description: Begin date. Format dd.mm.yyyy (Ilmoitus hyväksytty)
          nullable: true
        finishedDate:
          type: string
          description: Finished date. Format dd.mm.yyyy (Valmis)
          nullable: true
        houseManagersCertificateStatus:
          type: string
          enum:
            - NOTIFIED
            - NOTIFICATION_APPROVED
            - FINISHED
          nullable: false
          description: House manager certificate status (Tila. NOTIFIED = Ilmoitettu, NOTIFICATION_APPROVED = Ilmoitus hyväksytty, FINISHED = Valmis)
        houseManagersCertificateDateType:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
          nullable: false
          description: Accuracy of repair date (Päivämäärän tarkkuus. DAY = Päivä, MONTH = Kuukausi, YEAR = Vuosi)
        internalText:
          type: string
          maxLength: 4000
          nullable: true
          description: Internal text (Sisäiset tiedot)
        onExtractOfTheRegisterOfOccupants:
          type: boolean
          nullable: true
          description: On extract of the register of occupants (Näytetään talonkirjaotteella)
        onApartmentInformation:
          type: boolean
          nullable: true
          description: On house managers certificate apartment information (Näytetään isännöitsijäntodistuksella huoneiston tiedoissa)
        onHouseManagersCertificateForRenting:
          type: boolean
          nullable: true
          description: On house managers certificate for renting (Näytetään isännöitsijäntodistuksella vuokrausta varten)
    ExternalCompanyRepairRequestDTO:
      type: object
      properties:
        heading:
          type: string
          maxLength: 60
          nullable: true
          description: Repair heading (Otsikko)
        text:
          type: string
          maxLength: 4000
          nullable: true
          description: Repair description (Selite)
        status:
          type: string
          enum:
            - PLANNED
            - WITHOUT_DECISION
            - DECISION_RECEIVED
            - STARTED
            - FINISHED
          nullable: false
          description: Repair status (Tila. PLANNED = Suunniteltu, WITHOUT_DECISION = Odottaa päätöstä, DECISION_RECEIVED = Päätös tehty, STARTED = Aloitettu, FINISHED = Valmis)
        decisionDate:
          type: string
          description: Decision date. Format dd.mm.yyyy (Suunnitteilla)
          nullable: true
        beginDate:
          type: string
          description: Begin date. Format dd.mm.yyyy (Päätös tehty)
          nullable: true
        finishedDate:
          type: string
          description: Finished date. Format dd.mm.yyyy (Valmis)
          nullable: true
        houseManagersCertificateStatus:
          type: string
          enum:
            - IN_PLANNING
            - DECISION_MADE
            - FINISHED
          nullable: false
          description: House manager certificate status (IN_PLANNING = Suunnitteilla, DECISION_MADE = Päätös tehty, FINISHED = Valmis)
        houseManagersCertificateDateType:
          type: string
          enum:
            - DAY
            - MONTH
            - YEAR
          nullable: false
          description: Accuracy of repair date (Päivämäärän tarkkuus. DAY = Päivä, MONTH = Kuukausi, YEAR = Vuosi)
        internalText:
          type: string
          maxLength: 4000
          nullable: true
          description: Internal text (Sisäiset tiedot)
        onExtractOfTheRegisterOfOccupants:
          type: boolean
          nullable: true
          description: On extract of the register of occupants (Näytetään talonkirjaotteella)
        onCompanyInformation:
          type: boolean
          nullable: true
          description: On house managers certificate company information (Näytetään isännöitsijäntodistuksella yhtiön tiedoissa)
        onApartmentInformation:
          type: boolean
          nullable: true
          description: On house managers certificate apartment information (Näytetään isännöitsijäntodistuksella vuokrausta varten)
        onHouseManagersCertificateForRenting:
          type: boolean
          nullable: true
          description: On house managers certificate for renting (Näytetään isännöitsijäntodistuksella vuokrausta varten)
