---
swagger: '2.0'
info:
  title: Rompslomp API
  version: '1'
definitions:
  Access control:
    type: object
    properties:
      api_accessible:
        type: boolean
        description: If false the company's data is not accessible by means of the
          Rompslomp API because it's on the Gratis subscription. All API access will
          be denied.
        x-nullable: true
      allowed_scopes:
        type: array
        items:
          type: string
          enum:
          - public
          - manage:companies
          - manage:contacts
          - manage:sales_invoices
          - manage:payments
          - manage:products
          - read:accounts
          - manage:journal_entries
          - read:me
          - manage:hours
          - manage:rides
          - manage:expenses
          - manage:quotations
        description: The OAuth scopes that the resource owner is allowed to access
          in the context of the parent company.
  Account:
    type: object
    properties:
      id:
        type: integer
        x-nullable: true
      name:
        type: string
        x-nullable: true
      path_name:
        type: string
        x-nullable: true
      path:
        type: string
        x-nullable: true
      reference:
        type: string
        x-nullable: true
      type:
        type: string
        x-nullable: true
      parent_id:
        type: integer
        description: ID of this account's parent account
        x-nullable: true
  Attachment object:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      attachment:
        description:
          type: string
          format: string
          write_only: true
          description: Base64 encoded file
        x-nullable: true
      attachment_file_name:
        type: string
        x-nullable: true
      attachment_content_type:
        type: string
        description: Read only.
        x-nullable: true
      attachment_file_size:
        type: integer
        description: Read only.
        x-nullable: true
  Company:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      name:
        type: string
        x-nullable: true
      owner_name:
        type: string
        description: Name of the person that owns the company.
        x-nullable: true
      address:
        type: string
        x-nullable: true
      zipcode:
        type: string
        x-nullable: true
      city:
        type: string
        x-nullable: true
      country_code:
        type: string
        description: ISO 3166-1 alpha-2 country code.
        x-nullable: true
      kvk_number:
        type: string
        description: Dutch chamber of commerce registration number.
        x-nullable: true
      email:
        type: string
        x-nullable: true
      website:
        type: string
        x-nullable: true
      type:
        type: string
        enum:
        - eenmanszaak
        - vof
        - bv
        - vereniging
        - stichting
        - other
        x-nullable: true
      vat_liable:
        type: boolean
        description: Specifies wether or not the company is obligated to pay VAT.
        default: true
        x-nullable: true
      vat_number:
        type: string
        description: Required if company is VAT liable
        x-nullable: true
      access_control:
        type: object
        properties:
          api_accessible:
            type: boolean
            description: If false the company's data is not accessible by means of
              the Rompslomp API because it's on the Gratis subscription. All API access
              will be denied.
            x-nullable: true
          allowed_scopes:
            type: array
            items:
              type: string
              enum:
              - public
              - manage:companies
              - manage:contacts
              - manage:sales_invoices
              - manage:payments
              - manage:products
              - read:accounts
              - manage:journal_entries
              - read:me
              - manage:hours
              - manage:rides
              - manage:expenses
              - manage:quotations
            description: The OAuth scopes that the resource owner is allowed to access
              in the context of the parent company.
        description: Read only.
  Contact:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      is_individual:
        type: boolean
        description: A contact is assumed to be a company unless this is true.
        default: false
        x-nullable: true
      is_supplier:
        type: boolean
        description: A contact is assumed to be a customer unless this is true.
        default: false
        x-nullable: true
      name:
        type: string
        description: The value of company_name or contact_person if is_individual
          is false or true respectively. Read only.
        x-nullable: true
      company_name:
        type: string
        description: Required if is_individual is false.
        x-nullable: true
      contact_person_name:
        type: string
        description: Required if is_individual is true.
        x-nullable: true
      contact_person_email_address:
        type: string
        x-nullable: true
      address:
        type: string
        x-nullable: true
      zipcode:
        type: string
        x-nullable: true
      city:
        type: string
        x-nullable: true
      government_identification_number:
        type: string
        description: Het Overheidsidentificatienummer (OIN) is verplicht voor het
          uitwisselen van e-facturen met '                 ' overheidsorganisaties.
        x-nullable: true
      country_code:
        type: string
        description: ISO 3166-1 alpha-2 country code.
        x-nullable: true
      kvk_number:
        type: string
        x-nullable: true
      phone:
        type: string
        x-nullable: true
      vat_number:
        type: string
        x-nullable: true
      contact_number:
        type: string
        description: Unique reference number for your customers and/or suppliers,
          if left blank a new number is automatically generated and assigned.
        x-nullable: true
      free_1:
        type: string
        x-nullable: true
      free_2:
        type: string
        x-nullable: true
      free_3:
        type: string
        x-nullable: true
    description: Suppliers and customers.
  Expense:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      date:
        type: date
        description: Defaults to current date.
        x-nullable: true
      state:
        x-nullable: true
      type_account_id:
        type: integer
        x-nullable: true
      currency:
        type: string
        description: Lower case 3-character ISO 4217 code. Default is Euro. For presentation
          only, bare amounts are always in Euro.
        x-nullable: true
      contact_id:
        type: integer
        description: Note that once the invoice is published its cached contact properties
          are locked.
        x-nullable: true
      invoice_number:
        type: string
        description: Read only.
        x-nullable: true
      type_account:
        type: object
        properties:
          id:
            type: integer
            x-nullable: true
          name:
            type: string
            x-nullable: true
          path_name:
            type: string
            x-nullable: true
          path:
            type: string
            x-nullable: true
          reference:
            type: string
            x-nullable: true
          type:
            type: string
            x-nullable: true
          parent_id:
            type: integer
            description: ID of this account's parent account
            x-nullable: true
        x-nullable: true
      contact:
        type: object
        properties:
          id:
            type: integer
            description: Read only.
            x-nullable: true
          is_individual:
            type: boolean
            description: A contact is assumed to be a company unless this is true.
            default: false
            x-nullable: true
          is_supplier:
            type: boolean
            description: A contact is assumed to be a customer unless this is true.
            default: false
            x-nullable: true
          name:
            type: string
            description: The value of company_name or contact_person if is_individual
              is false or true respectively. Read only.
            x-nullable: true
          company_name:
            type: string
            description: Required if is_individual is false.
            x-nullable: true
          contact_person_name:
            type: string
            description: Required if is_individual is true.
            x-nullable: true
          contact_person_email_address:
            type: string
            x-nullable: true
          address:
            type: string
            x-nullable: true
          zipcode:
            type: string
            x-nullable: true
          city:
            type: string
            x-nullable: true
          government_identification_number:
            type: string
            description: Het Overheidsidentificatienummer (OIN) is verplicht voor
              het uitwisselen van e-facturen met '                 ' overheidsorganisaties.
            x-nullable: true
          country_code:
            type: string
            description: ISO 3166-1 alpha-2 country code.
            x-nullable: true
          kvk_number:
            type: string
            x-nullable: true
          phone:
            type: string
            x-nullable: true
          vat_number:
            type: string
            x-nullable: true
          contact_number:
            type: string
            description: Unique reference number for your customers and/or suppliers,
              if left blank a new number is automatically generated and assigned.
            x-nullable: true
          free_1:
            type: string
            x-nullable: true
          free_2:
            type: string
            x-nullable: true
          free_3:
            type: string
            x-nullable: true
        description: 'New contact to be associated with this sales invoice. Create
          only: use the contacts endpoints to update or delete existing contacts.
          Any previous contact is dissociated, but not deleted. Note that once the
          invoice is published its cached contact properties are locked. Write only.'
        x-nullable: true
      cached_contact:
        type: object
        properties:
          name:
            type: string
            x-nullable: true
          contact_person_name:
            type: string
            x-nullable: true
          address:
            type: string
            x-nullable: true
          zipcode:
            type: string
            x-nullable: true
          city:
            type: string
            x-nullable: true
          country_code:
            type: string
            x-nullable: true
          contact_person_email_address:
            type: string
            x-nullable: true
          contact_number:
            type: string
            x-nullable: true
        description: Details of the associated contact. Subset of the Contact model.
          Locked when the invoice is published. Read only.
        x-nullable: true
      invoice_lines:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              description: Read only.
              x-nullable: true
            description:
              type: string
              description: Description of the product or service in no more than 255
                characters.
              x-nullable: true
            extended_description:
              type: string
              description: Extended description of the invoice line.
              x-nullable: true
            price_per_unit:
              type: string
              description: This property states the price with VAT excluded Arbitrary-precision
                floating point number represented as a string.
              x-nullable: true
            price_with_vat:
              type: string
              description: Arbitrary-precision floating point number represented as
                a string. Read only.
              x-nullable: true
            price_without_vat:
              type: string
              description: Arbitrary-precision floating point number represented as
                a string. Read only.
              x-nullable: true
            vat_amount:
              type: string
              description: Amount of VAT in Euro. Arbitrary-precision floating point
                number represented as a string. Read only.
              x-nullable: true
            vat_rate:
              type: string
              description: Tax rate expressed by a decimal number, e.g. "0.21" means
                21%. This property is derived from the invoice line's VAT type, unless
                that type is "custom", in which case a custom vat_rate must be provided.
                In other cases the given vat_rate is ignored. Arbitrary-precision
                floating point number represented as a string.
              x-nullable: true
            vat_type_id:
              type: integer
              description: Defaults to company's default VAT type or VAT type "vat_high".
              x-nullable: true
            quantity:
              type: string
              default: '1.0'
              description: Arbitrary-precision floating point number represented as
                a string.
              x-nullable: true
            product_id:
              type: integer
              x-nullable: true
            account_id:
              type: integer
              x-nullable: true
            account_path:
              description: When both account_path and account_id are given the latter
                has precedence.
              x-nullable: true
  Expenses contact:
    type: object
    properties:
      name:
        type: string
        x-nullable: true
      contact_person_name:
        type: string
        x-nullable: true
      address:
        type: string
        x-nullable: true
      zipcode:
        type: string
        x-nullable: true
      city:
        type: string
        x-nullable: true
      country_code:
        type: string
        x-nullable: true
      contact_person_email_address:
        type: string
        x-nullable: true
      contact_number:
        type: string
        x-nullable: true
    description: Details of a expense's contact. Subset of the Contact model. Locked
      when the expense ispublished.
  Hour:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      client_id:
        type: integer
        x-nullable: true
      project_id:
        type: integer
        x-nullable: true
      calculated_duration:
        type: string
        description: Arbitrary-precision floating point number represented as a string.
          Read only.
        x-nullable: true
      calculated_duration_without_pause:
        type: string
        description: Arbitrary-precision floating point number represented as a string.
          Read only.
        x-nullable: true
      calculated_ended_at:
        type: datetime
        description: When ended_at is null this is the started_at + calculated_duration_without_pause
          Read only.
        x-nullable: true
      date:
        type: date
        x-nullable: true
      started_at:
        type: datetime
        x-nullable: true
      ended_at:
        type: datetime
        x-nullable: true
      description:
        type: string
        x-nullable: true
  Invoice line:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      description:
        type: string
        description: Description of the product or service in no more than 255 characters.
        x-nullable: true
      extended_description:
        type: string
        description: Extended description of the invoice line.
        x-nullable: true
      price_per_unit:
        type: string
        description: This property states the price with VAT excluded Arbitrary-precision
          floating point number represented as a string.
        x-nullable: true
      price_with_vat:
        type: string
        description: Arbitrary-precision floating point number represented as a string.
          Read only.
        x-nullable: true
      price_without_vat:
        type: string
        description: Arbitrary-precision floating point number represented as a string.
          Read only.
        x-nullable: true
      vat_amount:
        type: string
        description: Amount of VAT in Euro. Arbitrary-precision floating point number
          represented as a string. Read only.
        x-nullable: true
      vat_rate:
        type: string
        description: Tax rate expressed by a decimal number, e.g. "0.21" means 21%.
          This property is derived from the invoice line's VAT type, unless that type
          is "custom", in which case a custom vat_rate must be provided. In other
          cases the given vat_rate is ignored. Arbitrary-precision floating point
          number represented as a string.
        x-nullable: true
      vat_type_id:
        type: integer
        description: Defaults to company's default VAT type or VAT type "vat_high".
        x-nullable: true
      quantity:
        type: string
        default: '1.0'
        description: Arbitrary-precision floating point number represented as a string.
        x-nullable: true
      product_id:
        type: integer
        x-nullable: true
      account_id:
        type: integer
        x-nullable: true
      account_path:
        description: When both account_path and account_id are given the latter has
          precedence.
        x-nullable: true
  Journal entry:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      description:
        type: string
        x-nullable: true
      date:
        type: date
        x-nullable: true
      lines:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              description: Read only.
              x-nullable: true
            account_id:
              type: integer
              x-nullable: true
            account_path:
              description: When both account_path and account_id are given the latter
                has precedence.
              x-nullable: true
            debit_amount:
              type: string
              description: Provide either a debit amount or a credit amount. Arbitrary-precision
                floating point number represented as a string.
              x-nullable: true
            credit_amount:
              type: string
              description: Provide either a debit amount or a credit amount. Arbitrary-precision
                floating point number represented as a string.
              x-nullable: true
  Journal entry line:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      account_id:
        type: integer
        x-nullable: true
      account_path:
        description: When both account_path and account_id are given the latter has
          precedence.
        x-nullable: true
      debit_amount:
        type: string
        description: Provide either a debit amount or a credit amount. Arbitrary-precision
          floating point number represented as a string.
        x-nullable: true
      credit_amount:
        type: string
        description: Provide either a debit amount or a credit amount. Arbitrary-precision
          floating point number represented as a string.
        x-nullable: true
  Payment:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      amount:
        type: string
        description: Paid amount in Euro. Arbitrary-precision floating point number
          represented as a string.
        x-nullable: true
      description:
        type: string
        x-nullable: true
      account_id:
        type: integer
        x-nullable: true
      account_path:
        description: When both account_path and account_id are given the latter has
          precedence.
        x-nullable: true
      paid_at:
        type: datetime
        x-nullable: true
  Product:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      number_sold:
        type: integer
        description: Read only.
        x-nullable: true
      has_stock:
        type: boolean
        description: true if a stock is kept
        default: false
        x-nullable: true
      invoice_line:
        type: object
        properties:
          id:
            type: integer
            description: Read only.
            x-nullable: true
          description:
            type: string
            description: Description of the product or service in no more than 255
              characters.
            x-nullable: true
          extended_description:
            type: string
            description: Extended description of the invoice line.
            x-nullable: true
          price_per_unit:
            type: string
            description: This property states the price with VAT excluded Arbitrary-precision
              floating point number represented as a string.
            x-nullable: true
          price_with_vat:
            type: string
            description: Arbitrary-precision floating point number represented as
              a string. Read only.
            x-nullable: true
          price_without_vat:
            type: string
            description: Arbitrary-precision floating point number represented as
              a string. Read only.
            x-nullable: true
          vat_amount:
            type: string
            description: Amount of VAT in Euro. Arbitrary-precision floating point
              number represented as a string. Read only.
            x-nullable: true
          vat_rate:
            type: string
            description: Tax rate expressed by a decimal number, e.g. "0.21" means
              21%. This property is derived from the invoice line's VAT type, unless
              that type is "custom", in which case a custom vat_rate must be provided.
              In other cases the given vat_rate is ignored. Arbitrary-precision floating
              point number represented as a string.
            x-nullable: true
          vat_type_id:
            type: integer
            description: Defaults to company's default VAT type or VAT type "vat_high".
            x-nullable: true
          quantity:
            type: string
            description: Arbitrary-precision floating point number represented as
              a string. Read only.
            x-nullable: true
          product_id:
            type: integer
            description: Read only.
            x-nullable: true
          account_id:
            type: integer
            x-nullable: true
          account_path:
            description: When both account_path and account_id are given the latter
              has precedence.
            x-nullable: true
          product_code:
            type: string
            description: Max 100 characters. If left blank a new code is automatically
              generated and assigned
            x-nullable: true
        x-nullable: true
  Product invoice line:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      description:
        type: string
        description: Description of the product or service in no more than 255 characters.
        x-nullable: true
      extended_description:
        type: string
        description: Extended description of the invoice line.
        x-nullable: true
      price_per_unit:
        type: string
        description: This property states the price with VAT excluded Arbitrary-precision
          floating point number represented as a string.
        x-nullable: true
      price_with_vat:
        type: string
        description: Arbitrary-precision floating point number represented as a string.
          Read only.
        x-nullable: true
      price_without_vat:
        type: string
        description: Arbitrary-precision floating point number represented as a string.
          Read only.
        x-nullable: true
      vat_amount:
        type: string
        description: Amount of VAT in Euro. Arbitrary-precision floating point number
          represented as a string. Read only.
        x-nullable: true
      vat_rate:
        type: string
        description: Tax rate expressed by a decimal number, e.g. "0.21" means 21%.
          This property is derived from the invoice line's VAT type, unless that type
          is "custom", in which case a custom vat_rate must be provided. In other
          cases the given vat_rate is ignored. Arbitrary-precision floating point
          number represented as a string.
        x-nullable: true
      vat_type_id:
        type: integer
        description: Defaults to company's default VAT type or VAT type "vat_high".
        x-nullable: true
      quantity:
        type: string
        description: Arbitrary-precision floating point number represented as a string.
          Read only.
        x-nullable: true
      product_id:
        type: integer
        description: Read only.
        x-nullable: true
      account_id:
        type: integer
        x-nullable: true
      account_path:
        description: When both account_path and account_id are given the latter has
          precedence.
        x-nullable: true
      product_code:
        type: string
        description: Max 100 characters. If left blank a new code is automatically
          generated and assigned
        x-nullable: true
  Quotation:
    type: object
    properties:
      contact_id:
        type: integer
        description: Note that once the invoice is published its cached contact properties
          are locked.
        x-nullable: true
      template_id:
        type: integer
        description: Leave blank to use the default invoice template.
        x-nullable: true
      invoice_number:
        type: string
        x-nullable: true
      date:
        type: date
        description: Defaults to current date.
        x-nullable: true
      creates_sign_url_on_publish:
        type: boolean
        default: false
        x-nullable: true
      id:
        type: integer
        description: Read only.
        x-nullable: true
      sign_url:
        type: string
        description: Read only.
        x-nullable: true
      status:
        type: string
        enum:
        - concept
        - imported
        - published
        - approved
        - denied
        - invoiced
        description: Read only.
        x-nullable: true
      _publish:
        type: boolean
        description: By default a quotation is created as a concept. If this trigger
          is true the quotation is immediately published. Write only.
        x-nullable: true
      _deny:
        type: boolean
        description: If this trigger is true the quotation is denied. In order to
          deny a quotation, it must first be saved and either published or approved.
          I.e. this trigger can only be used when updating a published or approved
          quotation. Write only.
        x-nullable: true
      _approve:
        type: boolean
        description: If this trigger is true the quotation is approved. In order to
          approve a quotation, it must first be saved and either published or denied.
          I.e. this trigger can only be used when updating a published or denied quotation.
          Write only.
        x-nullable: true
      invoice_lines:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              description: Read only.
              x-nullable: true
            description:
              type: string
              description: Description of the product or service in no more than 255
                characters.
              x-nullable: true
            extended_description:
              type: string
              description: Extended description of the invoice line.
              x-nullable: true
            price_per_unit:
              type: string
              description: This property states the price with VAT excluded Arbitrary-precision
                floating point number represented as a string.
              x-nullable: true
            price_with_vat:
              type: string
              description: Arbitrary-precision floating point number represented as
                a string. Read only.
              x-nullable: true
            price_without_vat:
              type: string
              description: Arbitrary-precision floating point number represented as
                a string. Read only.
              x-nullable: true
            vat_amount:
              type: string
              description: Amount of VAT in Euro. Arbitrary-precision floating point
                number represented as a string. Read only.
              x-nullable: true
            vat_rate:
              type: string
              description: Tax rate expressed by a decimal number, e.g. "0.21" means
                21%. This property is derived from the invoice line's VAT type, unless
                that type is "custom", in which case a custom vat_rate must be provided.
                In other cases the given vat_rate is ignored. Arbitrary-precision
                floating point number represented as a string.
              x-nullable: true
            vat_type_id:
              type: integer
              description: Defaults to company's default VAT type or VAT type "vat_high".
              x-nullable: true
            quantity:
              type: string
              default: '1.0'
              description: Arbitrary-precision floating point number represented as
                a string.
              x-nullable: true
            product_id:
              type: integer
              x-nullable: true
            account_id:
              type: integer
              x-nullable: true
            account_path:
              description: When both account_path and account_id are given the latter
                has precedence.
              x-nullable: true
  Quotation contact:
    type: object
    properties:
      name:
        type: string
        x-nullable: true
      contact_person_name:
        type: string
        x-nullable: true
      address:
        type: string
        x-nullable: true
      zipcode:
        type: string
        x-nullable: true
      city:
        type: string
        x-nullable: true
      country_code:
        type: string
        x-nullable: true
      contact_person_email_address:
        type: string
        x-nullable: true
      contact_number:
        type: string
        x-nullable: true
    description: |-
      Details of a quotation's contact. Subset of the Contact model. Locked when the quotation\
                              is published.
  Ride:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      departure_address:
        type: string
        x-nullable: true
      visiting_address:
        type: string
        x-nullable: true
      km_start:
        type: integer
        x-nullable: true
      km_end:
        type: integer
        x-nullable: true
      private:
        type: boolean
        x-nullable: true
      date:
        type: date
        x-nullable: true
  Sales invoice:
    type: object
    properties:
      id:
        type: integer
        description: Read only.
        x-nullable: true
      date:
        type: date
        description: Defaults to current date.
        x-nullable: true
      due_date:
        type: date
        description: If the due date is left blank it will be derived from the company's
          payment period.
        x-nullable: true
      payment_method:
        type: string
        enum:
        - pay_transfer
        - paid_cash
        - paid_pin
        - paid_already
        - pay_ideal
        - paid_sepa
        - pay_custom
        x-nullable: true
      custom_payment_instructions:
        type: string
        description: Accepts placeholders. Required if payment_method is "pay_custom".
          Omitted from responses for other payment methods.
        x-nullable: true
      pay_url:
        type: string
        description: Location that allows the debtor to pay the open amount using
          iDEAL | Wero. This property is included only if an unused pay-URL is present.
          Use the creates_pay_url_on_publish property to create a pay-URL at invoice
          publication. Read only.
        x-nullable: true
      creates_pay_url_on_publish:
        type: boolean
        description: If true an iDEAL | Wero pay-URL for the invoice's amount owed
          is attached when the invoice is published. Note that the company must have
          enabled iDEAL | Wero payments by connecting with Mollie. If iDEAL | Wero
          payments are no longer enabled at publication, no pay-URL is created. The
          property is included in responses only if it's true and before publication.
        default: false
        x-nullable: true
      description:
        type: string
        x-nullable: true
      status:
        type: string
        enum:
        - concept
        - imported
        - published
        description: Read only.
        x-nullable: true
      price_without_vat:
        type: string
        description: Arbitrary-precision floating point number represented as a string.
          Read only.
        x-nullable: true
      price_with_vat:
        type: string
        description: Arbitrary-precision floating point number represented as a string.
          Read only.
        x-nullable: true
      vat_amount:
        type: string
        description: Amount of VAT in Euro. Arbitrary-precision floating point number
          represented as a string. Read only.
        x-nullable: true
      contact_id:
        type: integer
        description: Note that once the invoice is published its cached contact properties
          are locked.
        x-nullable: true
      invoice_number:
        type: string
        description: Read only.
        x-nullable: true
      published_at:
        type: date
        description: Read only.
        x-nullable: true
      payment_status:
        type: string
        enum:
        - paid
        - unpaid
        - overpaid
        description: Read only.
        x-nullable: true
      open_amount:
        type: string
        description: Unpaid amount in Euro. Arbitrary-precision floating point number
          represented as a string. Read only.
        x-nullable: true
      currency:
        type: string
        description: Lower case 3-character ISO 4217 code. Default is Euro. For presentation
          only, bare amounts are always in Euro.
        x-nullable: true
      currency_exchange_rate:
        type: string
        description: Value of € 1,00 in the currency specified with the currency property.
          Required unless currency is Euro. Arbitrary-precision floating point number
          represented as a string.
        x-nullable: true
      _publish:
        type: boolean
        description: By default an invoice is created as a concept. If this trigger
          is true the invoice is immediately published. Previously published invoices
          cannot be published again. Write only.
        x-nullable: true
      sends_copy_by_email_on_publish:
        type: boolean
        description: If true the invoice is sent to the contact person's email address
          when it is published. The property is included in responses only if it's
          true and before publication.
        default: false
        x-nullable: true
      template_id:
        type: integer
        description: Leave blank to use the default invoice template.
        x-nullable: true
      vat_number:
        type: string
        description: A VAT number is required when any invoice line's VAT type is
          "vat_reverse_charged", or when the VAT type "vat_zero" is assigned and the
          invoice is addressed to a EU country other than the Netherlands.
        x-nullable: true
      validates_vat_number:
        type: boolean
        description: If a vat_number is given it is formatted and validated, unless
          validates_vat_number is false. This property is included only if it is false.
        default: true
        x-nullable: true
      api_reference:
        type: string
        description: Optional reference that is not exposed by other means than the
          API. Must be unique per company.
        x-nullable: true
      payment_reference:
        type: string
        description: Optional payment reference supplied by the customer
        x-nullable: true
      sale_type:
        type: string
        description: 'In case contact is outside Netherlands, you can select one of
          the options. ["supply", "service", "service_digital"], supply: Levering,
          service: Diensten, service_digital: Digitale diensten'
        x-nullable: true
      distance_sale:
        type: boolean
        description: You can pay VAT in the Netherlands up to a certain threshold
          amount and therefore choose false here
        default: false
        x-nullable: true
      contact:
        type: object
        properties:
          id:
            type: integer
            description: Read only.
            x-nullable: true
          is_individual:
            type: boolean
            description: A contact is assumed to be a company unless this is true.
            default: false
            x-nullable: true
          is_supplier:
            type: boolean
            description: A contact is assumed to be a customer unless this is true.
            default: false
            x-nullable: true
          name:
            type: string
            description: The value of company_name or contact_person if is_individual
              is false or true respectively. Read only.
            x-nullable: true
          company_name:
            type: string
            description: Required if is_individual is false.
            x-nullable: true
          contact_person_name:
            type: string
            description: Required if is_individual is true.
            x-nullable: true
          contact_person_email_address:
            type: string
            x-nullable: true
          address:
            type: string
            x-nullable: true
          zipcode:
            type: string
            x-nullable: true
          city:
            type: string
            x-nullable: true
          government_identification_number:
            type: string
            description: Het Overheidsidentificatienummer (OIN) is verplicht voor
              het uitwisselen van e-facturen met '                 ' overheidsorganisaties.
            x-nullable: true
          country_code:
            type: string
            description: ISO 3166-1 alpha-2 country code.
            x-nullable: true
          kvk_number:
            type: string
            x-nullable: true
          phone:
            type: string
            x-nullable: true
          vat_number:
            type: string
            x-nullable: true
          contact_number:
            type: string
            description: Unique reference number for your customers and/or suppliers,
              if left blank a new number is automatically generated and assigned.
            x-nullable: true
          free_1:
            type: string
            x-nullable: true
          free_2:
            type: string
            x-nullable: true
          free_3:
            type: string
            x-nullable: true
        description: 'New contact to be associated with this sales invoice. Create
          only: use the contacts endpoints to update or delete existing contacts.
          Any previous contact is dissociated, but not deleted. Note that once the
          invoice is published its cached contact properties are locked. Write only.'
        x-nullable: true
      cached_contact:
        type: object
        properties:
          name:
            type: string
            x-nullable: true
          contact_person_name:
            type: string
            x-nullable: true
          address:
            type: string
            x-nullable: true
          zipcode:
            type: string
            x-nullable: true
          city:
            type: string
            x-nullable: true
          country_code:
            type: string
            x-nullable: true
          contact_person_email_address:
            type: string
            x-nullable: true
          contact_number:
            type: string
            x-nullable: true
        description: Details of the associated contact. Subset of the Contact model.
          Locked when the invoice is published. Read only.
        x-nullable: true
      attachment_objects:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              description: Read only.
              x-nullable: true
            attachment:
              description:
                type: string
                format: string
                write_only: true
                description: Base64 encoded file
              x-nullable: true
            attachment_file_name:
              type: string
              x-nullable: true
            attachment_content_type:
              type: string
              description: Read only.
              x-nullable: true
            attachment_file_size:
              type: integer
              description: Read only.
              x-nullable: true
        description: Read only.
      invoice_lines:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              description: Read only.
              x-nullable: true
            description:
              type: string
              description: Description of the product or service in no more than 255
                characters.
              x-nullable: true
            extended_description:
              type: string
              description: Extended description of the invoice line.
              x-nullable: true
            price_per_unit:
              type: string
              description: This property states the price with VAT excluded Arbitrary-precision
                floating point number represented as a string.
              x-nullable: true
            price_with_vat:
              type: string
              description: Arbitrary-precision floating point number represented as
                a string. Read only.
              x-nullable: true
            price_without_vat:
              type: string
              description: Arbitrary-precision floating point number represented as
                a string. Read only.
              x-nullable: true
            vat_amount:
              type: string
              description: Amount of VAT in Euro. Arbitrary-precision floating point
                number represented as a string. Read only.
              x-nullable: true
            vat_rate:
              type: string
              description: Tax rate expressed by a decimal number, e.g. "0.21" means
                21%. This property is derived from the invoice line's VAT type, unless
                that type is "custom", in which case a custom vat_rate must be provided.
                In other cases the given vat_rate is ignored. Arbitrary-precision
                floating point number represented as a string.
              x-nullable: true
            vat_type_id:
              type: integer
              description: Defaults to company's default VAT type or VAT type "vat_high".
              x-nullable: true
            quantity:
              type: string
              default: '1.0'
              description: Arbitrary-precision floating point number represented as
                a string.
              x-nullable: true
            product_id:
              type: integer
              x-nullable: true
            account_id:
              type: integer
              x-nullable: true
            account_path:
              description: When both account_path and account_id are given the latter
                has precedence.
              x-nullable: true
      payments:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
              description: Read only.
              x-nullable: true
            amount:
              type: string
              description: Paid amount in Euro. Arbitrary-precision floating point
                number represented as a string.
              x-nullable: true
            description:
              type: string
              x-nullable: true
            account_id:
              type: integer
              x-nullable: true
            account_path:
              description: When both account_path and account_id are given the latter
                has precedence.
              x-nullable: true
            paid_at:
              type: datetime
              x-nullable: true
        description: 'Create only: use the payments API to update or delete existing
          payments. Requires the ''manage:payments'' scope. Write only.'
  Sales invoice contact:
    type: object
    properties:
      name:
        type: string
        x-nullable: true
      contact_person_name:
        type: string
        x-nullable: true
      address:
        type: string
        x-nullable: true
      zipcode:
        type: string
        x-nullable: true
      city:
        type: string
        x-nullable: true
      country_code:
        type: string
        x-nullable: true
      contact_person_email_address:
        type: string
        x-nullable: true
      contact_number:
        type: string
        x-nullable: true
    description: Details of a sales invoice's contact. Subset of the Contact model.
      Locked when the invoice is published.
  Template:
    type: object
    properties:
      id:
        type: integer
        x-nullable: true
      name:
        type: string
        x-nullable: true
      is_default:
        type: boolean
        x-nullable: true
  User:
    type: object
    properties:
      first_name:
        type: string
        x-nullable: true
      last_name:
        type: string
        x-nullable: true
      email:
        type: string
        x-nullable: true
  VAT type:
    type: object
    properties:
      id:
        type: integer
        x-nullable: true
      name:
        type: string
        enum:
        - vat_high
        - vat_low
        - vat_low_new
        - vat_reverse_charged
        - vat_none
        - vat_zero
        - vat_custom
        x-nullable: true
      friendly_name:
        type: string
        x-nullable: true
      value:
        type: string
        description: Tax rate expressed by a decimal number, e.g. "0.21" means 21%.
          Arbitrary-precision floating point number represented as a string.
        x-nullable: true
  Error:
    type: object
    properties:
      type:
        type: string
        enum:
        - client
        - client.authentication
        - client.authentication.invalid_token
        - client.authorization
        - client.authorization.access_denied
        - client.authorization.invalid_scope
        - client.not_found
        - client.not_found.endpoint
        - client.not_found.resource
        - client.parameters
        - client.parameters.invalid_parameter_value
        - client.parameters.malformed_json
        - client.parameters.missing_parameter
        - client.parameters.unpermitted_parameters
        - client.parameters.validation
        - client.quota_reached
        - client.rate_limit
        - client.subscription_limit_reached
        - server
      message:
        type: string
    description: Please switch on the response's status code and/or error type when
      handling errors. Error messages may change over time.
    required:
    - type
    - message
parameters:
  company_id:
    name: company_id
    in: path
    type: string
    description: Company ID.
    required: true
  page:
    name: page
    in: query
    type: integer
    description: Page number.
    default: 1
  per_page:
    name: per_page
    in: query
    type: integer
    description: Number of objects to return per page, in range of 0 to 100.
    default: 40
securityDefinitions:
  BearerTokenAuth:
    type: apiKey
    in: header
    name: Authorization
  OAuth2:
    type: oauth2
    flow: accessCode
    authorizationUrl: "/oauth/authorize"
    tokenUrl: "/oauth/token"
    scopes:
      public: fetch general information (a.o. companies, VAT types)
      manage:companies: manage companies
      manage:contacts: manage contacts
      manage:sales_invoices: manage sales invoices
      manage:payments: manage payments
      manage:products: manage products
      read:accounts: fetch account details (e.g. revenue, assets, liabilities, etc.)
      manage:journal_entries: manage journal entries
      read:me: fetch user details (a.o. name, email address)
      manage:hours: manage hours
      manage:rides: manage rides
      manage:expenses: manage expenses
      manage:quotations: manage quotations
security:
- BearerTokenAuth: []
- OAuth2: []
paths:
  "/api/v1/companies/{company_id}/rides":
    parameters:
    - "$ref": "#/parameters/company_id"
    get:
      summary: list rides
      tags:
      - Rides
      parameters:
      - name: selection
        in: query
        type: string
        enum:
        - all
        - business
        default: all
        description: Name of selection filter to apply.
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              rides:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    departure_address:
                      type: string
                      x-nullable: true
                    visiting_address:
                      type: string
                      x-nullable: true
                    km_start:
                      type: integer
                      x-nullable: true
                    km_end:
                      type: integer
                      x-nullable: true
                    private:
                      type: boolean
                      x-nullable: true
                    date:
                      type: date
                      x-nullable: true
                  required:
                  - id
                  - departure_address
                  - visiting_address
                  - km_start
                  - km_end
                  - private
                  - date
            required:
            - rides
          examples:
            application/json:
              rides:
              - id: 708176756
                departure_address: Alkmaar
                visiting_address: Utrecht
                km_start: 0
                km_end: 100
                private:
                date: '2024-03-02'
    post:
      summary: create ride
      tags:
      - Rides
      parameters:
      - name: ride
        in: body
        schema:
          type: object
          properties:
            ride:
              type: object
              properties:
                departure_address:
                  type: string
                  x-nullable: true
                visiting_address:
                  type: string
                  x-nullable: true
                km_start:
                  type: integer
                  x-nullable: true
                km_end:
                  type: integer
                  x-nullable: true
                private:
                  type: boolean
                  x-nullable: true
                date:
                  type: date
                  x-nullable: true
          required:
          - ride
          example:
            ride:
              departure_address: Alkmaar
              visiting_address: Utrecht
              km_start: 0
              km_end: 100
              private:
              date: '2024-03-02'
        required: true
      responses:
        '201':
          description: successful
          schema:
            type: object
            properties:
              ride:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  departure_address:
                    type: string
                    x-nullable: true
                  visiting_address:
                    type: string
                    x-nullable: true
                  km_start:
                    type: integer
                    x-nullable: true
                  km_end:
                    type: integer
                    x-nullable: true
                  private:
                    type: boolean
                    x-nullable: true
                  date:
                    type: date
                    x-nullable: true
                required:
                - id
                - departure_address
                - visiting_address
                - km_start
                - km_end
                - private
                - date
            required:
            - ride
          examples:
            application/json:
              ride:
                id: 681363806
                departure_address: Alkmaar
                visiting_address: Utrecht
                km_start: 0
                km_end: 100
                private:
                date: '2024-03-02'
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Rit is invalid: Date moet opgegeven zijn. Eindstand teller
                  is geen getal. Eindstand teller moet opgegeven zijn.'
                type: client.parameters.validation
  "/api/v1/companies/{company_id}/rides/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: Ride ID
      required: true
    delete:
      summary: delete ride
      tags:
      - Rides
      responses:
        '204':
          description: successful
    patch:
      summary: update ride
      tags:
      - Rides
      parameters:
      - name: ride
        in: body
        schema:
          type: object
          properties:
            ride:
              type: object
              properties:
                departure_address:
                  type: string
                  x-nullable: true
                visiting_address:
                  type: string
                  x-nullable: true
                km_start:
                  type: integer
                  x-nullable: true
                km_end:
                  type: integer
                  x-nullable: true
                private:
                  type: boolean
                  x-nullable: true
                date:
                  type: date
                  x-nullable: true
          required:
          - ride
          example:
            ride:
              km_end: 345
        required: true
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              ride:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  departure_address:
                    type: string
                    x-nullable: true
                  visiting_address:
                    type: string
                    x-nullable: true
                  km_start:
                    type: integer
                    x-nullable: true
                  km_end:
                    type: integer
                    x-nullable: true
                  private:
                    type: boolean
                    x-nullable: true
                  date:
                    type: date
                    x-nullable: true
                required:
                - id
                - departure_address
                - visiting_address
                - km_start
                - km_end
                - private
                - date
            required:
            - ride
          examples:
            application/json:
              ride:
                id: 775036437
                departure_address: Alkmaar
                visiting_address: Utrecht
                km_start: 0
                km_end: 345
                private:
                date: '2024-03-02'
    get:
      summary: show ride
      tags:
      - Rides
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              ride:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  departure_address:
                    type: string
                    x-nullable: true
                  visiting_address:
                    type: string
                    x-nullable: true
                  km_start:
                    type: integer
                    x-nullable: true
                  km_end:
                    type: integer
                    x-nullable: true
                  private:
                    type: boolean
                    x-nullable: true
                  date:
                    type: date
                    x-nullable: true
                required:
                - id
                - departure_address
                - visiting_address
                - km_start
                - km_end
                - private
                - date
            required:
            - ride
          examples:
            application/json:
              ride:
                id: 795774434
                departure_address: Alkmaar
                visiting_address: Utrecht
                km_start: 0
                km_end: 100
                private:
                date: '2024-03-02'
  "/api/v1/companies/{company_id}/vat_types":
    parameters:
    - "$ref": "#/parameters/company_id"
    get:
      summary: list vat types
      tags:
      - VAT types
      parameters:
      - name: selection
        in: query
        type: string
        enum:
        - all
        default: all
        description: Name of selection filter to apply.
      - name: since
        in: query
        type: string
        format: date
        description: List all VAT types known since this date. ISO 8601 formatted,
          e.g. "2016-01-31". Defaults to current date.
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              vat_types:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      x-nullable: true
                    name:
                      type: string
                      enum:
                      - vat_high
                      - vat_low
                      - vat_low_new
                      - vat_reverse_charged
                      - vat_none
                      - vat_zero
                      - vat_custom
                      x-nullable: true
                    friendly_name:
                      type: string
                      x-nullable: true
                    value:
                      type: string
                      description: Tax rate expressed by a decimal number, e.g. "0.21"
                        means 21%. Arbitrary-precision floating point number represented
                        as a string.
                      x-nullable: true
                  required:
                  - id
                  - name
                  - friendly_name
                  - value
            required:
            - vat_types
          examples:
            application/json:
              vat_types:
              - id: 748551423
                name: vat_high
                friendly_name: hoog
                value: '0.21'
              - id: 768107468
                name: vat_low_new
                friendly_name: laag
                value: '0.09'
              - id: 755290841
                name: vat_zero
                friendly_name: 0%
                value: '0.0'
  "/api/v1/companies/{company_id}/vat_types/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: id
      required: true
    get:
      summary: show vat type
      tags:
      - VAT types
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              vat_type:
                type: object
                properties:
                  id:
                    type: integer
                    x-nullable: true
                  name:
                    type: string
                    enum:
                    - vat_high
                    - vat_low
                    - vat_low_new
                    - vat_reverse_charged
                    - vat_none
                    - vat_zero
                    - vat_custom
                    x-nullable: true
                  friendly_name:
                    type: string
                    x-nullable: true
                  value:
                    type: string
                    description: Tax rate expressed by a decimal number, e.g. "0.21"
                      means 21%. Arbitrary-precision floating point number represented
                      as a string.
                    x-nullable: true
                required:
                - id
                - name
                - friendly_name
                - value
            required:
            - vat_type
          examples:
            application/json:
              vat_type:
                id: 573784502
                name: vat_high
                friendly_name: hoog
                value: '0.21'
  "/api/v1/companies/{company_id}/accounts/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: id
      required: true
    get:
      summary: show account
      tags:
      - Accounts
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              account:
                type: object
                properties:
                  id:
                    type: integer
                    x-nullable: true
                  name:
                    type: string
                    x-nullable: true
                  path_name:
                    type: string
                    x-nullable: true
                  path:
                    type: string
                    x-nullable: true
                  reference:
                    type: string
                    x-nullable: true
                  type:
                    type: string
                    x-nullable: true
                  parent_id:
                    type: integer
                    description: ID of this account's parent account
                    x-nullable: true
                required:
                - id
                - name
                - path_name
                - path
                - reference
                - type
                - parent_id
            required:
            - account
          examples:
            application/json:
              account:
                id: 708176756
                name: Activa
                path_name: Activa
                path: activa
                reference: B1
                type: balance
                parent_id:
  "/api/v1/companies/{company_id}/accounts":
    parameters:
    - "$ref": "#/parameters/company_id"
    get:
      summary: list accounts
      tags:
      - Accounts
      parameters:
      - name: selection
        in: query
        type: string
        enum:
        - all
        - ledger
        - payment
        - revenue
        - costs
        default: all
        description: Name of selection filter to apply.
        required: true
      - name: search[paths]
        in: query
        type: array
        items:
          type: string
        description: 'Selects accounts by one or more paths. Usage: search[paths][]=activa.current_assets.liquid_assets.bank&search[paths][]=activa.current_assets.liquid_assets.cash
          etc.'
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              accounts:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      x-nullable: true
                    name:
                      type: string
                      x-nullable: true
                    path_name:
                      type: string
                      x-nullable: true
                    path:
                      type: string
                      x-nullable: true
                    reference:
                      type: string
                      x-nullable: true
                    type:
                      type: string
                      x-nullable: true
                    parent_id:
                      type: integer
                      description: ID of this account's parent account
                      x-nullable: true
                  required:
                  - id
                  - name
                  - path_name
                  - path
                  - reference
                  - type
                  - parent_id
            required:
            - accounts
          examples:
            application/json:
              accounts:
              - id: 1045968809
                name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend): btw verlegd
                  van buiten de EU'
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw verlegd van buiten de EU'
                path: vat_reverse_charged_revenue_outside_eu
                reference: H6
                type:
                parent_id:
              - id: 959299804
                name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend): btw verlegd
                  vanuit de EU'
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw verlegd vanuit de EU'
                path: vat_reverse_charged_revenue_in_eu
                reference: H5
                type:
                parent_id:
              - id: 972116431
                name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend): btw verlegd'
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw verlegd'
                path: vat_reverse_charged_revenue
                reference: H4
                type:
                parent_id:
              - id: 952296178
                name: Btw verlegd
                path_name: 'Hulprekening: btw buiten EU • Btw verlegd'
                path: vat_to_pay_revenue_outside_eu.vat_reverse_charged
                reference: H3.5
                type:
                parent_id: 616939345
              - id: 999715813
                name: Btw vrijgesteld
                path_name: 'Hulprekening: btw buiten EU • Btw vrijgesteld'
                path: vat_to_pay_revenue_outside_eu.vat_none
                reference: H3.4
                type:
                parent_id: 616939345
              - id: 979045384
                name: Btw 0%
                path_name: 'Hulprekening: btw buiten EU • Btw 0%'
                path: vat_to_pay_revenue_outside_eu.vat_zero
                reference: H3.3
                type:
                parent_id: 616939345
              - id: 623680827
                name: Btw laag oud (6%)
                path_name: 'Hulprekening: btw buiten EU • Btw laag oud (6%)'
                path: vat_to_pay_revenue_outside_eu.vat_low
                reference: H3.2
                type:
                parent_id: 616939345
              - id: 636497454
                name: Btw hoog
                path_name: 'Hulprekening: btw buiten EU • Btw hoog'
                path: vat_to_pay_revenue_outside_eu.vat_high
                reference: H3.1
                type:
                parent_id: 616939345
              - id: 616939345
                name: 'Hulprekening: btw buiten EU'
                path_name: 'Hulprekening: btw buiten EU'
                path: vat_to_pay_revenue_outside_eu
                reference: H3
                type:
                parent_id:
              - id: 663308356
                name: Btw verlegd
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  Leveringen / diensten naar landen in de EU • Btw verlegd'
                path: vat_to_pay_revenue_reverse_charged_in_eu.vat_reverse_charged
                reference: H2.5
                type:
                parent_id: 596124835
              - id: 643488119
                name: Btw vrijgesteld
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  Leveringen / diensten naar landen in de EU • Btw vrijgesteld'
                path: vat_to_pay_revenue_reverse_charged_in_eu.vat_none
                reference: H2.4
                type:
                parent_id: 596124835
              - id: 556689818
                name: Btw 0%
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  Leveringen / diensten naar landen in de EU • Btw 0%'
                path: vat_to_pay_revenue_reverse_charged_in_eu.vat_zero
                reference: H2.3
                type:
                parent_id: 596124835
              - id: 569637517
                name: Btw laag
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  Leveringen / diensten naar landen in de EU • Btw laag'
                path: vat_to_pay_revenue_reverse_charged_in_eu.vat_low_new
                reference: H2.2
                type:
                parent_id: 596124835
              - id: 549751728
                name: Btw hoog
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  Leveringen / diensten naar landen in de EU • Btw hoog'
                path: vat_to_pay_revenue_reverse_charged_in_eu.vat_high
                reference: H2.1
                type:
                parent_id: 596124835
              - id: 596124835
                name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend): Leveringen
                  / diensten naar landen in de EU'
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  Leveringen / diensten naar landen in de EU'
                path: vat_to_pay_revenue_reverse_charged_in_eu
                reference: H2
                type:
                parent_id:
              - id: 576566742
                name: Privégebruik btw
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw af te dragen • Privégebruik btw'
                path: vat_to_pay_revenue.vat_private_use
                reference: H1.6
                type:
                parent_id: 689967960
              - id: 757155577
                name: Btw verlegd
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw af te dragen • Btw verlegd'
                path: vat_to_pay_revenue.vat_reverse_charged
                reference: H1.5
                type:
                parent_id: 689967960
              - id: 770889708
                name: Btw vrijgesteld
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw af te dragen • Btw vrijgesteld'
                path: vat_to_pay_revenue.vat_none
                reference: H1.4
                type:
                parent_id: 689967960
              - id: 751198239
                name: Btw 0%
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw af te dragen • Btw 0%'
                path: vat_to_pay_revenue.vat_zero
                reference: H1.3
                type:
                parent_id: 689967960
              - id: 797700354
                name: Btw laag
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw af te dragen • Btw laag'
                path: vat_to_pay_revenue.vat_low_new
                reference: H1.2
                type:
                parent_id: 689967960
              - id: 777814581
                name: Btw hoog
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw af te dragen • Btw hoog'
                path: vat_to_pay_revenue.vat_high
                reference: H1.1
                type:
                parent_id: 689967960
              - id: 689967960
                name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend): btw af
                  te dragen'
                path_name: 'Hulp (Bedrag waarover omzetbelasting wordt berekend):
                  btw af te dragen'
                path: vat_to_pay_revenue
                reference: H1
                type:
                parent_id:
              - id: 703966283
                name: Betalingsverschillen
                path_name: Omzet • Betalingsverschillen
                path: profit.revenue.payment_differences
                reference: P2.2
                type: revenue
                parent_id: 730517089
              - id: 683228542
                name: Overig
                path_name: Omzet • Overig
                path: profit.revenue.other
                reference: P2.1
                type: revenue
                parent_id: 730517089
              - id: 730517089
                name: Omzet
                path_name: Omzet
                path: profit.revenue
                reference: P2
                type: revenue
                parent_id: 1086206136
              - id: 710827668
                name: Betalingsverschillen
                path_name: Kosten • Betalingsverschillen
                path: profit.costs.payment_differences
                reference: P1.10
                type: costs
                parent_id: 1105897365
              - id: 1428418439
                name: Rente
                path_name: Kosten • Rente
                path: profit.costs.interest_costs
                reference: P1.9
                type: costs
                parent_id: 1105897365
              - id: 1442281642
                name: Werk door derden
                path_name: Kosten • Werk door derden
                path: profit.costs.third_parties_work
                reference: P1.8
                type: costs
                parent_id: 1105897365
              - id: 1421347293
                name: Inkoop voorraad
                path_name: Kosten • Inkoop voorraad
                path: profit.costs.purchased_stock
                reference: P1.7
                type: costs
                parent_id: 1105897365
              - id: 1468897984
                name: Afschrijvingen
                path_name: Kosten • Afschrijvingen
                path: profit.costs.depreciations
                reference: P1.6
                type: costs
                parent_id: 1105897365
              - id: 1448160243
                name: Diversen
                path_name: Kosten • Overige kosten • Diversen
                path: profit.costs.other_costs.misc
                reference: P1.5.8
                type: costs
                parent_id: 1555739291
              - id: 1361233126
                name: Werkkleding
                path_name: Kosten • Overige kosten • Werkkleding
                path: profit.costs.other_costs.work_clothes
                reference: P1.5.7
                type: costs
                parent_id: 1555739291
              - id: 1375098121
                name: Kantoorartikelen
                path_name: Kosten • Overige kosten • Kantoorartikelen
                path: profit.costs.other_costs.office_materials
                reference: P1.5.6
                type: costs
                parent_id: 1555739291
              - id: 1354491452
                name: Abonnementen
                path_name: Kosten • Overige kosten • Abonnementen
                path: profit.costs.other_costs.subscriptions
                reference: P1.5.5
                type: costs
                parent_id: 1555739291
              - id: 1401911087
                name: Opleiding
                path_name: Kosten • Overige kosten • Opleiding
                path: profit.costs.other_costs.education
                reference: P1.5.4
                type: costs
                parent_id: 1555739291
              - id: 1380974674
                name: Vakliteratuur
                path_name: Kosten • Overige kosten • Vakliteratuur
                path: profit.costs.other_costs.literature
                reference: P1.5.3
                type: costs
                parent_id: 1555739291
              - id: 1562743109
                name: Administratiekosten
                path_name: Kosten • Overige kosten • Administratiekosten
                path: profit.costs.other_costs.administration
                reference: P1.5.2
                type: costs
                parent_id: 1555739291
              - id: 1575559784
                name: Telefoon &amp; internet
                path_name: Kosten • Overige kosten • Telefoon &amp; internet
                path: profit.costs.other_costs.phone_internet
                reference: P1.5.1
                type: costs
                parent_id: 1555739291
              - id: 1555739291
                name: Overige kosten
                path_name: Kosten • Overige kosten
                path: profit.costs.other_costs
                reference: P1.5
                type: costs
                parent_id: 1105897365
              - id: 1603158926
                name: Relatiegeschenken
                path_name: Kosten • Verkoopkosten • Relatiegeschenken
                path: profit.costs.selling.promotional_gifts
                reference: P1.4.3
                type: costs
                parent_id: 1508441815
  "/api/v1/me":
    get:
      summary: show token owner's credentials
      tags:
      - Credentials
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              me:
                type: object
                properties:
                  first_name:
                    type: string
                    x-nullable: true
                  last_name:
                    type: string
                    x-nullable: true
                  email:
                    type: string
                    x-nullable: true
                required:
                - first_name
                - last_name
                - email
            required:
            - me
          examples:
            application/json:
              me:
                first_name: Rob S.
                last_name: Lomp
                email: rob11@example.org
  "/api/v1/companies/{company_id}/products":
    parameters:
    - "$ref": "#/parameters/company_id"
    post:
      summary: create product
      tags:
      - Products
      parameters:
      - name: product
        in: body
        schema:
          type: object
          properties:
            product:
              type: object
              properties:
                has_stock:
                  type: boolean
                  description: true if a stock is kept
                  default: false
                  x-nullable: true
                invoice_line:
                  type: object
                  properties:
                    description:
                      type: string
                      description: Description of the product or service in no more
                        than 255 characters.
                      x-nullable: true
                    extended_description:
                      type: string
                      description: Extended description of the invoice line.
                      x-nullable: true
                    price_per_unit:
                      type: string
                      description: This property states the price with VAT excluded
                        Arbitrary-precision floating point number represented as a
                        string.
                      x-nullable: true
                    vat_rate:
                      type: string
                      description: Tax rate expressed by a decimal number, e.g. "0.21"
                        means 21%. This property is derived from the invoice line's
                        VAT type, unless that type is "custom", in which case a custom
                        vat_rate must be provided. In other cases the given vat_rate
                        is ignored. Arbitrary-precision floating point number represented
                        as a string.
                      x-nullable: true
                    vat_type_id:
                      type: integer
                      description: Defaults to company's default VAT type or VAT type
                        "vat_high".
                      x-nullable: true
                    account_id:
                      type: integer
                      x-nullable: true
                    account_path:
                      description: When both account_path and account_id are given
                        the latter has precedence.
                      x-nullable: true
                    product_code:
                      type: string
                      description: Max 100 characters. If left blank a new code is
                        automatically generated and assigned
                      x-nullable: true
                  x-nullable: true
          required:
          - product
          example:
            product:
              has_stock: true
              invoice_line:
                description: Machine
                extended_description:
                price_per_unit: '1895.0'
                vat_rate:
                vat_type_id: 708176756
                account_id:
                account_path:
                product_code: P4
        required: true
      responses:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Product is invalid: Stuksprijs moet opgegeven zijn.'
                type: client.parameters.validation
        '201':
          description: successful
          schema:
            type: object
            properties:
              product:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  number_sold:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  has_stock:
                    type: boolean
                    description: true if a stock is kept
                    default: false
                    x-nullable: true
                  invoice_line:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Read only.
                        x-nullable: true
                      description:
                        type: string
                        description: Description of the product or service in no more
                          than 255 characters.
                        x-nullable: true
                      extended_description:
                        type: string
                        description: Extended description of the invoice line.
                        x-nullable: true
                      price_per_unit:
                        type: string
                        description: This property states the price with VAT excluded
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      price_with_vat:
                        type: string
                        description: Arbitrary-precision floating point number represented
                          as a string. Read only.
                        x-nullable: true
                      price_without_vat:
                        type: string
                        description: Arbitrary-precision floating point number represented
                          as a string. Read only.
                        x-nullable: true
                      vat_amount:
                        type: string
                        description: Amount of VAT in Euro. Arbitrary-precision floating
                          point number represented as a string. Read only.
                        x-nullable: true
                      vat_rate:
                        type: string
                        description: Tax rate expressed by a decimal number, e.g.
                          "0.21" means 21%. This property is derived from the invoice
                          line's VAT type, unless that type is "custom", in which
                          case a custom vat_rate must be provided. In other cases
                          the given vat_rate is ignored. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      vat_type_id:
                        type: integer
                        description: Defaults to company's default VAT type or VAT
                          type "vat_high".
                        x-nullable: true
                      quantity:
                        type: string
                        description: Arbitrary-precision floating point number represented
                          as a string. Read only.
                        x-nullable: true
                      product_id:
                        type: integer
                        description: Read only.
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
                      product_code:
                        type: string
                        description: Max 100 characters. If left blank a new code
                          is automatically generated and assigned
                        x-nullable: true
                    required:
                    - id
                    - description
                    - extended_description
                    - price_per_unit
                    - price_with_vat
                    - price_without_vat
                    - vat_amount
                    - vat_rate
                    - vat_type_id
                    - quantity
                    - product_id
                    - account_id
                    - account_path
                    - product_code
                    x-nullable: true
                required:
                - id
                - number_sold
                - has_stock
                - invoice_line
            required:
            - product
          examples:
            application/json:
              product:
                id: 681363806
                number_sold: 0
                has_stock: true
                invoice_line:
                  id: 681363806
                  description: Machine
                  extended_description:
                  price_per_unit: '1895.0'
                  price_with_vat: '2292.95'
                  price_without_vat: '1895.0'
                  vat_amount: '397.95'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
                  product_code: P4
    get:
      summary: list products
      tags:
      - Products
      parameters:
      - name: selection
        in: query
        type: string
        enum:
        - all
        default: all
        description: Name of selection filter to apply.
      - name: search[q]
        in: query
        type: string
        description: 'Query is matched against: invoice_line.product_code, invoice_line.description
          and product category name.'
      - name: search[product_codes][]
        in: query
        type: array
        collectionFormat: multi
        items:
          type: string
        description: 'Selects products with a matching invoice_line.product_code.
          Usage: search[product_codes][]=p001&search[product_codes][]=p002, etc.'
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              products:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    number_sold:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    has_stock:
                      type: boolean
                      description: true if a stock is kept
                      default: false
                      x-nullable: true
                    invoice_line:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        product_id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                        product_code:
                          type: string
                          description: Max 100 characters. If left blank a new code
                            is automatically generated and assigned
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                      - product_code
                      x-nullable: true
                  required:
                  - id
                  - number_sold
                  - has_stock
                  - invoice_line
            required:
            - products
          examples:
            application/json:
              products:
              - id: 701184043
                number_sold: 42
                has_stock: true
                invoice_line:
                  id: 701184043
                  description: Machine
                  extended_description:
                  price_per_unit: '1895.0'
                  price_with_vat: '2292.95'
                  price_without_vat: '1895.0'
                  vat_amount: '397.95'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
                  product_code: P5
  "/api/v1/companies/{company_id}/products/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: Product ID
      required: true
    patch:
      summary: update product
      tags:
      - Products
      parameters:
      - name: product
        in: body
        schema:
          type: object
          properties:
            product:
              type: object
              properties:
                has_stock:
                  type: boolean
                  description: true if a stock is kept
                  default: false
                  x-nullable: true
                invoice_line:
                  type: object
                  properties:
                    description:
                      type: string
                      description: Description of the product or service in no more
                        than 255 characters.
                      x-nullable: true
                    extended_description:
                      type: string
                      description: Extended description of the invoice line.
                      x-nullable: true
                    price_per_unit:
                      type: string
                      description: This property states the price with VAT excluded
                        Arbitrary-precision floating point number represented as a
                        string.
                      x-nullable: true
                    vat_rate:
                      type: string
                      description: Tax rate expressed by a decimal number, e.g. "0.21"
                        means 21%. This property is derived from the invoice line's
                        VAT type, unless that type is "custom", in which case a custom
                        vat_rate must be provided. In other cases the given vat_rate
                        is ignored. Arbitrary-precision floating point number represented
                        as a string.
                      x-nullable: true
                    vat_type_id:
                      type: integer
                      description: Defaults to company's default VAT type or VAT type
                        "vat_high".
                      x-nullable: true
                    account_id:
                      type: integer
                      x-nullable: true
                    account_path:
                      description: When both account_path and account_id are given
                        the latter has precedence.
                      x-nullable: true
                    product_code:
                      type: string
                      description: Max 100 characters. If left blank a new code is
                        automatically generated and assigned
                      x-nullable: true
                  x-nullable: true
          required:
          - product
          example:
            product:
              has_stock: true
              invoice_line:
                price_per_unit: '1995.00'
        required: true
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              product:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  number_sold:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  has_stock:
                    type: boolean
                    description: true if a stock is kept
                    default: false
                    x-nullable: true
                  invoice_line:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Read only.
                        x-nullable: true
                      description:
                        type: string
                        description: Description of the product or service in no more
                          than 255 characters.
                        x-nullable: true
                      extended_description:
                        type: string
                        description: Extended description of the invoice line.
                        x-nullable: true
                      price_per_unit:
                        type: string
                        description: This property states the price with VAT excluded
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      price_with_vat:
                        type: string
                        description: Arbitrary-precision floating point number represented
                          as a string. Read only.
                        x-nullable: true
                      price_without_vat:
                        type: string
                        description: Arbitrary-precision floating point number represented
                          as a string. Read only.
                        x-nullable: true
                      vat_amount:
                        type: string
                        description: Amount of VAT in Euro. Arbitrary-precision floating
                          point number represented as a string. Read only.
                        x-nullable: true
                      vat_rate:
                        type: string
                        description: Tax rate expressed by a decimal number, e.g.
                          "0.21" means 21%. This property is derived from the invoice
                          line's VAT type, unless that type is "custom", in which
                          case a custom vat_rate must be provided. In other cases
                          the given vat_rate is ignored. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      vat_type_id:
                        type: integer
                        description: Defaults to company's default VAT type or VAT
                          type "vat_high".
                        x-nullable: true
                      quantity:
                        type: string
                        description: Arbitrary-precision floating point number represented
                          as a string. Read only.
                        x-nullable: true
                      product_id:
                        type: integer
                        description: Read only.
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
                      product_code:
                        type: string
                        description: Max 100 characters. If left blank a new code
                          is automatically generated and assigned
                        x-nullable: true
                    required:
                    - id
                    - description
                    - extended_description
                    - price_per_unit
                    - price_with_vat
                    - price_without_vat
                    - vat_amount
                    - vat_rate
                    - vat_type_id
                    - quantity
                    - product_id
                    - account_id
                    - account_path
                    - product_code
                    x-nullable: true
                required:
                - id
                - number_sold
                - has_stock
                - invoice_line
            required:
            - product
          examples:
            application/json:
              product:
                id: 688369464
                number_sold: 42
                has_stock: true
                invoice_line:
                  id: 688369464
                  description: Machine
                  extended_description:
                  price_per_unit: '1995.0'
                  price_with_vat: '2413.95'
                  price_without_vat: '1995.0'
                  vat_amount: '418.95'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
                  product_code: P7
    get:
      summary: show product
      tags:
      - Products
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              product:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  number_sold:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  has_stock:
                    type: boolean
                    description: true if a stock is kept
                    default: false
                    x-nullable: true
                  invoice_line:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Read only.
                        x-nullable: true
                      description:
                        type: string
                        description: Description of the product or service in no more
                          than 255 characters.
                        x-nullable: true
                      extended_description:
                        type: string
                        description: Extended description of the invoice line.
                        x-nullable: true
                      price_per_unit:
                        type: string
                        description: This property states the price with VAT excluded
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      price_with_vat:
                        type: string
                        description: Arbitrary-precision floating point number represented
                          as a string. Read only.
                        x-nullable: true
                      price_without_vat:
                        type: string
                        description: Arbitrary-precision floating point number represented
                          as a string. Read only.
                        x-nullable: true
                      vat_amount:
                        type: string
                        description: Amount of VAT in Euro. Arbitrary-precision floating
                          point number represented as a string. Read only.
                        x-nullable: true
                      vat_rate:
                        type: string
                        description: Tax rate expressed by a decimal number, e.g.
                          "0.21" means 21%. This property is derived from the invoice
                          line's VAT type, unless that type is "custom", in which
                          case a custom vat_rate must be provided. In other cases
                          the given vat_rate is ignored. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      vat_type_id:
                        type: integer
                        description: Defaults to company's default VAT type or VAT
                          type "vat_high".
                        x-nullable: true
                      quantity:
                        type: string
                        description: Arbitrary-precision floating point number represented
                          as a string. Read only.
                        x-nullable: true
                      product_id:
                        type: integer
                        description: Read only.
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
                      product_code:
                        type: string
                        description: Max 100 characters. If left blank a new code
                          is automatically generated and assigned
                        x-nullable: true
                    required:
                    - id
                    - description
                    - extended_description
                    - price_per_unit
                    - price_with_vat
                    - price_without_vat
                    - vat_amount
                    - vat_rate
                    - vat_type_id
                    - quantity
                    - product_id
                    - account_id
                    - account_path
                    - product_code
                    x-nullable: true
                required:
                - id
                - number_sold
                - has_stock
                - invoice_line
            required:
            - product
          examples:
            application/json:
              product:
                id: 775036437
                number_sold: 42
                has_stock: true
                invoice_line:
                  id: 775036437
                  description: Machine
                  extended_description:
                  price_per_unit: '1895.0'
                  price_with_vat: '2292.95'
                  price_without_vat: '1895.0'
                  vat_amount: '397.95'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
                  product_code: P9
    delete:
      summary: delete product
      tags:
      - Products
      responses:
        '204':
          description: successful
  "/api/v1/companies/{company_id}/contacts/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: id
      required: true
    delete:
      summary: delete contact
      tags:
      - Contacts
      responses:
        '204':
          description: successful
    patch:
      summary: update contact
      tags:
      - Contacts
      parameters:
      - name: contact
        in: body
        schema:
          type: object
          properties:
            contact:
              type: object
              properties:
                is_individual:
                  type: boolean
                  description: A contact is assumed to be a company unless this is
                    true.
                  default: false
                  x-nullable: true
                is_supplier:
                  type: boolean
                  description: A contact is assumed to be a customer unless this is
                    true.
                  default: false
                  x-nullable: true
                company_name:
                  type: string
                  description: Required if is_individual is false.
                  x-nullable: true
                contact_person_name:
                  type: string
                  description: Required if is_individual is true.
                  x-nullable: true
                contact_person_email_address:
                  type: string
                  x-nullable: true
                address:
                  type: string
                  x-nullable: true
                zipcode:
                  type: string
                  x-nullable: true
                city:
                  type: string
                  x-nullable: true
                government_identification_number:
                  type: string
                  description: Het Overheidsidentificatienummer (OIN) is verplicht
                    voor het uitwisselen van e-facturen met '                 ' overheidsorganisaties.
                  x-nullable: true
                country_code:
                  type: string
                  description: ISO 3166-1 alpha-2 country code.
                  x-nullable: true
                kvk_number:
                  type: string
                  x-nullable: true
                phone:
                  type: string
                  x-nullable: true
                vat_number:
                  type: string
                  x-nullable: true
                contact_number:
                  type: string
                  description: Unique reference number for your customers and/or suppliers,
                    if left blank a new number is automatically generated and assigned.
                  x-nullable: true
                free_1:
                  type: string
                  x-nullable: true
                free_2:
                  type: string
                  x-nullable: true
                free_3:
                  type: string
                  x-nullable: true
              description: Suppliers and customers.
          required:
          - contact
          example:
            contact:
              company_name: Rompslomp.nl B.V.
        required: true
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              contact:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  is_individual:
                    type: boolean
                    description: A contact is assumed to be a company unless this
                      is true.
                    default: false
                    x-nullable: true
                  is_supplier:
                    type: boolean
                    description: A contact is assumed to be a customer unless this
                      is true.
                    default: false
                    x-nullable: true
                  name:
                    type: string
                    description: The value of company_name or contact_person if is_individual
                      is false or true respectively. Read only.
                    x-nullable: true
                  company_name:
                    type: string
                    description: Required if is_individual is false.
                    x-nullable: true
                  contact_person_name:
                    type: string
                    description: Required if is_individual is true.
                    x-nullable: true
                  contact_person_email_address:
                    type: string
                    x-nullable: true
                  address:
                    type: string
                    x-nullable: true
                  zipcode:
                    type: string
                    x-nullable: true
                  city:
                    type: string
                    x-nullable: true
                  government_identification_number:
                    type: string
                    description: Het Overheidsidentificatienummer (OIN) is verplicht
                      voor het uitwisselen van e-facturen met '                 '
                      overheidsorganisaties.
                    x-nullable: true
                  country_code:
                    type: string
                    description: ISO 3166-1 alpha-2 country code.
                    x-nullable: true
                  kvk_number:
                    type: string
                    x-nullable: true
                  phone:
                    type: string
                    x-nullable: true
                  vat_number:
                    type: string
                    x-nullable: true
                  contact_number:
                    type: string
                    description: Unique reference number for your customers and/or
                      suppliers, if left blank a new number is automatically generated
                      and assigned.
                    x-nullable: true
                  free_1:
                    type: string
                    x-nullable: true
                  free_2:
                    type: string
                    x-nullable: true
                  free_3:
                    type: string
                    x-nullable: true
                required:
                - id
                - is_individual
                - is_supplier
                - name
                - company_name
                - contact_person_name
                - contact_person_email_address
                - address
                - zipcode
                - city
                - government_identification_number
                - country_code
                - kvk_number
                - phone
                - vat_number
                - contact_number
                - free_1
                - free_2
                - free_3
                description: Suppliers and customers.
            required:
            - contact
          examples:
            application/json:
              contact:
                id: 727734849
                is_individual: false
                is_supplier: false
                name: Rompslomp.nl B.V.
                company_name: Rompslomp.nl B.V.
                contact_person_name: Rob S. Lomp
                contact_person_email_address: rob@example.org
                address: Grebbeberglaan 15
                zipcode: 3527 VX
                city: Utrecht
                government_identification_number:
                country_code: NL
                kvk_number: '12345678'
                phone:
                vat_number: NL123456789B01
                contact_number: K00001
                free_1:
                free_2:
                free_3:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Contact is invalid: Company name moet opgegeven zijn.'
                type: client.parameters.validation
    get:
      summary: show contact
      tags:
      - Contacts
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              contact:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  is_individual:
                    type: boolean
                    description: A contact is assumed to be a company unless this
                      is true.
                    default: false
                    x-nullable: true
                  is_supplier:
                    type: boolean
                    description: A contact is assumed to be a customer unless this
                      is true.
                    default: false
                    x-nullable: true
                  name:
                    type: string
                    description: The value of company_name or contact_person if is_individual
                      is false or true respectively. Read only.
                    x-nullable: true
                  company_name:
                    type: string
                    description: Required if is_individual is false.
                    x-nullable: true
                  contact_person_name:
                    type: string
                    description: Required if is_individual is true.
                    x-nullable: true
                  contact_person_email_address:
                    type: string
                    x-nullable: true
                  address:
                    type: string
                    x-nullable: true
                  zipcode:
                    type: string
                    x-nullable: true
                  city:
                    type: string
                    x-nullable: true
                  government_identification_number:
                    type: string
                    description: Het Overheidsidentificatienummer (OIN) is verplicht
                      voor het uitwisselen van e-facturen met '                 '
                      overheidsorganisaties.
                    x-nullable: true
                  country_code:
                    type: string
                    description: ISO 3166-1 alpha-2 country code.
                    x-nullable: true
                  kvk_number:
                    type: string
                    x-nullable: true
                  phone:
                    type: string
                    x-nullable: true
                  vat_number:
                    type: string
                    x-nullable: true
                  contact_number:
                    type: string
                    description: Unique reference number for your customers and/or
                      suppliers, if left blank a new number is automatically generated
                      and assigned.
                    x-nullable: true
                  free_1:
                    type: string
                    x-nullable: true
                  free_2:
                    type: string
                    x-nullable: true
                  free_3:
                    type: string
                    x-nullable: true
                required:
                - id
                - is_individual
                - is_supplier
                - name
                - company_name
                - contact_person_name
                - contact_person_email_address
                - address
                - zipcode
                - city
                - government_identification_number
                - country_code
                - kvk_number
                - phone
                - vat_number
                - contact_number
                - free_1
                - free_2
                - free_3
                description: Suppliers and customers.
            required:
            - contact
          examples:
            application/json:
              contact:
                id: 701184043
                is_individual: false
                is_supplier: false
                name: Rompslomp.nl BV
                company_name: Rompslomp.nl BV
                contact_person_name: Rob S. Lomp
                contact_person_email_address: rob@example.org
                address: Grebbeberglaan 15
                zipcode: 3527 VX
                city: Utrecht
                government_identification_number:
                country_code: NL
                kvk_number: '12345678'
                phone:
                vat_number: NL123456789B01
                contact_number: K00001
                free_1:
                free_2:
                free_3:
  "/api/v1/companies/{company_id}/contacts":
    parameters:
    - "$ref": "#/parameters/company_id"
    post:
      summary: create client
      tags:
      - Contacts
      parameters:
      - name: contact
        in: body
        schema:
          type: object
          properties:
            contact:
              type: object
              properties:
                is_individual:
                  type: boolean
                  description: A contact is assumed to be a company unless this is
                    true.
                  default: false
                  x-nullable: true
                is_supplier:
                  type: boolean
                  description: A contact is assumed to be a customer unless this is
                    true.
                  default: false
                  x-nullable: true
                company_name:
                  type: string
                  description: Required if is_individual is false.
                  x-nullable: true
                contact_person_name:
                  type: string
                  description: Required if is_individual is true.
                  x-nullable: true
                contact_person_email_address:
                  type: string
                  x-nullable: true
                address:
                  type: string
                  x-nullable: true
                zipcode:
                  type: string
                  x-nullable: true
                city:
                  type: string
                  x-nullable: true
                government_identification_number:
                  type: string
                  description: Het Overheidsidentificatienummer (OIN) is verplicht
                    voor het uitwisselen van e-facturen met '                 ' overheidsorganisaties.
                  x-nullable: true
                country_code:
                  type: string
                  description: ISO 3166-1 alpha-2 country code.
                  x-nullable: true
                kvk_number:
                  type: string
                  x-nullable: true
                phone:
                  type: string
                  x-nullable: true
                vat_number:
                  type: string
                  x-nullable: true
                contact_number:
                  type: string
                  description: Unique reference number for your customers and/or suppliers,
                    if left blank a new number is automatically generated and assigned.
                  x-nullable: true
                free_1:
                  type: string
                  x-nullable: true
                free_2:
                  type: string
                  x-nullable: true
                free_3:
                  type: string
                  x-nullable: true
              description: Suppliers and customers.
          required:
          - contact
          example:
            contact:
              is_individual: false
              is_supplier: false
              company_name: Rompslomp.nl BV
              contact_person_name: Rob S. Lomp
              contact_person_email_address: rob@example.org
              address: Grebbeberglaan 15
              zipcode: 3527 VX
              city: Utrecht
              government_identification_number:
              country_code: NL
              kvk_number: '12345678'
              phone:
              vat_number: NL123456789B01
              contact_number:
              free_1:
              free_2:
              free_3:
        required: true
      responses:
        '201':
          description: successful
          schema:
            type: object
            properties:
              contact:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  is_individual:
                    type: boolean
                    description: A contact is assumed to be a company unless this
                      is true.
                    default: false
                    x-nullable: true
                  is_supplier:
                    type: boolean
                    description: A contact is assumed to be a customer unless this
                      is true.
                    default: false
                    x-nullable: true
                  name:
                    type: string
                    description: The value of company_name or contact_person if is_individual
                      is false or true respectively. Read only.
                    x-nullable: true
                  company_name:
                    type: string
                    description: Required if is_individual is false.
                    x-nullable: true
                  contact_person_name:
                    type: string
                    description: Required if is_individual is true.
                    x-nullable: true
                  contact_person_email_address:
                    type: string
                    x-nullable: true
                  address:
                    type: string
                    x-nullable: true
                  zipcode:
                    type: string
                    x-nullable: true
                  city:
                    type: string
                    x-nullable: true
                  government_identification_number:
                    type: string
                    description: Het Overheidsidentificatienummer (OIN) is verplicht
                      voor het uitwisselen van e-facturen met '                 '
                      overheidsorganisaties.
                    x-nullable: true
                  country_code:
                    type: string
                    description: ISO 3166-1 alpha-2 country code.
                    x-nullable: true
                  kvk_number:
                    type: string
                    x-nullable: true
                  phone:
                    type: string
                    x-nullable: true
                  vat_number:
                    type: string
                    x-nullable: true
                  contact_number:
                    type: string
                    description: Unique reference number for your customers and/or
                      suppliers, if left blank a new number is automatically generated
                      and assigned.
                    x-nullable: true
                  free_1:
                    type: string
                    x-nullable: true
                  free_2:
                    type: string
                    x-nullable: true
                  free_3:
                    type: string
                    x-nullable: true
                required:
                - id
                - is_individual
                - is_supplier
                - name
                - company_name
                - contact_person_name
                - contact_person_email_address
                - address
                - zipcode
                - city
                - government_identification_number
                - country_code
                - kvk_number
                - phone
                - vat_number
                - contact_number
                - free_1
                - free_2
                - free_3
                description: Suppliers and customers.
            required:
            - contact
          examples:
            application/json:
              contact:
                id: 775036437
                is_individual: false
                is_supplier: false
                name: Rompslomp.nl BV
                company_name: Rompslomp.nl BV
                contact_person_name: Rob S. Lomp
                contact_person_email_address: rob@example.org
                address: Grebbeberglaan 15
                zipcode: 3527 VX
                city: Utrecht
                government_identification_number:
                country_code: NL
                kvk_number: '12345678'
                phone:
                vat_number: NL123456789B01
                contact_number: K00002
                free_1:
                free_2:
                free_3:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Contact is invalid: Company name moet opgegeven zijn.'
                type: client.parameters.validation
    get:
      summary: list contacts
      tags:
      - Contacts
      parameters:
      - name: selection
        in: query
        type: string
        enum:
        - all
        - customers
        - suppliers
        default: all
        description: Name of selection filter to apply.
      - name: search[q]
        in: query
        type: string
        description: 'Query is matched against: company_name, contact_person_name,
          contact_person_email_address, kvk_number, contact_number, address, phone,
          vat_number, zipcode, city.'
      - name: search[contact_person_email_address]
        in: query
        type: string
        description: Filters contacts by email address. Only exact matches are returned.
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              contacts:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    is_individual:
                      type: boolean
                      description: A contact is assumed to be a company unless this
                        is true.
                      default: false
                      x-nullable: true
                    is_supplier:
                      type: boolean
                      description: A contact is assumed to be a customer unless this
                        is true.
                      default: false
                      x-nullable: true
                    name:
                      type: string
                      description: The value of company_name or contact_person if
                        is_individual is false or true respectively. Read only.
                      x-nullable: true
                    company_name:
                      type: string
                      description: Required if is_individual is false.
                      x-nullable: true
                    contact_person_name:
                      type: string
                      description: Required if is_individual is true.
                      x-nullable: true
                    contact_person_email_address:
                      type: string
                      x-nullable: true
                    address:
                      type: string
                      x-nullable: true
                    zipcode:
                      type: string
                      x-nullable: true
                    city:
                      type: string
                      x-nullable: true
                    government_identification_number:
                      type: string
                      description: Het Overheidsidentificatienummer (OIN) is verplicht
                        voor het uitwisselen van e-facturen met '                 '
                        overheidsorganisaties.
                      x-nullable: true
                    country_code:
                      type: string
                      description: ISO 3166-1 alpha-2 country code.
                      x-nullable: true
                    kvk_number:
                      type: string
                      x-nullable: true
                    phone:
                      type: string
                      x-nullable: true
                    vat_number:
                      type: string
                      x-nullable: true
                    contact_number:
                      type: string
                      description: Unique reference number for your customers and/or
                        suppliers, if left blank a new number is automatically generated
                        and assigned.
                      x-nullable: true
                    free_1:
                      type: string
                      x-nullable: true
                    free_2:
                      type: string
                      x-nullable: true
                    free_3:
                      type: string
                      x-nullable: true
                  required:
                  - id
                  - is_individual
                  - is_supplier
                  - name
                  - company_name
                  - contact_person_name
                  - contact_person_email_address
                  - address
                  - zipcode
                  - city
                  - government_identification_number
                  - country_code
                  - kvk_number
                  - phone
                  - vat_number
                  - contact_number
                  - free_1
                  - free_2
                  - free_3
                  description: Suppliers and customers.
            required:
            - contacts
          examples:
            application/json:
              contacts:
              - id: 748551423
                is_individual: false
                is_supplier: false
                name: Rompslomp.nl BV
                company_name: Rompslomp.nl BV
                contact_person_name: Rob S. Lomp
                contact_person_email_address: rob@example.org
                address: Grebbeberglaan 15
                zipcode: 3527 VX
                city: Utrecht
                government_identification_number:
                country_code: NL
                kvk_number: '12345678'
                phone:
                vat_number: NL123456789B01
                contact_number: K00001
                free_1:
                free_2:
                free_3:
  "/api/v1/companies/{company_id}/sales_invoices":
    parameters:
    - "$ref": "#/parameters/company_id"
    get:
      summary: list sales invoices
      tags:
      - Sales invoices
      parameters:
      - name: selection
        in: query
        type: string
        enum:
        - all
        - published
        - concept
        - unpaid
        - questionable_or_unpayable
        - expired
        - overpaid
        - imported
        - credit_invoices
        - debt_collector
        default: all
        description: Name of selection filter to apply.
      - name: search[from]
        in: query
        type: string
        format: date
        description: Filter sales invoices by minimum date. ISO 8601 formatted, e.g.
          "2020-01-31".
      - name: search[till]
        in: query
        type: string
        format: date
        description: Filter sales invoices by maximum date. ISO 8601 formatted, e.g.
          "2020-01-31".
      - name: search[contact_id]
        in: query
        type: integer
        description: Filter sales invoices by contact id.
      - name: search[api_reference]
        in: query
        type: string
        description: Filter sales invoices by custom reference for API clients
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              sales_invoices:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    date:
                      type: date
                      description: Defaults to current date.
                      x-nullable: true
                    due_date:
                      type: date
                      description: If the due date is left blank it will be derived
                        from the company's payment period.
                      x-nullable: true
                    payment_method:
                      type: string
                      enum:
                      - pay_transfer
                      - paid_cash
                      - paid_pin
                      - paid_already
                      - pay_ideal
                      - paid_sepa
                      - pay_custom
                      x-nullable: true
                    custom_payment_instructions:
                      type: string
                      description: Accepts placeholders. Required if payment_method
                        is "pay_custom". Omitted from responses for other payment
                        methods.
                      x-nullable: true
                    pay_url:
                      type: string
                      description: Location that allows the debtor to pay the open
                        amount using iDEAL | Wero. This property is included only
                        if an unused pay-URL is present. Use the creates_pay_url_on_publish
                        property to create a pay-URL at invoice publication. Read
                        only.
                      x-nullable: true
                    creates_pay_url_on_publish:
                      type: boolean
                      description: If true an iDEAL | Wero pay-URL for the invoice's
                        amount owed is attached when the invoice is published. Note
                        that the company must have enabled iDEAL | Wero payments by
                        connecting with Mollie. If iDEAL | Wero payments are no longer
                        enabled at publication, no pay-URL is created. The property
                        is included in responses only if it's true and before publication.
                      default: false
                      x-nullable: true
                    description:
                      type: string
                      x-nullable: true
                    status:
                      type: string
                      enum:
                      - concept
                      - imported
                      - published
                      description: Read only.
                      x-nullable: true
                    price_without_vat:
                      type: string
                      description: Arbitrary-precision floating point number represented
                        as a string. Read only.
                      x-nullable: true
                    price_with_vat:
                      type: string
                      description: Arbitrary-precision floating point number represented
                        as a string. Read only.
                      x-nullable: true
                    vat_amount:
                      type: string
                      description: Amount of VAT in Euro. Arbitrary-precision floating
                        point number represented as a string. Read only.
                      x-nullable: true
                    contact_id:
                      type: integer
                      description: Note that once the invoice is published its cached
                        contact properties are locked.
                      x-nullable: true
                    invoice_number:
                      type: string
                      description: Read only.
                      x-nullable: true
                    published_at:
                      type: date
                      description: Read only.
                      x-nullable: true
                    payment_status:
                      type: string
                      enum:
                      - paid
                      - unpaid
                      - overpaid
                      description: Read only.
                      x-nullable: true
                    open_amount:
                      type: string
                      description: Unpaid amount in Euro. Arbitrary-precision floating
                        point number represented as a string. Read only.
                      x-nullable: true
                    currency:
                      type: string
                      description: Lower case 3-character ISO 4217 code. Default is
                        Euro. For presentation only, bare amounts are always in Euro.
                      x-nullable: true
                    currency_exchange_rate:
                      type: string
                      description: Value of € 1,00 in the currency specified with
                        the currency property. Required unless currency is Euro. Arbitrary-precision
                        floating point number represented as a string.
                      x-nullable: true
                    sends_copy_by_email_on_publish:
                      type: boolean
                      description: If true the invoice is sent to the contact person's
                        email address when it is published. The property is included
                        in responses only if it's true and before publication.
                      default: false
                      x-nullable: true
                    template_id:
                      type: integer
                      description: Leave blank to use the default invoice template.
                      x-nullable: true
                    vat_number:
                      type: string
                      description: A VAT number is required when any invoice line's
                        VAT type is "vat_reverse_charged", or when the VAT type "vat_zero"
                        is assigned and the invoice is addressed to a EU country other
                        than the Netherlands.
                      x-nullable: true
                    validates_vat_number:
                      type: boolean
                      description: If a vat_number is given it is formatted and validated,
                        unless validates_vat_number is false. This property is included
                        only if it is false.
                      default: true
                      x-nullable: true
                    api_reference:
                      type: string
                      description: Optional reference that is not exposed by other
                        means than the API. Must be unique per company.
                      x-nullable: true
                    payment_reference:
                      type: string
                      description: Optional payment reference supplied by the customer
                      x-nullable: true
                    sale_type:
                      type: string
                      description: 'In case contact is outside Netherlands, you can
                        select one of the options. ["supply", "service", "service_digital"],
                        supply: Levering, service: Diensten, service_digital: Digitale
                        diensten'
                      x-nullable: true
                    distance_sale:
                      type: boolean
                      description: You can pay VAT in the Netherlands up to a certain
                        threshold amount and therefore choose false here
                      default: false
                      x-nullable: true
                    cached_contact:
                      type: object
                      properties:
                        name:
                          type: string
                          x-nullable: true
                        contact_person_name:
                          type: string
                          x-nullable: true
                        address:
                          type: string
                          x-nullable: true
                        zipcode:
                          type: string
                          x-nullable: true
                        city:
                          type: string
                          x-nullable: true
                        country_code:
                          type: string
                          x-nullable: true
                        contact_person_email_address:
                          type: string
                          x-nullable: true
                        contact_number:
                          type: string
                          x-nullable: true
                      required:
                      - name
                      - contact_person_name
                      - address
                      - zipcode
                      - city
                      - country_code
                      - contact_person_email_address
                      - contact_number
                      description: Details of the associated contact. Subset of the
                        Contact model. Locked when the invoice is published. Read
                        only.
                      x-nullable: true
                    attachment_objects:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Read only.
                            x-nullable: true
                          attachment:
                            description:
                              type: string
                              format: string
                              write_only: true
                              description: Base64 encoded file
                            x-nullable: true
                          attachment_file_name:
                            type: string
                            x-nullable: true
                          attachment_content_type:
                            type: string
                            description: Read only.
                            x-nullable: true
                          attachment_file_size:
                            type: integer
                            description: Read only.
                            x-nullable: true
                        required:
                        - id
                        - attachment
                        - attachment_file_name
                        - attachment_content_type
                        - attachment_file_size
                      description: Read only.
                    invoice_lines:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Read only.
                            x-nullable: true
                          description:
                            type: string
                            description: Description of the product or service in
                              no more than 255 characters.
                            x-nullable: true
                          extended_description:
                            type: string
                            description: Extended description of the invoice line.
                            x-nullable: true
                          price_per_unit:
                            type: string
                            description: This property states the price with VAT excluded
                              Arbitrary-precision floating point number represented
                              as a string.
                            x-nullable: true
                          price_with_vat:
                            type: string
                            description: Arbitrary-precision floating point number
                              represented as a string. Read only.
                            x-nullable: true
                          price_without_vat:
                            type: string
                            description: Arbitrary-precision floating point number
                              represented as a string. Read only.
                            x-nullable: true
                          vat_amount:
                            type: string
                            description: Amount of VAT in Euro. Arbitrary-precision
                              floating point number represented as a string. Read
                              only.
                            x-nullable: true
                          vat_rate:
                            type: string
                            description: Tax rate expressed by a decimal number, e.g.
                              "0.21" means 21%. This property is derived from the
                              invoice line's VAT type, unless that type is "custom",
                              in which case a custom vat_rate must be provided. In
                              other cases the given vat_rate is ignored. Arbitrary-precision
                              floating point number represented as a string.
                            x-nullable: true
                          vat_type_id:
                            type: integer
                            description: Defaults to company's default VAT type or
                              VAT type "vat_high".
                            x-nullable: true
                          quantity:
                            type: string
                            default: '1.0'
                            description: Arbitrary-precision floating point number
                              represented as a string.
                            x-nullable: true
                          product_id:
                            type: integer
                            x-nullable: true
                          account_id:
                            type: integer
                            x-nullable: true
                          account_path:
                            description: When both account_path and account_id are
                              given the latter has precedence.
                            x-nullable: true
                        required:
                        - id
                        - description
                        - extended_description
                        - price_per_unit
                        - price_with_vat
                        - price_without_vat
                        - vat_amount
                        - vat_rate
                        - vat_type_id
                        - quantity
                        - product_id
                        - account_id
                        - account_path
                  required:
                  - id
                  - date
                  - due_date
                  - payment_method
                  - description
                  - status
                  - price_without_vat
                  - price_with_vat
                  - vat_amount
                  - contact_id
                  - invoice_number
                  - published_at
                  - payment_status
                  - open_amount
                  - currency
                  - currency_exchange_rate
                  - template_id
                  - vat_number
                  - cached_contact
                  - attachment_objects
                  - invoice_lines
            required:
            - sales_invoices
          examples:
            application/json:
              sales_invoices:
              - id: 708176756
                date: '2024-03-02'
                due_date: '2024-04-01'
                payment_method: pay_transfer
                description:
                status: concept
                price_without_vat: '300.0'
                price_with_vat: '363.0'
                vat_amount: '63.0'
                contact_id: 768107468
                invoice_number:
                published_at:
                payment_status: unpaid
                open_amount: '363.0'
                currency: eur
                currency_exchange_rate: '1.0'
                template_id:
                vat_number: NL123456789B01
                payment_reference:
                sale_type: supply
                distance_sale: false
                cached_contact:
                  name: Rompslomp.nl BV
                  contact_person_name: Rob S. Lomp
                  address: Grebbeberglaan 15
                  zipcode: 3527 VX
                  city: Utrecht
                  country_code: NL
                  contact_person_email_address: rob@example.org
                  contact_number: K00001
                attachment_objects: []
                invoice_lines:
                - id: 748551423
                  description: Adviesuren
                  extended_description:
                  price_per_unit: '75.0'
                  price_with_vat: '363.0'
                  price_without_vat: '300.0'
                  vat_amount: '63.0'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '4.0'
                  product_id:
                  account_id:
                  account_path:
    post:
      summary: create sales invoice
      tags:
      - Sales invoices
      parameters:
      - name: sales_invoice
        in: body
        schema:
          type: object
          properties:
            sales_invoice:
              type: object
              properties:
                date:
                  type: date
                  description: Defaults to current date.
                  x-nullable: true
                due_date:
                  type: date
                  description: If the due date is left blank it will be derived from
                    the company's payment period.
                  x-nullable: true
                payment_method:
                  type: string
                  enum:
                  - pay_transfer
                  - paid_cash
                  - paid_pin
                  - paid_already
                  - pay_ideal
                  - paid_sepa
                  - pay_custom
                  x-nullable: true
                custom_payment_instructions:
                  type: string
                  description: Accepts placeholders. Required if payment_method is
                    "pay_custom". Omitted from responses for other payment methods.
                  x-nullable: true
                creates_pay_url_on_publish:
                  type: boolean
                  description: If true an iDEAL | Wero pay-URL for the invoice's amount
                    owed is attached when the invoice is published. Note that the
                    company must have enabled iDEAL | Wero payments by connecting
                    with Mollie. If iDEAL | Wero payments are no longer enabled at
                    publication, no pay-URL is created. The property is included in
                    responses only if it's true and before publication.
                  default: false
                  x-nullable: true
                description:
                  type: string
                  x-nullable: true
                contact_id:
                  type: integer
                  description: Note that once the invoice is published its cached
                    contact properties are locked.
                  x-nullable: true
                currency:
                  type: string
                  description: Lower case 3-character ISO 4217 code. Default is Euro.
                    For presentation only, bare amounts are always in Euro.
                  x-nullable: true
                currency_exchange_rate:
                  type: string
                  description: Value of € 1,00 in the currency specified with the
                    currency property. Required unless currency is Euro. Arbitrary-precision
                    floating point number represented as a string.
                  x-nullable: true
                _publish:
                  type: boolean
                  description: By default an invoice is created as a concept. If this
                    trigger is true the invoice is immediately published. Previously
                    published invoices cannot be published again. Write only.
                  x-nullable: true
                sends_copy_by_email_on_publish:
                  type: boolean
                  description: If true the invoice is sent to the contact person's
                    email address when it is published. The property is included in
                    responses only if it's true and before publication.
                  default: false
                  x-nullable: true
                template_id:
                  type: integer
                  description: Leave blank to use the default invoice template.
                  x-nullable: true
                vat_number:
                  type: string
                  description: A VAT number is required when any invoice line's VAT
                    type is "vat_reverse_charged", or when the VAT type "vat_zero"
                    is assigned and the invoice is addressed to a EU country other
                    than the Netherlands.
                  x-nullable: true
                validates_vat_number:
                  type: boolean
                  description: If a vat_number is given it is formatted and validated,
                    unless validates_vat_number is false. This property is included
                    only if it is false.
                  default: true
                  x-nullable: true
                api_reference:
                  type: string
                  description: Optional reference that is not exposed by other means
                    than the API. Must be unique per company.
                  x-nullable: true
                payment_reference:
                  type: string
                  description: Optional payment reference supplied by the customer
                  x-nullable: true
                sale_type:
                  type: string
                  description: 'In case contact is outside Netherlands, you can select
                    one of the options. ["supply", "service", "service_digital"],
                    supply: Levering, service: Diensten, service_digital: Digitale
                    diensten'
                  x-nullable: true
                distance_sale:
                  type: boolean
                  description: You can pay VAT in the Netherlands up to a certain
                    threshold amount and therefore choose false here
                  default: false
                  x-nullable: true
                contact:
                  type: object
                  properties:
                    is_individual:
                      type: boolean
                      description: A contact is assumed to be a company unless this
                        is true.
                      default: false
                      x-nullable: true
                    is_supplier:
                      type: boolean
                      description: A contact is assumed to be a customer unless this
                        is true.
                      default: false
                      x-nullable: true
                    company_name:
                      type: string
                      description: Required if is_individual is false.
                      x-nullable: true
                    contact_person_name:
                      type: string
                      description: Required if is_individual is true.
                      x-nullable: true
                    contact_person_email_address:
                      type: string
                      x-nullable: true
                    address:
                      type: string
                      x-nullable: true
                    zipcode:
                      type: string
                      x-nullable: true
                    city:
                      type: string
                      x-nullable: true
                    government_identification_number:
                      type: string
                      description: Het Overheidsidentificatienummer (OIN) is verplicht
                        voor het uitwisselen van e-facturen met '                 '
                        overheidsorganisaties.
                      x-nullable: true
                    country_code:
                      type: string
                      description: ISO 3166-1 alpha-2 country code.
                      x-nullable: true
                    kvk_number:
                      type: string
                      x-nullable: true
                    phone:
                      type: string
                      x-nullable: true
                    vat_number:
                      type: string
                      x-nullable: true
                    contact_number:
                      type: string
                      description: Unique reference number for your customers and/or
                        suppliers, if left blank a new number is automatically generated
                        and assigned.
                      x-nullable: true
                    free_1:
                      type: string
                      x-nullable: true
                    free_2:
                      type: string
                      x-nullable: true
                    free_3:
                      type: string
                      x-nullable: true
                  description: 'New contact to be associated with this sales invoice.
                    Create only: use the contacts endpoints to update or delete existing
                    contacts. Any previous contact is dissociated, but not deleted.
                    Note that once the invoice is published its cached contact properties
                    are locked. Write only.'
                  x-nullable: true
                invoice_lines:
                  type: array
                  items:
                    type: object
                    properties:
                      description:
                        type: string
                        description: Description of the product or service in no more
                          than 255 characters.
                        x-nullable: true
                      extended_description:
                        type: string
                        description: Extended description of the invoice line.
                        x-nullable: true
                      price_per_unit:
                        type: string
                        description: This property states the price with VAT excluded
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      vat_rate:
                        type: string
                        description: Tax rate expressed by a decimal number, e.g.
                          "0.21" means 21%. This property is derived from the invoice
                          line's VAT type, unless that type is "custom", in which
                          case a custom vat_rate must be provided. In other cases
                          the given vat_rate is ignored. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      vat_type_id:
                        type: integer
                        description: Defaults to company's default VAT type or VAT
                          type "vat_high".
                        x-nullable: true
                      quantity:
                        type: string
                        default: '1.0'
                        description: Arbitrary-precision floating point number represented
                          as a string.
                        x-nullable: true
                      product_id:
                        type: integer
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
                payments:
                  type: array
                  items:
                    type: object
                    properties:
                      amount:
                        type: string
                        description: Paid amount in Euro. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      description:
                        type: string
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
                      paid_at:
                        type: datetime
                        x-nullable: true
                  description: 'Create only: use the payments API to update or delete
                    existing payments. Requires the ''manage:payments'' scope. Write
                    only.'
          required:
          - sales_invoice
          example:
            sales_invoice:
              date: '2024-03-02'
              due_date: '2024-04-01'
              payment_method: pay_transfer
              description:
              contact_id: 573784502
              currency: eur
              currency_exchange_rate: '1.0'
              template_id:
              vat_number: NL123456789B01
              api_reference: abcd1234
              payment_reference: abcd1234
              sale_type: ''
              distance_sale: false
              invoice_lines:
              - description: Adviesuren
                extended_description:
                price_per_unit: '75.0'
                vat_rate: '0.21'
                vat_type_id: 708176756
                quantity: '4.0'
                product_id:
                account_id:
                account_path:
              payments:
              - amount: '363.0'
                description:
                account_id: 1114752766
                account_path: activa.current_assets.liquid_assets.bank
                paid_at: '2024-03-02 00:00:00 +0100'
        required: true
      responses:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Factuur is invalid: Factuurdatum moet na 01/01/1990 liggen.'
                type: client.parameters.validation
        '201':
          description: successful
          schema:
            type: object
            properties:
              sales_invoice:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  date:
                    type: date
                    description: Defaults to current date.
                    x-nullable: true
                  due_date:
                    type: date
                    description: If the due date is left blank it will be derived
                      from the company's payment period.
                    x-nullable: true
                  payment_method:
                    type: string
                    enum:
                    - pay_transfer
                    - paid_cash
                    - paid_pin
                    - paid_already
                    - pay_ideal
                    - paid_sepa
                    - pay_custom
                    x-nullable: true
                  custom_payment_instructions:
                    type: string
                    description: Accepts placeholders. Required if payment_method
                      is "pay_custom". Omitted from responses for other payment methods.
                    x-nullable: true
                  pay_url:
                    type: string
                    description: Location that allows the debtor to pay the open amount
                      using iDEAL | Wero. This property is included only if an unused
                      pay-URL is present. Use the creates_pay_url_on_publish property
                      to create a pay-URL at invoice publication. Read only.
                    x-nullable: true
                  creates_pay_url_on_publish:
                    type: boolean
                    description: If true an iDEAL | Wero pay-URL for the invoice's
                      amount owed is attached when the invoice is published. Note
                      that the company must have enabled iDEAL | Wero payments by
                      connecting with Mollie. If iDEAL | Wero payments are no longer
                      enabled at publication, no pay-URL is created. The property
                      is included in responses only if it's true and before publication.
                    default: false
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  status:
                    type: string
                    enum:
                    - concept
                    - imported
                    - published
                    description: Read only.
                    x-nullable: true
                  price_without_vat:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  price_with_vat:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  vat_amount:
                    type: string
                    description: Amount of VAT in Euro. Arbitrary-precision floating
                      point number represented as a string. Read only.
                    x-nullable: true
                  contact_id:
                    type: integer
                    description: Note that once the invoice is published its cached
                      contact properties are locked.
                    x-nullable: true
                  invoice_number:
                    type: string
                    description: Read only.
                    x-nullable: true
                  published_at:
                    type: date
                    description: Read only.
                    x-nullable: true
                  payment_status:
                    type: string
                    enum:
                    - paid
                    - unpaid
                    - overpaid
                    description: Read only.
                    x-nullable: true
                  open_amount:
                    type: string
                    description: Unpaid amount in Euro. Arbitrary-precision floating
                      point number represented as a string. Read only.
                    x-nullable: true
                  currency:
                    type: string
                    description: Lower case 3-character ISO 4217 code. Default is
                      Euro. For presentation only, bare amounts are always in Euro.
                    x-nullable: true
                  currency_exchange_rate:
                    type: string
                    description: Value of € 1,00 in the currency specified with the
                      currency property. Required unless currency is Euro. Arbitrary-precision
                      floating point number represented as a string.
                    x-nullable: true
                  sends_copy_by_email_on_publish:
                    type: boolean
                    description: If true the invoice is sent to the contact person's
                      email address when it is published. The property is included
                      in responses only if it's true and before publication.
                    default: false
                    x-nullable: true
                  template_id:
                    type: integer
                    description: Leave blank to use the default invoice template.
                    x-nullable: true
                  vat_number:
                    type: string
                    description: A VAT number is required when any invoice line's
                      VAT type is "vat_reverse_charged", or when the VAT type "vat_zero"
                      is assigned and the invoice is addressed to a EU country other
                      than the Netherlands.
                    x-nullable: true
                  validates_vat_number:
                    type: boolean
                    description: If a vat_number is given it is formatted and validated,
                      unless validates_vat_number is false. This property is included
                      only if it is false.
                    default: true
                    x-nullable: true
                  api_reference:
                    type: string
                    description: Optional reference that is not exposed by other means
                      than the API. Must be unique per company.
                    x-nullable: true
                  payment_reference:
                    type: string
                    description: Optional payment reference supplied by the customer
                    x-nullable: true
                  sale_type:
                    type: string
                    description: 'In case contact is outside Netherlands, you can
                      select one of the options. ["supply", "service", "service_digital"],
                      supply: Levering, service: Diensten, service_digital: Digitale
                      diensten'
                    x-nullable: true
                  distance_sale:
                    type: boolean
                    description: You can pay VAT in the Netherlands up to a certain
                      threshold amount and therefore choose false here
                    default: false
                    x-nullable: true
                  cached_contact:
                    type: object
                    properties:
                      name:
                        type: string
                        x-nullable: true
                      contact_person_name:
                        type: string
                        x-nullable: true
                      address:
                        type: string
                        x-nullable: true
                      zipcode:
                        type: string
                        x-nullable: true
                      city:
                        type: string
                        x-nullable: true
                      country_code:
                        type: string
                        x-nullable: true
                      contact_person_email_address:
                        type: string
                        x-nullable: true
                      contact_number:
                        type: string
                        x-nullable: true
                    required:
                    - name
                    - contact_person_name
                    - address
                    - zipcode
                    - city
                    - country_code
                    - contact_person_email_address
                    - contact_number
                    description: Details of the associated contact. Subset of the
                      Contact model. Locked when the invoice is published. Read only.
                    x-nullable: true
                  attachment_objects:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        attachment:
                          description:
                            type: string
                            format: string
                            write_only: true
                            description: Base64 encoded file
                          x-nullable: true
                        attachment_file_name:
                          type: string
                          x-nullable: true
                        attachment_content_type:
                          type: string
                          description: Read only.
                          x-nullable: true
                        attachment_file_size:
                          type: integer
                          description: Read only.
                          x-nullable: true
                      required:
                      - id
                      - attachment
                      - attachment_file_name
                      - attachment_content_type
                      - attachment_file_size
                    description: Read only.
                  invoice_lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          default: '1.0'
                          description: Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        product_id:
                          type: integer
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                required:
                - id
                - date
                - due_date
                - payment_method
                - description
                - status
                - price_without_vat
                - price_with_vat
                - vat_amount
                - contact_id
                - invoice_number
                - published_at
                - payment_status
                - open_amount
                - currency
                - currency_exchange_rate
                - template_id
                - vat_number
                - cached_contact
                - attachment_objects
                - invoice_lines
            required:
            - sales_invoice
          examples:
            application/json:
              sales_invoice:
                id: 701184043
                date: '2024-03-02'
                due_date: '2024-04-01'
                payment_method: pay_transfer
                description:
                status: concept
                price_without_vat: '300.0'
                price_with_vat: '363.0'
                vat_amount: '63.0'
                contact_id: 573784502
                invoice_number:
                published_at:
                payment_status: paid
                open_amount: '0.0'
                currency: eur
                currency_exchange_rate: '1.0'
                template_id:
                vat_number: NL123456789B01
                api_reference: abcd1234
                payment_reference: abcd1234
                sale_type: supply
                distance_sale: false
                cached_contact:
                  name: Rompslomp.nl BV
                  contact_person_name: Rob S. Lomp
                  address: Grebbeberglaan 15
                  zipcode: 3527 VX
                  city: Utrecht
                  country_code: NL
                  contact_person_email_address: rob@example.org
                  contact_number: K00001
                attachment_objects: []
                invoice_lines:
                - id: 573784502
                  description: Adviesuren
                  extended_description:
                  price_per_unit: '75.0'
                  price_with_vat: '363.0'
                  price_without_vat: '300.0'
                  vat_amount: '63.0'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '4.0'
                  product_id:
                  account_id:
                  account_path:
  "/api/v1/companies/{company_id}/sales_invoices/{sales_invoice_id}/attachments/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: sales_invoice_id
      in: path
      type: string
      description: Sale Invoice ID
      required: true
    - name: id
      in: path
      type: string
      description: Attachment ID
      required: true
    delete:
      summary: delete sales invoice
      tags:
      - Sales invoices
      responses:
        '204':
          description: successful
    get:
      summary: download invoice attachment
      tags:
      - Sales invoices
      produces:
      - application/pdf
      responses:
        '200':
          description: successful
  "/api/v1/companies/{company_id}/sales_invoices/{id}/pdf":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: ID
      required: true
    get:
      summary: download sales invoices pdf
      tags:
      - Sales invoices
      produces:
      - application/pdf
      responses:
        '200':
          description: successful
          schema:
            type: binary
          examples:
            application/json:
              message: Factuur wordt niet gepubliceerd
  "/api/v1/companies/{company_id}/sales_invoices/{sales_invoice_id}/attachments":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: sales_invoice_id
      in: path
      type: string
      description: Sale Invoice ID
      required: true
    post:
      summary: upload an attachment
      tags:
      - Sales invoices
      parameters:
      - name: attachment_object
        in: body
        type: string
        description: It expects base64 file
        schema:
          type: object
          properties:
            attachment_object:
              type: object
              properties:
                attachment:
                  description:
                    type: string
                    format: string
                    write_only: true
                    description: Base64 encoded file
                  x-nullable: true
                attachment_file_name:
                  type: string
                  x-nullable: true
          required:
          - attachment_object
      responses:
        '200':
          description: successful
          examples:
            application/json:
              attachment_object:
                id: 681363806
                attachment: "/api/v1/companies/1023508573/sales_invoices/748551423/attachments/681363806"
                attachment_file_name: file_name.pdf
                attachment_content_type: application/octet-stream
                attachment_file_size: 7
  "/api/v1/companies/{company_id}/sales_invoices/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: id
      required: true
    get:
      summary: show sales invoice
      tags:
      - Sales invoices
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              sales_invoice:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  date:
                    type: date
                    description: Defaults to current date.
                    x-nullable: true
                  due_date:
                    type: date
                    description: If the due date is left blank it will be derived
                      from the company's payment period.
                    x-nullable: true
                  payment_method:
                    type: string
                    enum:
                    - pay_transfer
                    - paid_cash
                    - paid_pin
                    - paid_already
                    - pay_ideal
                    - paid_sepa
                    - pay_custom
                    x-nullable: true
                  custom_payment_instructions:
                    type: string
                    description: Accepts placeholders. Required if payment_method
                      is "pay_custom". Omitted from responses for other payment methods.
                    x-nullable: true
                  pay_url:
                    type: string
                    description: Location that allows the debtor to pay the open amount
                      using iDEAL | Wero. This property is included only if an unused
                      pay-URL is present. Use the creates_pay_url_on_publish property
                      to create a pay-URL at invoice publication. Read only.
                    x-nullable: true
                  creates_pay_url_on_publish:
                    type: boolean
                    description: If true an iDEAL | Wero pay-URL for the invoice's
                      amount owed is attached when the invoice is published. Note
                      that the company must have enabled iDEAL | Wero payments by
                      connecting with Mollie. If iDEAL | Wero payments are no longer
                      enabled at publication, no pay-URL is created. The property
                      is included in responses only if it's true and before publication.
                    default: false
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  status:
                    type: string
                    enum:
                    - concept
                    - imported
                    - published
                    description: Read only.
                    x-nullable: true
                  price_without_vat:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  price_with_vat:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  vat_amount:
                    type: string
                    description: Amount of VAT in Euro. Arbitrary-precision floating
                      point number represented as a string. Read only.
                    x-nullable: true
                  contact_id:
                    type: integer
                    description: Note that once the invoice is published its cached
                      contact properties are locked.
                    x-nullable: true
                  invoice_number:
                    type: string
                    description: Read only.
                    x-nullable: true
                  published_at:
                    type: date
                    description: Read only.
                    x-nullable: true
                  payment_status:
                    type: string
                    enum:
                    - paid
                    - unpaid
                    - overpaid
                    description: Read only.
                    x-nullable: true
                  open_amount:
                    type: string
                    description: Unpaid amount in Euro. Arbitrary-precision floating
                      point number represented as a string. Read only.
                    x-nullable: true
                  currency:
                    type: string
                    description: Lower case 3-character ISO 4217 code. Default is
                      Euro. For presentation only, bare amounts are always in Euro.
                    x-nullable: true
                  currency_exchange_rate:
                    type: string
                    description: Value of € 1,00 in the currency specified with the
                      currency property. Required unless currency is Euro. Arbitrary-precision
                      floating point number represented as a string.
                    x-nullable: true
                  sends_copy_by_email_on_publish:
                    type: boolean
                    description: If true the invoice is sent to the contact person's
                      email address when it is published. The property is included
                      in responses only if it's true and before publication.
                    default: false
                    x-nullable: true
                  template_id:
                    type: integer
                    description: Leave blank to use the default invoice template.
                    x-nullable: true
                  vat_number:
                    type: string
                    description: A VAT number is required when any invoice line's
                      VAT type is "vat_reverse_charged", or when the VAT type "vat_zero"
                      is assigned and the invoice is addressed to a EU country other
                      than the Netherlands.
                    x-nullable: true
                  validates_vat_number:
                    type: boolean
                    description: If a vat_number is given it is formatted and validated,
                      unless validates_vat_number is false. This property is included
                      only if it is false.
                    default: true
                    x-nullable: true
                  api_reference:
                    type: string
                    description: Optional reference that is not exposed by other means
                      than the API. Must be unique per company.
                    x-nullable: true
                  payment_reference:
                    type: string
                    description: Optional payment reference supplied by the customer
                    x-nullable: true
                  sale_type:
                    type: string
                    description: 'In case contact is outside Netherlands, you can
                      select one of the options. ["supply", "service", "service_digital"],
                      supply: Levering, service: Diensten, service_digital: Digitale
                      diensten'
                    x-nullable: true
                  distance_sale:
                    type: boolean
                    description: You can pay VAT in the Netherlands up to a certain
                      threshold amount and therefore choose false here
                    default: false
                    x-nullable: true
                  cached_contact:
                    type: object
                    properties:
                      name:
                        type: string
                        x-nullable: true
                      contact_person_name:
                        type: string
                        x-nullable: true
                      address:
                        type: string
                        x-nullable: true
                      zipcode:
                        type: string
                        x-nullable: true
                      city:
                        type: string
                        x-nullable: true
                      country_code:
                        type: string
                        x-nullable: true
                      contact_person_email_address:
                        type: string
                        x-nullable: true
                      contact_number:
                        type: string
                        x-nullable: true
                    required:
                    - name
                    - contact_person_name
                    - address
                    - zipcode
                    - city
                    - country_code
                    - contact_person_email_address
                    - contact_number
                    description: Details of the associated contact. Subset of the
                      Contact model. Locked when the invoice is published. Read only.
                    x-nullable: true
                  attachment_objects:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        attachment:
                          description:
                            type: string
                            format: string
                            write_only: true
                            description: Base64 encoded file
                          x-nullable: true
                        attachment_file_name:
                          type: string
                          x-nullable: true
                        attachment_content_type:
                          type: string
                          description: Read only.
                          x-nullable: true
                        attachment_file_size:
                          type: integer
                          description: Read only.
                          x-nullable: true
                      required:
                      - id
                      - attachment
                      - attachment_file_name
                      - attachment_content_type
                      - attachment_file_size
                    description: Read only.
                  invoice_lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          default: '1.0'
                          description: Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        product_id:
                          type: integer
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                required:
                - id
                - date
                - due_date
                - payment_method
                - description
                - status
                - price_without_vat
                - price_with_vat
                - vat_amount
                - contact_id
                - invoice_number
                - published_at
                - payment_status
                - open_amount
                - currency
                - currency_exchange_rate
                - template_id
                - vat_number
                - cached_contact
                - attachment_objects
                - invoice_lines
            required:
            - sales_invoice
          examples:
            application/json:
              sales_invoice:
                id: 768107468
                date: '2024-03-02'
                due_date: '2024-04-01'
                payment_method: pay_transfer
                description:
                status: concept
                price_without_vat: '300.0'
                price_with_vat: '363.0'
                vat_amount: '63.0'
                contact_id: 640709975
                invoice_number:
                published_at:
                payment_status: unpaid
                open_amount: '363.0'
                currency: eur
                currency_exchange_rate: '1.0'
                template_id:
                vat_number: NL123456789B01
                payment_reference:
                sale_type: supply
                distance_sale: false
                cached_contact:
                  name: Rompslomp.nl BV
                  contact_person_name: Rob S. Lomp
                  address: Grebbeberglaan 15
                  zipcode: 3527 VX
                  city: Utrecht
                  country_code: NL
                  contact_person_email_address: rob@example.org
                  contact_number: K00001
                attachment_objects: []
                invoice_lines:
                - id: 640709975
                  description: Adviesuren
                  extended_description:
                  price_per_unit: '75.0'
                  price_with_vat: '363.0'
                  price_without_vat: '300.0'
                  vat_amount: '63.0'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '4.0'
                  product_id:
                  account_id:
                  account_path:
    patch:
      summary: update sales invoice
      tags:
      - Sales invoices
      parameters:
      - name: sales_invoice
        in: body
        schema:
          type: object
          properties:
            sales_invoice:
              type: object
              properties:
                date:
                  type: date
                  description: Defaults to current date.
                  x-nullable: true
                due_date:
                  type: date
                  description: If the due date is left blank it will be derived from
                    the company's payment period.
                  x-nullable: true
                payment_method:
                  type: string
                  enum:
                  - pay_transfer
                  - paid_cash
                  - paid_pin
                  - paid_already
                  - pay_ideal
                  - paid_sepa
                  - pay_custom
                  x-nullable: true
                custom_payment_instructions:
                  type: string
                  description: Accepts placeholders. Required if payment_method is
                    "pay_custom". Omitted from responses for other payment methods.
                  x-nullable: true
                creates_pay_url_on_publish:
                  type: boolean
                  description: If true an iDEAL | Wero pay-URL for the invoice's amount
                    owed is attached when the invoice is published. Note that the
                    company must have enabled iDEAL | Wero payments by connecting
                    with Mollie. If iDEAL | Wero payments are no longer enabled at
                    publication, no pay-URL is created. The property is included in
                    responses only if it's true and before publication.
                  default: false
                  x-nullable: true
                description:
                  type: string
                  x-nullable: true
                contact_id:
                  type: integer
                  description: Note that once the invoice is published its cached
                    contact properties are locked.
                  x-nullable: true
                currency:
                  type: string
                  description: Lower case 3-character ISO 4217 code. Default is Euro.
                    For presentation only, bare amounts are always in Euro.
                  x-nullable: true
                currency_exchange_rate:
                  type: string
                  description: Value of € 1,00 in the currency specified with the
                    currency property. Required unless currency is Euro. Arbitrary-precision
                    floating point number represented as a string.
                  x-nullable: true
                _publish:
                  type: boolean
                  description: By default an invoice is created as a concept. If this
                    trigger is true the invoice is immediately published. Previously
                    published invoices cannot be published again. Write only.
                  x-nullable: true
                sends_copy_by_email_on_publish:
                  type: boolean
                  description: If true the invoice is sent to the contact person's
                    email address when it is published. The property is included in
                    responses only if it's true and before publication.
                  default: false
                  x-nullable: true
                template_id:
                  type: integer
                  description: Leave blank to use the default invoice template.
                  x-nullable: true
                vat_number:
                  type: string
                  description: A VAT number is required when any invoice line's VAT
                    type is "vat_reverse_charged", or when the VAT type "vat_zero"
                    is assigned and the invoice is addressed to a EU country other
                    than the Netherlands.
                  x-nullable: true
                validates_vat_number:
                  type: boolean
                  description: If a vat_number is given it is formatted and validated,
                    unless validates_vat_number is false. This property is included
                    only if it is false.
                  default: true
                  x-nullable: true
                api_reference:
                  type: string
                  description: Optional reference that is not exposed by other means
                    than the API. Must be unique per company.
                  x-nullable: true
                payment_reference:
                  type: string
                  description: Optional payment reference supplied by the customer
                  x-nullable: true
                sale_type:
                  type: string
                  description: 'In case contact is outside Netherlands, you can select
                    one of the options. ["supply", "service", "service_digital"],
                    supply: Levering, service: Diensten, service_digital: Digitale
                    diensten'
                  x-nullable: true
                distance_sale:
                  type: boolean
                  description: You can pay VAT in the Netherlands up to a certain
                    threshold amount and therefore choose false here
                  default: false
                  x-nullable: true
                contact:
                  type: object
                  properties:
                    is_individual:
                      type: boolean
                      description: A contact is assumed to be a company unless this
                        is true.
                      default: false
                      x-nullable: true
                    is_supplier:
                      type: boolean
                      description: A contact is assumed to be a customer unless this
                        is true.
                      default: false
                      x-nullable: true
                    company_name:
                      type: string
                      description: Required if is_individual is false.
                      x-nullable: true
                    contact_person_name:
                      type: string
                      description: Required if is_individual is true.
                      x-nullable: true
                    contact_person_email_address:
                      type: string
                      x-nullable: true
                    address:
                      type: string
                      x-nullable: true
                    zipcode:
                      type: string
                      x-nullable: true
                    city:
                      type: string
                      x-nullable: true
                    government_identification_number:
                      type: string
                      description: Het Overheidsidentificatienummer (OIN) is verplicht
                        voor het uitwisselen van e-facturen met '                 '
                        overheidsorganisaties.
                      x-nullable: true
                    country_code:
                      type: string
                      description: ISO 3166-1 alpha-2 country code.
                      x-nullable: true
                    kvk_number:
                      type: string
                      x-nullable: true
                    phone:
                      type: string
                      x-nullable: true
                    vat_number:
                      type: string
                      x-nullable: true
                    contact_number:
                      type: string
                      description: Unique reference number for your customers and/or
                        suppliers, if left blank a new number is automatically generated
                        and assigned.
                      x-nullable: true
                    free_1:
                      type: string
                      x-nullable: true
                    free_2:
                      type: string
                      x-nullable: true
                    free_3:
                      type: string
                      x-nullable: true
                  description: 'New contact to be associated with this sales invoice.
                    Create only: use the contacts endpoints to update or delete existing
                    contacts. Any previous contact is dissociated, but not deleted.
                    Note that once the invoice is published its cached contact properties
                    are locked. Write only.'
                  x-nullable: true
                invoice_lines:
                  type: array
                  items:
                    type: object
                    properties:
                      description:
                        type: string
                        description: Description of the product or service in no more
                          than 255 characters.
                        x-nullable: true
                      extended_description:
                        type: string
                        description: Extended description of the invoice line.
                        x-nullable: true
                      price_per_unit:
                        type: string
                        description: This property states the price with VAT excluded
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      vat_rate:
                        type: string
                        description: Tax rate expressed by a decimal number, e.g.
                          "0.21" means 21%. This property is derived from the invoice
                          line's VAT type, unless that type is "custom", in which
                          case a custom vat_rate must be provided. In other cases
                          the given vat_rate is ignored. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      vat_type_id:
                        type: integer
                        description: Defaults to company's default VAT type or VAT
                          type "vat_high".
                        x-nullable: true
                      quantity:
                        type: string
                        default: '1.0'
                        description: Arbitrary-precision floating point number represented
                          as a string.
                        x-nullable: true
                      product_id:
                        type: integer
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
                payments:
                  type: array
                  items:
                    type: object
                    properties:
                      amount:
                        type: string
                        description: Paid amount in Euro. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      description:
                        type: string
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
                      paid_at:
                        type: datetime
                        x-nullable: true
                  description: 'Create only: use the payments API to update or delete
                    existing payments. Requires the ''manage:payments'' scope. Write
                    only.'
          required:
          - sales_invoice
          example:
            sales_invoice:
              description: Rompslomp.nl B.V.
              invoice_lines:
              - description: New invoice line
                quantity: 5
                price_per_unit: '10.0'
              - id: '614157105'
                description: Updated invoice line
                quantity: 5
              - id: '634894862'
                description: Destroyed invoice line
                _destroy: true
              payments:
              - amount: '363.0'
                paid_at: '2024-03-01 00:00:00 +0100'
                account_id: '668739460'
              - amount: '363.0'
                paid_at: '2024-03-02T00:00:00.000+01:00'
                account_id: '668739460'
              api_reference: abcd1234
              payment_reference: abcd1234
        required: true
      responses:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Factuur is invalid: Factuurdatum moet opgegeven zijn.'
                type: client.parameters.validation
        '200':
          description: successful
          schema:
            type: object
            properties:
              sales_invoice:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  date:
                    type: date
                    description: Defaults to current date.
                    x-nullable: true
                  due_date:
                    type: date
                    description: If the due date is left blank it will be derived
                      from the company's payment period.
                    x-nullable: true
                  payment_method:
                    type: string
                    enum:
                    - pay_transfer
                    - paid_cash
                    - paid_pin
                    - paid_already
                    - pay_ideal
                    - paid_sepa
                    - pay_custom
                    x-nullable: true
                  custom_payment_instructions:
                    type: string
                    description: Accepts placeholders. Required if payment_method
                      is "pay_custom". Omitted from responses for other payment methods.
                    x-nullable: true
                  pay_url:
                    type: string
                    description: Location that allows the debtor to pay the open amount
                      using iDEAL | Wero. This property is included only if an unused
                      pay-URL is present. Use the creates_pay_url_on_publish property
                      to create a pay-URL at invoice publication. Read only.
                    x-nullable: true
                  creates_pay_url_on_publish:
                    type: boolean
                    description: If true an iDEAL | Wero pay-URL for the invoice's
                      amount owed is attached when the invoice is published. Note
                      that the company must have enabled iDEAL | Wero payments by
                      connecting with Mollie. If iDEAL | Wero payments are no longer
                      enabled at publication, no pay-URL is created. The property
                      is included in responses only if it's true and before publication.
                    default: false
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  status:
                    type: string
                    enum:
                    - concept
                    - imported
                    - published
                    description: Read only.
                    x-nullable: true
                  price_without_vat:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  price_with_vat:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  vat_amount:
                    type: string
                    description: Amount of VAT in Euro. Arbitrary-precision floating
                      point number represented as a string. Read only.
                    x-nullable: true
                  contact_id:
                    type: integer
                    description: Note that once the invoice is published its cached
                      contact properties are locked.
                    x-nullable: true
                  invoice_number:
                    type: string
                    description: Read only.
                    x-nullable: true
                  published_at:
                    type: date
                    description: Read only.
                    x-nullable: true
                  payment_status:
                    type: string
                    enum:
                    - paid
                    - unpaid
                    - overpaid
                    description: Read only.
                    x-nullable: true
                  open_amount:
                    type: string
                    description: Unpaid amount in Euro. Arbitrary-precision floating
                      point number represented as a string. Read only.
                    x-nullable: true
                  currency:
                    type: string
                    description: Lower case 3-character ISO 4217 code. Default is
                      Euro. For presentation only, bare amounts are always in Euro.
                    x-nullable: true
                  currency_exchange_rate:
                    type: string
                    description: Value of € 1,00 in the currency specified with the
                      currency property. Required unless currency is Euro. Arbitrary-precision
                      floating point number represented as a string.
                    x-nullable: true
                  sends_copy_by_email_on_publish:
                    type: boolean
                    description: If true the invoice is sent to the contact person's
                      email address when it is published. The property is included
                      in responses only if it's true and before publication.
                    default: false
                    x-nullable: true
                  template_id:
                    type: integer
                    description: Leave blank to use the default invoice template.
                    x-nullable: true
                  vat_number:
                    type: string
                    description: A VAT number is required when any invoice line's
                      VAT type is "vat_reverse_charged", or when the VAT type "vat_zero"
                      is assigned and the invoice is addressed to a EU country other
                      than the Netherlands.
                    x-nullable: true
                  validates_vat_number:
                    type: boolean
                    description: If a vat_number is given it is formatted and validated,
                      unless validates_vat_number is false. This property is included
                      only if it is false.
                    default: true
                    x-nullable: true
                  api_reference:
                    type: string
                    description: Optional reference that is not exposed by other means
                      than the API. Must be unique per company.
                    x-nullable: true
                  payment_reference:
                    type: string
                    description: Optional payment reference supplied by the customer
                    x-nullable: true
                  sale_type:
                    type: string
                    description: 'In case contact is outside Netherlands, you can
                      select one of the options. ["supply", "service", "service_digital"],
                      supply: Levering, service: Diensten, service_digital: Digitale
                      diensten'
                    x-nullable: true
                  distance_sale:
                    type: boolean
                    description: You can pay VAT in the Netherlands up to a certain
                      threshold amount and therefore choose false here
                    default: false
                    x-nullable: true
                  cached_contact:
                    type: object
                    properties:
                      name:
                        type: string
                        x-nullable: true
                      contact_person_name:
                        type: string
                        x-nullable: true
                      address:
                        type: string
                        x-nullable: true
                      zipcode:
                        type: string
                        x-nullable: true
                      city:
                        type: string
                        x-nullable: true
                      country_code:
                        type: string
                        x-nullable: true
                      contact_person_email_address:
                        type: string
                        x-nullable: true
                      contact_number:
                        type: string
                        x-nullable: true
                    required:
                    - name
                    - contact_person_name
                    - address
                    - zipcode
                    - city
                    - country_code
                    - contact_person_email_address
                    - contact_number
                    description: Details of the associated contact. Subset of the
                      Contact model. Locked when the invoice is published. Read only.
                    x-nullable: true
                  attachment_objects:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        attachment:
                          description:
                            type: string
                            format: string
                            write_only: true
                            description: Base64 encoded file
                          x-nullable: true
                        attachment_file_name:
                          type: string
                          x-nullable: true
                        attachment_content_type:
                          type: string
                          description: Read only.
                          x-nullable: true
                        attachment_file_size:
                          type: integer
                          description: Read only.
                          x-nullable: true
                      required:
                      - id
                      - attachment
                      - attachment_file_name
                      - attachment_content_type
                      - attachment_file_size
                    description: Read only.
                  invoice_lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          default: '1.0'
                          description: Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        product_id:
                          type: integer
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                required:
                - id
                - date
                - due_date
                - payment_method
                - description
                - status
                - price_without_vat
                - price_with_vat
                - vat_amount
                - contact_id
                - invoice_number
                - published_at
                - payment_status
                - open_amount
                - currency
                - currency_exchange_rate
                - template_id
                - vat_number
                - cached_contact
                - attachment_objects
                - invoice_lines
            required:
            - sales_invoice
          examples:
            application/json:
              sales_invoice:
                id: 573784502
                date: '2024-03-02'
                due_date: '2024-04-01'
                payment_method: pay_transfer
                description: Rompslomp.nl B.V.
                status: concept
                price_without_vat: '425.0'
                price_with_vat: '514.25'
                vat_amount: '89.25'
                contact_id: 614157105
                invoice_number:
                published_at:
                payment_status: paid
                open_amount: '0.0'
                currency: eur
                currency_exchange_rate: '1.0'
                template_id:
                vat_number: NL123456789B01
                api_reference: abcd1234
                payment_reference: abcd1234
                sale_type: supply
                distance_sale: false
                cached_contact:
                  name: Rompslomp.nl BV
                  contact_person_name: Rob S. Lomp
                  address: Grebbeberglaan 15
                  zipcode: 3527 VX
                  city: Utrecht
                  country_code: NL
                  contact_person_email_address: rob@example.org
                  contact_number: K00001
                attachment_objects: []
                invoice_lines:
                - id: 614157105
                  description: Updated invoice line
                  extended_description:
                  price_per_unit: '75.0'
                  price_with_vat: '453.75'
                  price_without_vat: '375.0'
                  vat_amount: '78.75'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '5.0'
                  product_id:
                  account_id:
                  account_path:
                - id: 620898587
                  description: New invoice line
                  extended_description:
                  price_per_unit: '10.0'
                  price_with_vat: '60.5'
                  price_without_vat: '50.0'
                  vat_amount: '10.5'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '5.0'
                  product_id:
                  account_id:
                  account_path:
    delete:
      summary: delete sales invoice
      tags:
      - Sales invoices
      responses:
        '204':
          description: successful
  "/api/v1/companies/{company_id}/journal_entries/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: Journal entry ID
      required: true
    get:
      summary: show journal entry
      tags:
      - Journal entries
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              journal_entry:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  date:
                    type: date
                    x-nullable: true
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                        debit_amount:
                          type: string
                          description: Provide either a debit amount or a credit amount.
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        credit_amount:
                          type: string
                          description: Provide either a debit amount or a credit amount.
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                      required:
                      - id
                      - account_id
                      - account_path
                      - debit_amount
                      - credit_amount
                required:
                - id
                - description
                - date
                - lines
            required:
            - journal_entry
          examples:
            application/json:
              journal_entry:
                id: 708176756
                description: Externe kosten
                date: '2024-03-02'
                lines:
                - id: 708176756
                  account_id: 1884372593
                  account_path: activa.current_assets.liquid_assets.bank
                  debit_amount:
                  credit_amount: '1250.0'
                - id: 727734849
                  account_id: 744624972
                  account_path: profit.costs.other_costs.misc
                  debit_amount: '1250.0'
                  credit_amount:
    patch:
      summary: update journal entry
      tags:
      - Journal entries
      parameters:
      - name: journal_entry
        in: body
        schema:
          type: object
          properties:
            journal_entry:
              type: object
              properties:
                description:
                  type: string
                  x-nullable: true
                date:
                  type: date
                  x-nullable: true
                lines:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
                      debit_amount:
                        type: string
                        description: Provide either a debit amount or a credit amount.
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      credit_amount:
                        type: string
                        description: Provide either a debit amount or a credit amount.
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
          required:
          - journal_entry
          example:
            journal_entry:
              description: Updated journal entry description
        required: true
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              journal_entry:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  date:
                    type: date
                    x-nullable: true
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                        debit_amount:
                          type: string
                          description: Provide either a debit amount or a credit amount.
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        credit_amount:
                          type: string
                          description: Provide either a debit amount or a credit amount.
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                      required:
                      - id
                      - account_id
                      - account_path
                      - debit_amount
                      - credit_amount
                required:
                - id
                - description
                - date
                - lines
            required:
            - journal_entry
          examples:
            application/json:
              journal_entry:
                id: 727734849
                description: Updated journal entry description
                date: '2024-03-02'
                lines:
                - id: 681363806
                  account_id: 234985370
                  account_path: activa.current_assets.liquid_assets.bank
                  debit_amount:
                  credit_amount: '1250.0'
                - id: 701184043
                  account_id: 2048226677
                  account_path: profit.costs.other_costs.misc
                  debit_amount: '1250.0'
                  credit_amount:
    delete:
      summary: delete journal entry
      tags:
      - Journal entries
      responses:
        '204':
          description: successful
  "/api/v1/companies/{company_id}/journal_entries":
    parameters:
    - "$ref": "#/parameters/company_id"
    get:
      summary: list journal entries
      tags:
      - Journal entries
      parameters:
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              journal_entries:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    description:
                      type: string
                      x-nullable: true
                    date:
                      type: date
                      x-nullable: true
                    lines:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Read only.
                            x-nullable: true
                          account_id:
                            type: integer
                            x-nullable: true
                          account_path:
                            description: When both account_path and account_id are
                              given the latter has precedence.
                            x-nullable: true
                          debit_amount:
                            type: string
                            description: Provide either a debit amount or a credit
                              amount. Arbitrary-precision floating point number represented
                              as a string.
                            x-nullable: true
                          credit_amount:
                            type: string
                            description: Provide either a debit amount or a credit
                              amount. Arbitrary-precision floating point number represented
                              as a string.
                            x-nullable: true
                        required:
                        - id
                        - account_id
                        - account_path
                        - debit_amount
                        - credit_amount
                  required:
                  - id
                  - description
                  - date
                  - lines
            required:
            - journal_entries
          examples:
            application/json:
              journal_entries:
              - id: 701184043
                description: Externe kosten
                date: '2024-03-02'
                lines:
                - id: 795774434
                  account_id: 325272492
                  account_path: activa.current_assets.liquid_assets.bank
                  debit_amount:
                  credit_amount: '1250.0'
                - id: 748551423
                  account_id: 1333010567
                  account_path: profit.costs.other_costs.misc
                  debit_amount: '1250.0'
                  credit_amount:
    post:
      summary: create journal entry
      tags:
      - Journal entries
      parameters:
      - name: journal_entry
        in: body
        schema:
          type: object
          properties:
            journal_entry:
              type: object
              properties:
                description:
                  type: string
                  x-nullable: true
                date:
                  type: date
                  x-nullable: true
                lines:
                  type: array
                  items:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
                      debit_amount:
                        type: string
                        description: Provide either a debit amount or a credit amount.
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      credit_amount:
                        type: string
                        description: Provide either a debit amount or a credit amount.
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
          required:
          - journal_entry
          example:
            journal_entry:
              description: Externe kosten
              date: '2024-03-02'
              lines:
              - account_id: 1690501118
                account_path: activa.current_assets.liquid_assets.bank
                debit_amount:
                credit_amount: '1250.0'
              - account_id: 1356324041
                account_path: profit.costs.other_costs.misc
                debit_amount: '1250.0'
                credit_amount:
        required: true
      responses:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Boeking is invalid: Date moet opgegeven zijn.'
                type: client.parameters.validation
        '201':
          description: successful
          schema:
            type: object
            properties:
              journal_entry:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  date:
                    type: date
                    x-nullable: true
                  lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                        debit_amount:
                          type: string
                          description: Provide either a debit amount or a credit amount.
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        credit_amount:
                          type: string
                          description: Provide either a debit amount or a credit amount.
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                      required:
                      - id
                      - account_id
                      - account_path
                      - debit_amount
                      - credit_amount
                required:
                - id
                - description
                - date
                - lines
            required:
            - journal_entry
          examples:
            application/json:
              journal_entry:
                id: 795774434
                description: Externe kosten
                date: '2024-03-02'
                lines:
                - id: 546973584
                  account_id: 1690501118
                  account_path: activa.current_assets.liquid_assets.bank
                  debit_amount:
                  credit_amount: '1250.0'
                - id: 567711597
                  account_id: 1356324041
                  account_path: profit.costs.other_costs.misc
                  debit_amount: '1250.0'
                  credit_amount:
  "/api/v1/companies/{company_id}/quotations":
    parameters:
    - "$ref": "#/parameters/company_id"
    get:
      summary: list quotations
      tags:
      - Quotations
      parameters:
      - name: selection
        in: query
        type: string
        enum:
        - all
        - approved
        - stopped
        - published
        - concept
        - invoiced
        default: all
        description: Name of selection filter to apply.
      - name: search[from]
        in: query
        type: string
        format: date
        description: Filter quotations by minimum date. ISO 8601 formatted, e.g. "2020-01-31".
      - name: search[till]
        in: query
        type: string
        format: date
        description: Filter quotations by maximum date. ISO 8601 formatted, e.g. "2020-01-31".
      - name: search[contact_id]
        in: query
        type: integer
        description: Filter quotations by contact id.
      - name: search[api_reference]
        in: query
        type: string
        description: Filter quotations by custom reference for API clients
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              quotations:
                type: array
                items:
                  type: object
                  properties:
                    contact_id:
                      type: integer
                      description: Note that once the invoice is published its cached
                        contact properties are locked.
                      x-nullable: true
                    template_id:
                      type: integer
                      description: Leave blank to use the default invoice template.
                      x-nullable: true
                    invoice_number:
                      type: string
                      x-nullable: true
                    date:
                      type: date
                      description: Defaults to current date.
                      x-nullable: true
                    creates_sign_url_on_publish:
                      type: boolean
                      default: false
                      x-nullable: true
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    sign_url:
                      type: string
                      description: Read only.
                      x-nullable: true
                    status:
                      type: string
                      enum:
                      - concept
                      - imported
                      - published
                      - approved
                      - denied
                      - invoiced
                      description: Read only.
                      x-nullable: true
                    invoice_lines:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Read only.
                            x-nullable: true
                          description:
                            type: string
                            description: Description of the product or service in
                              no more than 255 characters.
                            x-nullable: true
                          extended_description:
                            type: string
                            description: Extended description of the invoice line.
                            x-nullable: true
                          price_per_unit:
                            type: string
                            description: This property states the price with VAT excluded
                              Arbitrary-precision floating point number represented
                              as a string.
                            x-nullable: true
                          price_with_vat:
                            type: string
                            description: Arbitrary-precision floating point number
                              represented as a string. Read only.
                            x-nullable: true
                          price_without_vat:
                            type: string
                            description: Arbitrary-precision floating point number
                              represented as a string. Read only.
                            x-nullable: true
                          vat_amount:
                            type: string
                            description: Amount of VAT in Euro. Arbitrary-precision
                              floating point number represented as a string. Read
                              only.
                            x-nullable: true
                          vat_rate:
                            type: string
                            description: Tax rate expressed by a decimal number, e.g.
                              "0.21" means 21%. This property is derived from the
                              invoice line's VAT type, unless that type is "custom",
                              in which case a custom vat_rate must be provided. In
                              other cases the given vat_rate is ignored. Arbitrary-precision
                              floating point number represented as a string.
                            x-nullable: true
                          vat_type_id:
                            type: integer
                            description: Defaults to company's default VAT type or
                              VAT type "vat_high".
                            x-nullable: true
                          quantity:
                            type: string
                            default: '1.0'
                            description: Arbitrary-precision floating point number
                              represented as a string.
                            x-nullable: true
                          product_id:
                            type: integer
                            x-nullable: true
                          account_id:
                            type: integer
                            x-nullable: true
                          account_path:
                            description: When both account_path and account_id are
                              given the latter has precedence.
                            x-nullable: true
                        required:
                        - id
                        - description
                        - extended_description
                        - price_per_unit
                        - price_with_vat
                        - price_without_vat
                        - vat_amount
                        - vat_rate
                        - vat_type_id
                        - quantity
                        - product_id
                        - account_id
                        - account_path
                  required:
                  - contact_id
                  - template_id
                  - invoice_number
                  - date
                  - id
                  - status
                  - invoice_lines
            required:
            - quotations
          examples:
            application/json:
              quotations:
              - contact_id: 620898587
                template_id:
                invoice_number:
                date: '2024-03-02'
                id: 546973584
                status: concept
                invoice_lines:
                - id: 997003205
                  description: some
                  extended_description:
                  price_per_unit: '10.0'
                  price_with_vat: '12.1'
                  price_without_vat: '10.0'
                  vat_amount: '2.1'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
    post:
      summary: create quotations
      tags:
      - Quotations
      parameters:
      - name: quotation
        in: body
        schema:
          type: object
          properties:
            quotation:
              type: object
              properties:
                contact_id:
                  type: integer
                  description: Note that once the invoice is published its cached
                    contact properties are locked.
                  x-nullable: true
                template_id:
                  type: integer
                  description: Leave blank to use the default invoice template.
                  x-nullable: true
                invoice_number:
                  type: string
                  x-nullable: true
                date:
                  type: date
                  description: Defaults to current date.
                  x-nullable: true
                creates_sign_url_on_publish:
                  type: boolean
                  default: false
                  x-nullable: true
                _publish:
                  type: boolean
                  description: By default a quotation is created as a concept. If
                    this trigger is true the quotation is immediately published. Write
                    only.
                  x-nullable: true
                _deny:
                  type: boolean
                  description: If this trigger is true the quotation is denied. In
                    order to deny a quotation, it must first be saved and either published
                    or approved. I.e. this trigger can only be used when updating
                    a published or approved quotation. Write only.
                  x-nullable: true
                _approve:
                  type: boolean
                  description: If this trigger is true the quotation is approved.
                    In order to approve a quotation, it must first be saved and either
                    published or denied. I.e. this trigger can only be used when updating
                    a published or denied quotation. Write only.
                  x-nullable: true
                invoice_lines:
                  type: array
                  items:
                    type: object
                    properties:
                      description:
                        type: string
                        description: Description of the product or service in no more
                          than 255 characters.
                        x-nullable: true
                      extended_description:
                        type: string
                        description: Extended description of the invoice line.
                        x-nullable: true
                      price_per_unit:
                        type: string
                        description: This property states the price with VAT excluded
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      vat_rate:
                        type: string
                        description: Tax rate expressed by a decimal number, e.g.
                          "0.21" means 21%. This property is derived from the invoice
                          line's VAT type, unless that type is "custom", in which
                          case a custom vat_rate must be provided. In other cases
                          the given vat_rate is ignored. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      vat_type_id:
                        type: integer
                        description: Defaults to company's default VAT type or VAT
                          type "vat_high".
                        x-nullable: true
                      quantity:
                        type: string
                        default: '1.0'
                        description: Arbitrary-precision floating point number represented
                          as a string.
                        x-nullable: true
                      product_id:
                        type: integer
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
          required:
          - quotation
          example:
            quotation:
              contact_id: 977180904
              template_id:
              invoice_number:
              date: '2024-03-02'
              invoice_lines:
              - description: some
                extended_description:
                price_per_unit: '10.0'
                vat_rate: '0.21'
                vat_type_id: 708176756
                quantity: '1.0'
                product_id:
                account_id:
                account_path:
        required: true
      responses:
        '201':
          description: successful
          schema:
            type: object
            properties:
              quotation:
                type: object
                properties:
                  contact_id:
                    type: integer
                    description: Note that once the invoice is published its cached
                      contact properties are locked.
                    x-nullable: true
                  template_id:
                    type: integer
                    description: Leave blank to use the default invoice template.
                    x-nullable: true
                  invoice_number:
                    type: string
                    x-nullable: true
                  date:
                    type: date
                    description: Defaults to current date.
                    x-nullable: true
                  creates_sign_url_on_publish:
                    type: boolean
                    default: false
                    x-nullable: true
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  sign_url:
                    type: string
                    description: Read only.
                    x-nullable: true
                  status:
                    type: string
                    enum:
                    - concept
                    - imported
                    - published
                    - approved
                    - denied
                    - invoiced
                    description: Read only.
                    x-nullable: true
                  invoice_lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          default: '1.0'
                          description: Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        product_id:
                          type: integer
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                required:
                - contact_id
                - template_id
                - invoice_number
                - date
                - id
                - status
                - invoice_lines
            required:
            - quotation
          examples:
            application/json:
              quotation:
                contact_id: 977180904
                template_id:
                invoice_number:
                date: '2024-03-02'
                id: 553977466
                status: concept
                invoice_lines:
                - id: 956521660
                  description: some
                  extended_description:
                  price_per_unit: '10.0'
                  price_with_vat: '12.1'
                  price_without_vat: '10.0'
                  vat_amount: '2.1'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Offerte is invalid: Contact moet opgegeven zijn.'
                type: client.parameters.validation
  "/api/v1/companies/{company_id}/quotations/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: Quotation ID
      required: true
    delete:
      summary: delete quotation
      tags:
      - Quotations
      responses:
        '204':
          description: successful
    patch:
      summary: update quotation
      tags:
      - Quotations
      parameters:
      - name: quotation
        in: body
        schema:
          type: object
          properties:
            quotation:
              type: object
              properties:
                contact_id:
                  type: integer
                  description: Note that once the invoice is published its cached
                    contact properties are locked.
                  x-nullable: true
                template_id:
                  type: integer
                  description: Leave blank to use the default invoice template.
                  x-nullable: true
                invoice_number:
                  type: string
                  x-nullable: true
                date:
                  type: date
                  description: Defaults to current date.
                  x-nullable: true
                creates_sign_url_on_publish:
                  type: boolean
                  default: false
                  x-nullable: true
                _publish:
                  type: boolean
                  description: By default a quotation is created as a concept. If
                    this trigger is true the quotation is immediately published. Write
                    only.
                  x-nullable: true
                _deny:
                  type: boolean
                  description: If this trigger is true the quotation is denied. In
                    order to deny a quotation, it must first be saved and either published
                    or approved. I.e. this trigger can only be used when updating
                    a published or approved quotation. Write only.
                  x-nullable: true
                _approve:
                  type: boolean
                  description: If this trigger is true the quotation is approved.
                    In order to approve a quotation, it must first be saved and either
                    published or denied. I.e. this trigger can only be used when updating
                    a published or denied quotation. Write only.
                  x-nullable: true
                invoice_lines:
                  type: array
                  items:
                    type: object
                    properties:
                      description:
                        type: string
                        description: Description of the product or service in no more
                          than 255 characters.
                        x-nullable: true
                      extended_description:
                        type: string
                        description: Extended description of the invoice line.
                        x-nullable: true
                      price_per_unit:
                        type: string
                        description: This property states the price with VAT excluded
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      vat_rate:
                        type: string
                        description: Tax rate expressed by a decimal number, e.g.
                          "0.21" means 21%. This property is derived from the invoice
                          line's VAT type, unless that type is "custom", in which
                          case a custom vat_rate must be provided. In other cases
                          the given vat_rate is ignored. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      vat_type_id:
                        type: integer
                        description: Defaults to company's default VAT type or VAT
                          type "vat_high".
                        x-nullable: true
                      quantity:
                        type: string
                        default: '1.0'
                        description: Arbitrary-precision floating point number represented
                          as a string.
                        x-nullable: true
                      product_id:
                        type: integer
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
          required:
          - quotation
          example:
            quotation:
              date: '2024-03-01'
        required: true
      responses:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Offerte is invalid: Offertedatum moet opgegeven zijn.'
                type: client.parameters.validation
        '200':
          description: successful
          schema:
            type: object
            properties:
              quotation:
                type: object
                properties:
                  contact_id:
                    type: integer
                    description: Note that once the invoice is published its cached
                      contact properties are locked.
                    x-nullable: true
                  template_id:
                    type: integer
                    description: Leave blank to use the default invoice template.
                    x-nullable: true
                  invoice_number:
                    type: string
                    x-nullable: true
                  date:
                    type: date
                    description: Defaults to current date.
                    x-nullable: true
                  creates_sign_url_on_publish:
                    type: boolean
                    default: false
                    x-nullable: true
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  sign_url:
                    type: string
                    description: Read only.
                    x-nullable: true
                  status:
                    type: string
                    enum:
                    - concept
                    - imported
                    - published
                    - approved
                    - denied
                    - invoiced
                    description: Read only.
                    x-nullable: true
                  invoice_lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          default: '1.0'
                          description: Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        product_id:
                          type: integer
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                required:
                - contact_id
                - template_id
                - invoice_number
                - date
                - id
                - status
                - invoice_lines
            required:
            - quotation
          examples:
            application/json:
              quotation:
                contact_id: 956521660
                template_id:
                invoice_number:
                date: '2024-03-01'
                id: 634894862
                status: concept
                invoice_lines:
                - id: 1023508573
                  description: some
                  extended_description:
                  price_per_unit: '10.0'
                  price_with_vat: '12.1'
                  price_without_vat: '10.0'
                  vat_amount: '2.1'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
    get:
      summary: show quotation
      tags:
      - Quotations
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              quotation:
                type: object
                properties:
                  contact_id:
                    type: integer
                    description: Note that once the invoice is published its cached
                      contact properties are locked.
                    x-nullable: true
                  template_id:
                    type: integer
                    description: Leave blank to use the default invoice template.
                    x-nullable: true
                  invoice_number:
                    type: string
                    x-nullable: true
                  date:
                    type: date
                    description: Defaults to current date.
                    x-nullable: true
                  creates_sign_url_on_publish:
                    type: boolean
                    default: false
                    x-nullable: true
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  sign_url:
                    type: string
                    description: Read only.
                    x-nullable: true
                  status:
                    type: string
                    enum:
                    - concept
                    - imported
                    - published
                    - approved
                    - denied
                    - invoiced
                    description: Read only.
                    x-nullable: true
                  invoice_lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          default: '1.0'
                          description: Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        product_id:
                          type: integer
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                required:
                - contact_id
                - template_id
                - invoice_number
                - date
                - id
                - status
                - invoice_lines
            required:
            - quotation
          examples:
            application/json:
              quotation:
                contact_id: 1044366217
                template_id:
                invoice_number:
                date: '2024-03-02'
                id: 620898587
                status: concept
                invoice_lines:
                - id: 842856234
                  description: some
                  extended_description:
                  price_per_unit: '10.0'
                  price_with_vat: '12.1'
                  price_without_vat: '10.0'
                  vat_amount: '2.1'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
  "/api/v1/companies/{company_id}/expenses":
    parameters:
    - "$ref": "#/parameters/company_id"
    get:
      summary: list expenses
      tags:
      - Expenses
      parameters:
      - name: selection
        in: query
        type: string
        enum:
        - all
        - unpaid
        - investments
        - overpaid
        - credit_invoices
        default: all
        description: Name of selection filter to apply.
      - name: search[from]
        in: query
        type: string
        format: date
        description: Filter expenses by minimum date. ISO 8601 formatted, e.g. "2020-01-31".
      - name: search[till]
        in: query
        type: string
        format: date
        description: Filter expenses by maximum date. ISO 8601 formatted, e.g. "2020-01-31".
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              expenses:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    date:
                      type: date
                      description: Defaults to current date.
                      x-nullable: true
                    state:
                      x-nullable: true
                    type_account_id:
                      type: integer
                      x-nullable: true
                    currency:
                      type: string
                      description: Lower case 3-character ISO 4217 code. Default is
                        Euro. For presentation only, bare amounts are always in Euro.
                      x-nullable: true
                    contact_id:
                      type: integer
                      description: Note that once the invoice is published its cached
                        contact properties are locked.
                      x-nullable: true
                    invoice_number:
                      type: string
                      description: Read only.
                      x-nullable: true
                    type_account:
                      type: object
                      properties:
                        id:
                          type: integer
                          x-nullable: true
                        name:
                          type: string
                          x-nullable: true
                        path_name:
                          type: string
                          x-nullable: true
                        path:
                          type: string
                          x-nullable: true
                        reference:
                          type: string
                          x-nullable: true
                        type:
                          type: string
                          x-nullable: true
                        parent_id:
                          type: integer
                          description: ID of this account's parent account
                          x-nullable: true
                      required:
                      - id
                      - name
                      - path_name
                      - path
                      - reference
                      - type
                      - parent_id
                      x-nullable: true
                    cached_contact:
                      type: object
                      properties:
                        name:
                          type: string
                          x-nullable: true
                        contact_person_name:
                          type: string
                          x-nullable: true
                        address:
                          type: string
                          x-nullable: true
                        zipcode:
                          type: string
                          x-nullable: true
                        city:
                          type: string
                          x-nullable: true
                        country_code:
                          type: string
                          x-nullable: true
                        contact_person_email_address:
                          type: string
                          x-nullable: true
                        contact_number:
                          type: string
                          x-nullable: true
                      required:
                      - name
                      - contact_person_name
                      - address
                      - zipcode
                      - city
                      - country_code
                      - contact_person_email_address
                      - contact_number
                      description: Details of the associated contact. Subset of the
                        Contact model. Locked when the invoice is published. Read
                        only.
                      x-nullable: true
                    invoice_lines:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Read only.
                            x-nullable: true
                          description:
                            type: string
                            description: Description of the product or service in
                              no more than 255 characters.
                            x-nullable: true
                          extended_description:
                            type: string
                            description: Extended description of the invoice line.
                            x-nullable: true
                          price_per_unit:
                            type: string
                            description: This property states the price with VAT excluded
                              Arbitrary-precision floating point number represented
                              as a string.
                            x-nullable: true
                          price_with_vat:
                            type: string
                            description: Arbitrary-precision floating point number
                              represented as a string. Read only.
                            x-nullable: true
                          price_without_vat:
                            type: string
                            description: Arbitrary-precision floating point number
                              represented as a string. Read only.
                            x-nullable: true
                          vat_amount:
                            type: string
                            description: Amount of VAT in Euro. Arbitrary-precision
                              floating point number represented as a string. Read
                              only.
                            x-nullable: true
                          vat_rate:
                            type: string
                            description: Tax rate expressed by a decimal number, e.g.
                              "0.21" means 21%. This property is derived from the
                              invoice line's VAT type, unless that type is "custom",
                              in which case a custom vat_rate must be provided. In
                              other cases the given vat_rate is ignored. Arbitrary-precision
                              floating point number represented as a string.
                            x-nullable: true
                          vat_type_id:
                            type: integer
                            description: Defaults to company's default VAT type or
                              VAT type "vat_high".
                            x-nullable: true
                          quantity:
                            type: string
                            default: '1.0'
                            description: Arbitrary-precision floating point number
                              represented as a string.
                            x-nullable: true
                          product_id:
                            type: integer
                            x-nullable: true
                          account_id:
                            type: integer
                            x-nullable: true
                          account_path:
                            description: When both account_path and account_id are
                              given the latter has precedence.
                            x-nullable: true
                        required:
                        - id
                        - description
                        - extended_description
                        - price_per_unit
                        - price_with_vat
                        - price_without_vat
                        - vat_amount
                        - vat_rate
                        - vat_type_id
                        - quantity
                        - product_id
                        - account_id
                        - account_path
                  required:
                  - id
                  - date
                  - state
                  - type_account_id
                  - currency
                  - contact_id
                  - invoice_number
                  - type_account
                  - cached_contact
                  - invoice_lines
            required:
            - expenses
          examples:
            application/json:
              expenses:
              - id: 708176756
                date: '2024-03-02'
                state: published
                type_account_id: 1138923448
                currency: eur
                contact_id: 1063924582
                invoice_number: '2024030001'
                type_account:
                  id: 1138923448
                  name: Diversen
                  path_name: Kosten • Overige kosten • Diversen
                  path: profit.costs.other_costs.misc
                  reference: P1.5.8
                  type: costs
                  parent_id: 1213079328
                cached_contact:
                  name: Rompslomp.nl BV
                  contact_person_name: Rob S. Lomp
                  address: Grebbeberglaan 15
                  zipcode: 3527 VX
                  city: Utrecht
                  country_code: NL
                  contact_person_email_address: rob@example.org
                  contact_number: K00001
                invoice_lines:
                - id: 862676487
                  description: some
                  extended_description:
                  price_per_unit: '10.0'
                  price_with_vat: '12.1'
                  price_without_vat: '10.0'
                  vat_amount: '2.1'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
    post:
      summary: create expenses
      tags:
      - Expenses
      parameters:
      - name: expense
        in: body
        schema:
          type: object
          properties:
            expense:
              type: object
              properties:
                date:
                  type: date
                  description: Defaults to current date.
                  x-nullable: true
                state:
                  x-nullable: true
                type_account_id:
                  type: integer
                  x-nullable: true
                currency:
                  type: string
                  description: Lower case 3-character ISO 4217 code. Default is Euro.
                    For presentation only, bare amounts are always in Euro.
                  x-nullable: true
                contact_id:
                  type: integer
                  description: Note that once the invoice is published its cached
                    contact properties are locked.
                  x-nullable: true
                type_account:
                  type: object
                  properties:
                    id:
                      type: integer
                      x-nullable: true
                    name:
                      type: string
                      x-nullable: true
                    path_name:
                      type: string
                      x-nullable: true
                    path:
                      type: string
                      x-nullable: true
                    reference:
                      type: string
                      x-nullable: true
                    type:
                      type: string
                      x-nullable: true
                    parent_id:
                      type: integer
                      description: ID of this account's parent account
                      x-nullable: true
                  x-nullable: true
                contact:
                  type: object
                  properties:
                    is_individual:
                      type: boolean
                      description: A contact is assumed to be a company unless this
                        is true.
                      default: false
                      x-nullable: true
                    is_supplier:
                      type: boolean
                      description: A contact is assumed to be a customer unless this
                        is true.
                      default: false
                      x-nullable: true
                    company_name:
                      type: string
                      description: Required if is_individual is false.
                      x-nullable: true
                    contact_person_name:
                      type: string
                      description: Required if is_individual is true.
                      x-nullable: true
                    contact_person_email_address:
                      type: string
                      x-nullable: true
                    address:
                      type: string
                      x-nullable: true
                    zipcode:
                      type: string
                      x-nullable: true
                    city:
                      type: string
                      x-nullable: true
                    government_identification_number:
                      type: string
                      description: Het Overheidsidentificatienummer (OIN) is verplicht
                        voor het uitwisselen van e-facturen met '                 '
                        overheidsorganisaties.
                      x-nullable: true
                    country_code:
                      type: string
                      description: ISO 3166-1 alpha-2 country code.
                      x-nullable: true
                    kvk_number:
                      type: string
                      x-nullable: true
                    phone:
                      type: string
                      x-nullable: true
                    vat_number:
                      type: string
                      x-nullable: true
                    contact_number:
                      type: string
                      description: Unique reference number for your customers and/or
                        suppliers, if left blank a new number is automatically generated
                        and assigned.
                      x-nullable: true
                    free_1:
                      type: string
                      x-nullable: true
                    free_2:
                      type: string
                      x-nullable: true
                    free_3:
                      type: string
                      x-nullable: true
                  description: 'New contact to be associated with this sales invoice.
                    Create only: use the contacts endpoints to update or delete existing
                    contacts. Any previous contact is dissociated, but not deleted.
                    Note that once the invoice is published its cached contact properties
                    are locked. Write only.'
                  x-nullable: true
                invoice_lines:
                  type: array
                  items:
                    type: object
                    properties:
                      description:
                        type: string
                        description: Description of the product or service in no more
                          than 255 characters.
                        x-nullable: true
                      extended_description:
                        type: string
                        description: Extended description of the invoice line.
                        x-nullable: true
                      price_per_unit:
                        type: string
                        description: This property states the price with VAT excluded
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      vat_rate:
                        type: string
                        description: Tax rate expressed by a decimal number, e.g.
                          "0.21" means 21%. This property is derived from the invoice
                          line's VAT type, unless that type is "custom", in which
                          case a custom vat_rate must be provided. In other cases
                          the given vat_rate is ignored. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      vat_type_id:
                        type: integer
                        description: Defaults to company's default VAT type or VAT
                          type "vat_high".
                        x-nullable: true
                      quantity:
                        type: string
                        default: '1.0'
                        description: Arbitrary-precision floating point number represented
                          as a string.
                        x-nullable: true
                      product_id:
                        type: integer
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
          required:
          - expense
          example:
            expense:
              date: '2024-03-02'
              state: published
              type_account_id: 429255073
              currency: eur
              contact_id: 1017553523
              invoice_lines:
              - description: some
                extended_description:
                price_per_unit: '10.0'
                vat_rate: '0.21'
                vat_type_id: 708176756
                quantity: '1.0'
                product_id:
                account_id:
                account_path:
        required: true
      responses:
        '201':
          description: successful
          schema:
            type: object
            properties:
              expense:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  date:
                    type: date
                    description: Defaults to current date.
                    x-nullable: true
                  state:
                    x-nullable: true
                  type_account_id:
                    type: integer
                    x-nullable: true
                  currency:
                    type: string
                    description: Lower case 3-character ISO 4217 code. Default is
                      Euro. For presentation only, bare amounts are always in Euro.
                    x-nullable: true
                  contact_id:
                    type: integer
                    description: Note that once the invoice is published its cached
                      contact properties are locked.
                    x-nullable: true
                  invoice_number:
                    type: string
                    description: Read only.
                    x-nullable: true
                  type_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        x-nullable: true
                      name:
                        type: string
                        x-nullable: true
                      path_name:
                        type: string
                        x-nullable: true
                      path:
                        type: string
                        x-nullable: true
                      reference:
                        type: string
                        x-nullable: true
                      type:
                        type: string
                        x-nullable: true
                      parent_id:
                        type: integer
                        description: ID of this account's parent account
                        x-nullable: true
                    required:
                    - id
                    - name
                    - path_name
                    - path
                    - reference
                    - type
                    - parent_id
                    x-nullable: true
                  cached_contact:
                    type: object
                    properties:
                      name:
                        type: string
                        x-nullable: true
                      contact_person_name:
                        type: string
                        x-nullable: true
                      address:
                        type: string
                        x-nullable: true
                      zipcode:
                        type: string
                        x-nullable: true
                      city:
                        type: string
                        x-nullable: true
                      country_code:
                        type: string
                        x-nullable: true
                      contact_person_email_address:
                        type: string
                        x-nullable: true
                      contact_number:
                        type: string
                        x-nullable: true
                    required:
                    - name
                    - contact_person_name
                    - address
                    - zipcode
                    - city
                    - country_code
                    - contact_person_email_address
                    - contact_number
                    description: Details of the associated contact. Subset of the
                      Contact model. Locked when the invoice is published. Read only.
                    x-nullable: true
                  invoice_lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          default: '1.0'
                          description: Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        product_id:
                          type: integer
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                required:
                - id
                - date
                - state
                - type_account_id
                - currency
                - contact_id
                - invoice_number
                - type_account
                - cached_contact
                - invoice_lines
            required:
            - expense
          examples:
            application/json:
              expense:
                id: 681363806
                date: '2024-03-02'
                state: published
                type_account_id: 429255073
                currency: eur
                contact_id: 1017553523
                invoice_number:
                type_account:
                  id: 429255073
                  name: Diversen
                  path_name: Kosten • Overige kosten • Diversen
                  path: profit.costs.other_costs.misc
                  reference: P1.5.8
                  type: costs
                  parent_id: 133263689
                cached_contact:
                  name: Rompslomp.nl BV
                  contact_person_name: Rob S. Lomp
                  address: Grebbeberglaan 15
                  zipcode: 3527 VX
                  city: Utrecht
                  country_code: NL
                  contact_person_email_address: rob@example.org
                  contact_number: K00001
                invoice_lines:
                - id: 823045118
                  description: some
                  extended_description:
                  price_per_unit: '10.0'
                  price_with_vat: '12.1'
                  price_without_vat: '10.0'
                  vat_amount: '2.1'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Uitgave is invalid: Type account moet opgegeven zijn.'
                type: client.parameters.validation
  "/api/v1/companies/{company_id}/expenses/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: Expense ID
      required: true
    patch:
      summary: update expense
      tags:
      - Expenses
      parameters:
      - name: expense
        in: body
        schema:
          type: object
          properties:
            expense:
              type: object
              properties:
                date:
                  type: date
                  description: Defaults to current date.
                  x-nullable: true
                state:
                  x-nullable: true
                type_account_id:
                  type: integer
                  x-nullable: true
                currency:
                  type: string
                  description: Lower case 3-character ISO 4217 code. Default is Euro.
                    For presentation only, bare amounts are always in Euro.
                  x-nullable: true
                contact_id:
                  type: integer
                  description: Note that once the invoice is published its cached
                    contact properties are locked.
                  x-nullable: true
                type_account:
                  type: object
                  properties:
                    id:
                      type: integer
                      x-nullable: true
                    name:
                      type: string
                      x-nullable: true
                    path_name:
                      type: string
                      x-nullable: true
                    path:
                      type: string
                      x-nullable: true
                    reference:
                      type: string
                      x-nullable: true
                    type:
                      type: string
                      x-nullable: true
                    parent_id:
                      type: integer
                      description: ID of this account's parent account
                      x-nullable: true
                  x-nullable: true
                contact:
                  type: object
                  properties:
                    is_individual:
                      type: boolean
                      description: A contact is assumed to be a company unless this
                        is true.
                      default: false
                      x-nullable: true
                    is_supplier:
                      type: boolean
                      description: A contact is assumed to be a customer unless this
                        is true.
                      default: false
                      x-nullable: true
                    company_name:
                      type: string
                      description: Required if is_individual is false.
                      x-nullable: true
                    contact_person_name:
                      type: string
                      description: Required if is_individual is true.
                      x-nullable: true
                    contact_person_email_address:
                      type: string
                      x-nullable: true
                    address:
                      type: string
                      x-nullable: true
                    zipcode:
                      type: string
                      x-nullable: true
                    city:
                      type: string
                      x-nullable: true
                    government_identification_number:
                      type: string
                      description: Het Overheidsidentificatienummer (OIN) is verplicht
                        voor het uitwisselen van e-facturen met '                 '
                        overheidsorganisaties.
                      x-nullable: true
                    country_code:
                      type: string
                      description: ISO 3166-1 alpha-2 country code.
                      x-nullable: true
                    kvk_number:
                      type: string
                      x-nullable: true
                    phone:
                      type: string
                      x-nullable: true
                    vat_number:
                      type: string
                      x-nullable: true
                    contact_number:
                      type: string
                      description: Unique reference number for your customers and/or
                        suppliers, if left blank a new number is automatically generated
                        and assigned.
                      x-nullable: true
                    free_1:
                      type: string
                      x-nullable: true
                    free_2:
                      type: string
                      x-nullable: true
                    free_3:
                      type: string
                      x-nullable: true
                  description: 'New contact to be associated with this sales invoice.
                    Create only: use the contacts endpoints to update or delete existing
                    contacts. Any previous contact is dissociated, but not deleted.
                    Note that once the invoice is published its cached contact properties
                    are locked. Write only.'
                  x-nullable: true
                invoice_lines:
                  type: array
                  items:
                    type: object
                    properties:
                      description:
                        type: string
                        description: Description of the product or service in no more
                          than 255 characters.
                        x-nullable: true
                      extended_description:
                        type: string
                        description: Extended description of the invoice line.
                        x-nullable: true
                      price_per_unit:
                        type: string
                        description: This property states the price with VAT excluded
                          Arbitrary-precision floating point number represented as
                          a string.
                        x-nullable: true
                      vat_rate:
                        type: string
                        description: Tax rate expressed by a decimal number, e.g.
                          "0.21" means 21%. This property is derived from the invoice
                          line's VAT type, unless that type is "custom", in which
                          case a custom vat_rate must be provided. In other cases
                          the given vat_rate is ignored. Arbitrary-precision floating
                          point number represented as a string.
                        x-nullable: true
                      vat_type_id:
                        type: integer
                        description: Defaults to company's default VAT type or VAT
                          type "vat_high".
                        x-nullable: true
                      quantity:
                        type: string
                        default: '1.0'
                        description: Arbitrary-precision floating point number represented
                          as a string.
                        x-nullable: true
                      product_id:
                        type: integer
                        x-nullable: true
                      account_id:
                        type: integer
                        x-nullable: true
                      account_path:
                        description: When both account_path and account_id are given
                          the latter has precedence.
                        x-nullable: true
          required:
          - expense
          example:
            expense:
              date: '2024-03-01'
        required: true
      responses:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Uitgave is invalid: Factuurdatum moet opgegeven zijn.'
                type: client.parameters.validation
        '200':
          description: successful
          schema:
            type: object
            properties:
              expense:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  date:
                    type: date
                    description: Defaults to current date.
                    x-nullable: true
                  state:
                    x-nullable: true
                  type_account_id:
                    type: integer
                    x-nullable: true
                  currency:
                    type: string
                    description: Lower case 3-character ISO 4217 code. Default is
                      Euro. For presentation only, bare amounts are always in Euro.
                    x-nullable: true
                  contact_id:
                    type: integer
                    description: Note that once the invoice is published its cached
                      contact properties are locked.
                    x-nullable: true
                  invoice_number:
                    type: string
                    description: Read only.
                    x-nullable: true
                  type_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        x-nullable: true
                      name:
                        type: string
                        x-nullable: true
                      path_name:
                        type: string
                        x-nullable: true
                      path:
                        type: string
                        x-nullable: true
                      reference:
                        type: string
                        x-nullable: true
                      type:
                        type: string
                        x-nullable: true
                      parent_id:
                        type: integer
                        description: ID of this account's parent account
                        x-nullable: true
                    required:
                    - id
                    - name
                    - path_name
                    - path
                    - reference
                    - type
                    - parent_id
                    x-nullable: true
                  cached_contact:
                    type: object
                    properties:
                      name:
                        type: string
                        x-nullable: true
                      contact_person_name:
                        type: string
                        x-nullable: true
                      address:
                        type: string
                        x-nullable: true
                      zipcode:
                        type: string
                        x-nullable: true
                      city:
                        type: string
                        x-nullable: true
                      country_code:
                        type: string
                        x-nullable: true
                      contact_person_email_address:
                        type: string
                        x-nullable: true
                      contact_number:
                        type: string
                        x-nullable: true
                    required:
                    - name
                    - contact_person_name
                    - address
                    - zipcode
                    - city
                    - country_code
                    - contact_person_email_address
                    - contact_number
                    description: Details of the associated contact. Subset of the
                      Contact model. Locked when the invoice is published. Read only.
                    x-nullable: true
                  invoice_lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          default: '1.0'
                          description: Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        product_id:
                          type: integer
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                required:
                - id
                - date
                - state
                - type_account_id
                - currency
                - contact_id
                - invoice_number
                - type_account
                - cached_contact
                - invoice_lines
            required:
            - expense
          examples:
            application/json:
              expense:
                id: 775036437
                date: '2024-03-01'
                state: published
                type_account_id: 950533916
                currency: eur
                contact_id: 842856234
                invoice_number: '2024030001'
                type_account:
                  id: 950533916
                  name: Diversen
                  path_name: Kosten • Overige kosten • Diversen
                  path: profit.costs.other_costs.misc
                  reference: P1.5.8
                  type: costs
                  parent_id: 553682564
                cached_contact:
                  name: Rompslomp.nl BV
                  contact_person_name: Rob S. Lomp
                  address: Grebbeberglaan 15
                  zipcode: 3527 VX
                  city: Utrecht
                  country_code: NL
                  contact_person_email_address: rob@example.org
                  contact_number: K00001
                invoice_lines:
                - id: 903049090
                  description: some
                  extended_description:
                  price_per_unit: '10.0'
                  price_with_vat: '12.1'
                  price_without_vat: '10.0'
                  vat_amount: '2.1'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
    delete:
      summary: delete expense
      tags:
      - Expenses
      responses:
        '204':
          description: successful
    get:
      summary: show expense
      tags:
      - Expenses
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              expense:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  date:
                    type: date
                    description: Defaults to current date.
                    x-nullable: true
                  state:
                    x-nullable: true
                  type_account_id:
                    type: integer
                    x-nullable: true
                  currency:
                    type: string
                    description: Lower case 3-character ISO 4217 code. Default is
                      Euro. For presentation only, bare amounts are always in Euro.
                    x-nullable: true
                  contact_id:
                    type: integer
                    description: Note that once the invoice is published its cached
                      contact properties are locked.
                    x-nullable: true
                  invoice_number:
                    type: string
                    description: Read only.
                    x-nullable: true
                  type_account:
                    type: object
                    properties:
                      id:
                        type: integer
                        x-nullable: true
                      name:
                        type: string
                        x-nullable: true
                      path_name:
                        type: string
                        x-nullable: true
                      path:
                        type: string
                        x-nullable: true
                      reference:
                        type: string
                        x-nullable: true
                      type:
                        type: string
                        x-nullable: true
                      parent_id:
                        type: integer
                        description: ID of this account's parent account
                        x-nullable: true
                    required:
                    - id
                    - name
                    - path_name
                    - path
                    - reference
                    - type
                    - parent_id
                    x-nullable: true
                  cached_contact:
                    type: object
                    properties:
                      name:
                        type: string
                        x-nullable: true
                      contact_person_name:
                        type: string
                        x-nullable: true
                      address:
                        type: string
                        x-nullable: true
                      zipcode:
                        type: string
                        x-nullable: true
                      city:
                        type: string
                        x-nullable: true
                      country_code:
                        type: string
                        x-nullable: true
                      contact_person_email_address:
                        type: string
                        x-nullable: true
                      contact_number:
                        type: string
                        x-nullable: true
                    required:
                    - name
                    - contact_person_name
                    - address
                    - zipcode
                    - city
                    - country_code
                    - contact_person_email_address
                    - contact_number
                    description: Details of the associated contact. Subset of the
                      Contact model. Locked when the invoice is published. Read only.
                    x-nullable: true
                  invoice_lines:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Read only.
                          x-nullable: true
                        description:
                          type: string
                          description: Description of the product or service in no
                            more than 255 characters.
                          x-nullable: true
                        extended_description:
                          type: string
                          description: Extended description of the invoice line.
                          x-nullable: true
                        price_per_unit:
                          type: string
                          description: This property states the price with VAT excluded
                            Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        price_with_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        price_without_vat:
                          type: string
                          description: Arbitrary-precision floating point number represented
                            as a string. Read only.
                          x-nullable: true
                        vat_amount:
                          type: string
                          description: Amount of VAT in Euro. Arbitrary-precision
                            floating point number represented as a string. Read only.
                          x-nullable: true
                        vat_rate:
                          type: string
                          description: Tax rate expressed by a decimal number, e.g.
                            "0.21" means 21%. This property is derived from the invoice
                            line's VAT type, unless that type is "custom", in which
                            case a custom vat_rate must be provided. In other cases
                            the given vat_rate is ignored. Arbitrary-precision floating
                            point number represented as a string.
                          x-nullable: true
                        vat_type_id:
                          type: integer
                          description: Defaults to company's default VAT type or VAT
                            type "vat_high".
                          x-nullable: true
                        quantity:
                          type: string
                          default: '1.0'
                          description: Arbitrary-precision floating point number represented
                            as a string.
                          x-nullable: true
                        product_id:
                          type: integer
                          x-nullable: true
                        account_id:
                          type: integer
                          x-nullable: true
                        account_path:
                          description: When both account_path and account_id are given
                            the latter has precedence.
                          x-nullable: true
                      required:
                      - id
                      - description
                      - extended_description
                      - price_per_unit
                      - price_with_vat
                      - price_without_vat
                      - vat_amount
                      - vat_rate
                      - vat_type_id
                      - quantity
                      - product_id
                      - account_id
                      - account_path
                required:
                - id
                - date
                - state
                - type_account_id
                - currency
                - contact_id
                - invoice_number
                - type_account
                - cached_contact
                - invoice_lines
            required:
            - expense
          examples:
            application/json:
              expense:
                id: 748551423
                date: '2024-03-02'
                state: published
                type_account_id: 201763630
                currency: eur
                contact_id: 816305428
                invoice_number: '2024030001'
                type_account:
                  id: 201763630
                  name: Diversen
                  path_name: Kosten • Overige kosten • Diversen
                  path: profit.costs.other_costs.misc
                  reference: P1.5.8
                  type: costs
                  parent_id: 174207702
                cached_contact:
                  name: Rompslomp.nl BV
                  contact_person_name: Rob S. Lomp
                  address: Grebbeberglaan 15
                  zipcode: 3527 VX
                  city: Utrecht
                  country_code: NL
                  contact_person_email_address: rob@example.org
                  contact_number: K00001
                invoice_lines:
                - id: 171593324
                  description: some
                  extended_description:
                  price_per_unit: '10.0'
                  price_with_vat: '12.1'
                  price_without_vat: '10.0'
                  vat_amount: '2.1'
                  vat_rate: '0.21'
                  vat_type_id: 708176756
                  quantity: '1.0'
                  product_id:
                  account_id:
                  account_path:
  "/api/v1/companies/{company_id}/payments":
    parameters:
    - "$ref": "#/parameters/company_id"
    post:
      summary: create payment
      tags:
      - Payments
      parameters:
      - name: payment
        in: body
        schema:
          type: object
          properties:
            payment:
              type: object
              properties:
                amount:
                  type: string
                  description: Paid amount in Euro. Arbitrary-precision floating point
                    number represented as a string.
                  x-nullable: true
                description:
                  type: string
                  x-nullable: true
                account_id:
                  type: integer
                  x-nullable: true
                account_path:
                  description: When both account_path and account_id are given the
                    latter has precedence.
                  x-nullable: true
                paid_at:
                  type: datetime
                  x-nullable: true
          required:
          - payment
          example:
            payment:
              amount: '19.95'
              description: Toner
              account_id: 1873029244
              account_path: activa.current_assets.liquid_assets.bank
              paid_at: '2024-03-01 00:00:00 +0100'
        required: true
      responses:
        '201':
          description: successful
          schema:
            type: object
            properties:
              payment:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  amount:
                    type: string
                    description: Paid amount in Euro. Arbitrary-precision floating
                      point number represented as a string.
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  account_id:
                    type: integer
                    x-nullable: true
                  account_path:
                    description: When both account_path and account_id are given the
                      latter has precedence.
                    x-nullable: true
                  paid_at:
                    type: datetime
                    x-nullable: true
                required:
                - id
                - amount
                - description
                - account_id
                - account_path
                - paid_at
            required:
            - payment
          examples:
            application/json:
              payment:
                id: 748551423
                amount: '19.95'
                description: Toner
                account_id: 1873029244
                account_path: activa.current_assets.liquid_assets.bank
                paid_at: '2024-03-01T00:00:00.000+01:00'
    get:
      summary: list payments
      tags:
      - Payments
      parameters:
      - name: selection
        in: query
        type: string
        enum:
        - unbooked
        - all_in_current_bookyear
        - all
        - booked
        - duplicate_bank_mutations
        - manual
        default: unbooked
        description: Name of selection filter to apply.
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              payments:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    amount:
                      type: string
                      description: Paid amount in Euro. Arbitrary-precision floating
                        point number represented as a string.
                      x-nullable: true
                    description:
                      type: string
                      x-nullable: true
                    account_id:
                      type: integer
                      x-nullable: true
                    account_path:
                      description: When both account_path and account_id are given
                        the latter has precedence.
                      x-nullable: true
                    paid_at:
                      type: datetime
                      x-nullable: true
                  required:
                  - id
                  - amount
                  - description
                  - account_id
                  - account_path
                  - paid_at
            required:
            - payments
          examples:
            application/json:
              payments:
              - id: 755290841
                amount: '79.5'
                description: Relatiegeschenken
                account_id: 626295397
                account_path: activa.current_assets.liquid_assets.bank
                paid_at: '2024-03-01T00:00:00.000+01:00'
              - id: 768107468
                amount: '100.0'
                description: Reclamemateriaal
                account_id: 626295397
                account_path: activa.current_assets.liquid_assets.bank
                paid_at: '2024-03-01T00:00:00.000+01:00'
  "/api/v1/companies/{company_id}/payments/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: id
      required: true
    delete:
      summary: delete payment
      tags:
      - Payments
      responses:
        '204':
          description: successful
    get:
      summary: show payment
      tags:
      - Payments
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              payment:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  amount:
                    type: string
                    description: Paid amount in Euro. Arbitrary-precision floating
                      point number represented as a string.
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  account_id:
                    type: integer
                    x-nullable: true
                  account_path:
                    description: When both account_path and account_id are given the
                      latter has precedence.
                    x-nullable: true
                  paid_at:
                    type: datetime
                    x-nullable: true
                required:
                - id
                - amount
                - description
                - account_id
                - account_path
                - paid_at
            required:
            - payment
          examples:
            application/json:
              payment:
                id: 546973584
                amount: '100.0'
                description: Reclamemateriaal
                account_id: 246824375
                account_path: activa.current_assets.liquid_assets.bank
                paid_at: '2024-03-01T00:00:00.000+01:00'
    patch:
      summary: update payment
      tags:
      - Payments
      parameters:
      - name: payment
        in: body
        schema:
          type: object
          properties:
            payment:
              type: object
              properties:
                amount:
                  type: string
                  description: Paid amount in Euro. Arbitrary-precision floating point
                    number represented as a string.
                  x-nullable: true
                description:
                  type: string
                  x-nullable: true
                account_id:
                  type: integer
                  x-nullable: true
                account_path:
                  description: When both account_path and account_id are given the
                    latter has precedence.
                  x-nullable: true
                paid_at:
                  type: datetime
                  x-nullable: true
          required:
          - payment
          example:
            payment:
              amount: 300
        required: true
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              payment:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  amount:
                    type: string
                    description: Paid amount in Euro. Arbitrary-precision floating
                      point number represented as a string.
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                  account_id:
                    type: integer
                    x-nullable: true
                  account_path:
                    description: When both account_path and account_id are given the
                      latter has precedence.
                    x-nullable: true
                  paid_at:
                    type: datetime
                    x-nullable: true
                required:
                - id
                - amount
                - description
                - account_id
                - account_path
                - paid_at
            required:
            - payment
          examples:
            application/json:
              payment:
                id: 553977466
                amount: '300.0'
                description: Reclamemateriaal
                account_id: 1147574224
                account_path: activa.current_assets.liquid_assets.bank
                paid_at: '2024-03-01T00:00:00.000+01:00'
  "/api/v1/companies/{id}":
    parameters:
    - name: id
      in: path
      type: string
      description: Company ID
      required: true
    delete:
      summary: delete company
      tags:
      - Companies
      description: 'Note: this is a dangerous operation and therefore requires an
        access token which is owned by the owner of the company.'
      responses:
        '204':
          description: successful
  "/api/v1/companies":
    get:
      summary: list companies
      tags:
      - Companies
      parameters:
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              companies:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    name:
                      type: string
                      x-nullable: true
                    owner_name:
                      type: string
                      description: Name of the person that owns the company.
                      x-nullable: true
                    address:
                      type: string
                      x-nullable: true
                    zipcode:
                      type: string
                      x-nullable: true
                    city:
                      type: string
                      x-nullable: true
                    country_code:
                      type: string
                      description: ISO 3166-1 alpha-2 country code.
                      x-nullable: true
                    kvk_number:
                      type: string
                      description: Dutch chamber of commerce registration number.
                      x-nullable: true
                    email:
                      type: string
                      x-nullable: true
                    website:
                      type: string
                      x-nullable: true
                    type:
                      type: string
                      enum:
                      - eenmanszaak
                      - vof
                      - bv
                      - vereniging
                      - stichting
                      - other
                      x-nullable: true
                    vat_liable:
                      type: boolean
                      description: Specifies wether or not the company is obligated
                        to pay VAT.
                      default: true
                      x-nullable: true
                    vat_number:
                      type: string
                      description: Required if company is VAT liable
                      x-nullable: true
                    access_control:
                      type: object
                      properties:
                        api_accessible:
                          type: boolean
                          description: If false the company's data is not accessible
                            by means of the Rompslomp API because it's on the Gratis
                            subscription. All API access will be denied.
                          x-nullable: true
                        allowed_scopes:
                          type: array
                          items:
                            type: string
                            enum:
                            - public
                            - manage:companies
                            - manage:contacts
                            - manage:sales_invoices
                            - manage:payments
                            - manage:products
                            - read:accounts
                            - manage:journal_entries
                            - read:me
                            - manage:hours
                            - manage:rides
                            - manage:expenses
                            - manage:quotations
                          description: The OAuth scopes that the resource owner is
                            allowed to access in the context of the parent company.
                      required:
                      - api_accessible
                      - allowed_scopes
                      description: Read only.
                  required:
                  - id
                  - name
                  - owner_name
                  - address
                  - zipcode
                  - city
                  - country_code
                  - kvk_number
                  - email
                  - website
                  - type
                  - vat_liable
                  - vat_number
                  - access_control
            required:
            - companies
          examples:
            application/json:
              companies:
              - id: 440923104
                name: Rompslomp.nl BV
                owner_name: Rob S. Lomp
                address: Grebbeberglaan 15
                zipcode: 3527 VX
                city: Utrecht
                country_code: NL
                kvk_number: '12345678'
                email: info@rompslomp.nl
                website: https://rompslomp.nl
                type: bv
                vat_liable: true
                vat_number: NL123456789B01
                access_control:
                  api_accessible: true
                  allowed_scopes:
                  - public
    post:
      summary: create company
      tags:
      - Companies
      parameters:
      - name: company
        in: body
        schema:
          type: object
          properties:
            company:
              type: object
              properties:
                name:
                  type: string
                  x-nullable: true
                owner_name:
                  type: string
                  description: Name of the person that owns the company.
                  x-nullable: true
                address:
                  type: string
                  x-nullable: true
                zipcode:
                  type: string
                  x-nullable: true
                city:
                  type: string
                  x-nullable: true
                country_code:
                  type: string
                  description: ISO 3166-1 alpha-2 country code.
                  x-nullable: true
                kvk_number:
                  type: string
                  description: Dutch chamber of commerce registration number.
                  x-nullable: true
                email:
                  type: string
                  x-nullable: true
                website:
                  type: string
                  x-nullable: true
                type:
                  type: string
                  enum:
                  - eenmanszaak
                  - vof
                  - bv
                  - vereniging
                  - stichting
                  - other
                  x-nullable: true
                vat_liable:
                  type: boolean
                  description: Specifies wether or not the company is obligated to
                    pay VAT.
                  default: true
                  x-nullable: true
                vat_number:
                  type: string
                  description: Required if company is VAT liable
                  x-nullable: true
          required:
          - company
          example:
            company:
              name: Sirius Cybernetics
              owner_name: Rob S. Lomp
              address: Grebbeberglaan 15
              zipcode: 3527 VX
              city: Utrecht
              country_code: NL
              kvk_number: '12345678'
              email: info@rompslomp.nl
              website: https://rompslomp.nl
              type: bv
              vat_liable: true
              vat_number: NL123456789B01
        required: true
      responses:
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Onderneming is invalid: Bedrijfsnaam moet opgegeven zijn.'
                type: client.parameters.validation
        '201':
          description: successful
          schema:
            type: object
            properties:
              company:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  name:
                    type: string
                    x-nullable: true
                  owner_name:
                    type: string
                    description: Name of the person that owns the company.
                    x-nullable: true
                  address:
                    type: string
                    x-nullable: true
                  zipcode:
                    type: string
                    x-nullable: true
                  city:
                    type: string
                    x-nullable: true
                  country_code:
                    type: string
                    description: ISO 3166-1 alpha-2 country code.
                    x-nullable: true
                  kvk_number:
                    type: string
                    description: Dutch chamber of commerce registration number.
                    x-nullable: true
                  email:
                    type: string
                    x-nullable: true
                  website:
                    type: string
                    x-nullable: true
                  type:
                    type: string
                    enum:
                    - eenmanszaak
                    - vof
                    - bv
                    - vereniging
                    - stichting
                    - other
                    x-nullable: true
                  vat_liable:
                    type: boolean
                    description: Specifies wether or not the company is obligated
                      to pay VAT.
                    default: true
                    x-nullable: true
                  vat_number:
                    type: string
                    description: Required if company is VAT liable
                    x-nullable: true
                  access_control:
                    type: object
                    properties:
                      api_accessible:
                        type: boolean
                        description: If false the company's data is not accessible
                          by means of the Rompslomp API because it's on the Gratis
                          subscription. All API access will be denied.
                        x-nullable: true
                      allowed_scopes:
                        type: array
                        items:
                          type: string
                          enum:
                          - public
                          - manage:companies
                          - manage:contacts
                          - manage:sales_invoices
                          - manage:payments
                          - manage:products
                          - read:accounts
                          - manage:journal_entries
                          - read:me
                          - manage:hours
                          - manage:rides
                          - manage:expenses
                          - manage:quotations
                        description: The OAuth scopes that the resource owner is allowed
                          to access in the context of the parent company.
                    required:
                    - api_accessible
                    - allowed_scopes
                    description: Read only.
                required:
                - id
                - name
                - owner_name
                - address
                - zipcode
                - city
                - country_code
                - kvk_number
                - email
                - website
                - type
                - vat_liable
                - vat_number
                - access_control
            required:
            - company
          examples:
            application/json:
              company:
                id: 414110154
                name: Sirius Cybernetics
                owner_name: Rob S. Lomp
                address: Grebbeberglaan 15
                zipcode: 3527 VX
                city: Utrecht
                country_code: NL
                kvk_number: '12345678'
                email: info@rompslomp.nl
                website: https://rompslomp.nl
                type: bv
                vat_liable: true
                vat_number: NL123456789B01
                access_control:
                  api_accessible: true
                  allowed_scopes:
                  - manage:companies
  "/oauth/token":
    post:
      summary: retrieve / refresh an access token
      tags:
      - OAuth
      consumes:
      - application/x-www-form-urlencoded
      parameters:
      - name: client_id
        in: formData
        type: string
        description: Obtain a client ID by registering your application with Rompslomp.
        required: true
      - name: client_secret
        in: formData
        type: string
        description: Obtain a client secret by registering your application with Rompslomp.
        required: true
      - name: grant_type
        in: formData
        type: string
        description: Either "authorization_code" or "refresh_token"
        required: true
      - name: code
        in: formData
        type: string
        description: Required if grant_type=authorization_code
      - name: refresh_token
        in: formData
        type: string
        description: Required if grant_type=refresh_token
      - name: redirect_uri
        in: formData
        type: string
        description: Required if grant_type=authorization_code. Use the same URI that
          was used to obtain the authorization code.
      responses:
        '400':
          description: invalid request / missing parameter
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string
          examples:
            application/json:
              error: invalid_request
              error_description: Het verzoek mist een vereiste parameter, bevat een
                niet-ondersteunde parameter waarde of is anderszins onjuist.
        '401':
          description: invalid client credentials
          schema:
            type: object
            properties:
              error:
                type: string
              error_description:
                type: string
          examples:
            application/json:
              error: invalid_client
              error_description: Client verificatie is mislukt door onbekende klant,
                geen client authenticatie opgegeven, of een niet-ondersteunde authenticatie
                methode.
        '200':
          description: successful
          schema:
            type: object
            properties:
              access_token:
                type: string
              token_type:
                type: string
                enum:
                - Bearer
              expires_in:
                type: integer
                description: TTL in seconds
              refresh_token:
                type: string
              scope:
                type: string
              created_at:
                type: integer
          examples:
            application/json:
              access_token: ngLL9N98o-ULVpwTALprgymQnpWVtyNdxFkQwd1pJmY
              token_type: Bearer
              expires_in: 7200
              refresh_token: T-THrIW4cU4Rc5YuwKlwKSXbjG3lFImIq3vU1yclLo4
              scope: public
              created_at: 1709334000
  "/api/v1/companies/{company_id}/templates":
    parameters:
    - "$ref": "#/parameters/company_id"
    get:
      summary: list templates
      tags:
      - Templates
      parameters:
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              templates:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      x-nullable: true
                    name:
                      type: string
                      x-nullable: true
                    is_default:
                      type: boolean
                      x-nullable: true
                  required:
                  - id
                  - name
                  - is_default
            required:
            - templates
          examples:
            application/json:
              templates:
              - id: 708176756
                name: Custom template
                is_default: true
  "/api/v1/companies/{company_id}/templates/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: id
      required: true
    get:
      summary: show template
      tags:
      - Templates
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              template:
                type: object
                properties:
                  id:
                    type: integer
                    x-nullable: true
                  name:
                    type: string
                    x-nullable: true
                  is_default:
                    type: boolean
                    x-nullable: true
                required:
                - id
                - name
                - is_default
            required:
            - template
          examples:
            application/json:
              template:
                id: 727734849
                name: Custom template
                is_default: true
  "/api/v1/companies/{company_id}/hours/{id}":
    parameters:
    - "$ref": "#/parameters/company_id"
    - name: id
      in: path
      type: string
      description: Hour ID
      required: true
    patch:
      summary: update hour
      tags:
      - Hours
      parameters:
      - name: hour
        in: body
        schema:
          type: object
          properties:
            hour:
              type: object
              properties:
                client_id:
                  type: integer
                  x-nullable: true
                project_id:
                  type: integer
                  x-nullable: true
                date:
                  type: date
                  x-nullable: true
                started_at:
                  type: datetime
                  x-nullable: true
                ended_at:
                  type: datetime
                  x-nullable: true
                description:
                  type: string
                  x-nullable: true
          required:
          - hour
          example:
            hour:
              started_at: '2024-03-01 21:00:00 +0100'
        required: true
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              hour:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  client_id:
                    type: integer
                    x-nullable: true
                  project_id:
                    type: integer
                    x-nullable: true
                  calculated_duration:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  calculated_duration_without_pause:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  calculated_ended_at:
                    type: datetime
                    description: When ended_at is null this is the started_at + calculated_duration_without_pause
                      Read only.
                    x-nullable: true
                  date:
                    type: date
                    x-nullable: true
                  started_at:
                    type: datetime
                    x-nullable: true
                  ended_at:
                    type: datetime
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                required:
                - id
                - client_id
                - project_id
                - calculated_duration
                - calculated_duration_without_pause
                - calculated_ended_at
                - date
                - started_at
                - ended_at
                - description
            required:
            - hour
          examples:
            application/json:
              hour:
                id: 708176756
                client_id:
                project_id:
                calculated_duration: '3.0'
                calculated_duration_without_pause: '3.0'
                calculated_ended_at: '2024-03-02T00:00:00.000+01:00'
                date: '2024-03-02'
                started_at: '2024-03-01T21:00:00.000+01:00'
                ended_at: '2024-03-02T00:00:00.000+01:00'
                description: MyText
    get:
      summary: show hour
      tags:
      - Hours
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              hour:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  client_id:
                    type: integer
                    x-nullable: true
                  project_id:
                    type: integer
                    x-nullable: true
                  calculated_duration:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  calculated_duration_without_pause:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  calculated_ended_at:
                    type: datetime
                    description: When ended_at is null this is the started_at + calculated_duration_without_pause
                      Read only.
                    x-nullable: true
                  date:
                    type: date
                    x-nullable: true
                  started_at:
                    type: datetime
                    x-nullable: true
                  ended_at:
                    type: datetime
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                required:
                - id
                - client_id
                - project_id
                - calculated_duration
                - calculated_duration_without_pause
                - calculated_ended_at
                - date
                - started_at
                - ended_at
                - description
            required:
            - hour
          examples:
            application/json:
              hour:
                id: 727734849
                client_id:
                project_id:
                calculated_duration: '1.0'
                calculated_duration_without_pause: '1.0'
                calculated_ended_at: '2024-03-02T00:00:00.000+01:00'
                date: '2024-03-02'
                started_at: '2024-03-01T23:00:00.000+01:00'
                ended_at: '2024-03-02T00:00:00.000+01:00'
                description: MyText
    delete:
      summary: delete hour
      tags:
      - Hours
      responses:
        '204':
          description: successful
  "/api/v1/companies/{company_id}/hours":
    parameters:
    - "$ref": "#/parameters/company_id"
    post:
      summary: create hour
      tags:
      - Hours
      parameters:
      - name: hour
        in: body
        schema:
          type: object
          properties:
            hour:
              type: object
              properties:
                client_id:
                  type: integer
                  x-nullable: true
                project_id:
                  type: integer
                  x-nullable: true
                date:
                  type: date
                  x-nullable: true
                started_at:
                  type: datetime
                  x-nullable: true
                ended_at:
                  type: datetime
                  x-nullable: true
                description:
                  type: string
                  x-nullable: true
          required:
          - hour
          example:
            hour:
              client_id:
              project_id:
              date: '2024-03-02'
              started_at: '2024-03-01 23:00:00 +0100'
              ended_at: '2024-03-02 00:00:00 +0100'
              description: MyText
        required: true
      responses:
        '201':
          description: successful
          schema:
            type: object
            properties:
              hour:
                type: object
                properties:
                  id:
                    type: integer
                    description: Read only.
                    x-nullable: true
                  client_id:
                    type: integer
                    x-nullable: true
                  project_id:
                    type: integer
                    x-nullable: true
                  calculated_duration:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  calculated_duration_without_pause:
                    type: string
                    description: Arbitrary-precision floating point number represented
                      as a string. Read only.
                    x-nullable: true
                  calculated_ended_at:
                    type: datetime
                    description: When ended_at is null this is the started_at + calculated_duration_without_pause
                      Read only.
                    x-nullable: true
                  date:
                    type: date
                    x-nullable: true
                  started_at:
                    type: datetime
                    x-nullable: true
                  ended_at:
                    type: datetime
                    x-nullable: true
                  description:
                    type: string
                    x-nullable: true
                required:
                - id
                - client_id
                - project_id
                - calculated_duration
                - calculated_duration_without_pause
                - calculated_ended_at
                - date
                - started_at
                - ended_at
                - description
            required:
            - hour
          examples:
            application/json:
              hour:
                id: 688369464
                client_id:
                project_id:
                calculated_duration: '1.0'
                calculated_duration_without_pause: '1.0'
                calculated_ended_at: '2024-03-02T00:00:00.000+01:00'
                date: '2024-03-02'
                started_at: '2024-03-01T23:00:00.000+01:00'
                ended_at: '2024-03-02T00:00:00.000+01:00'
                description: MyText
        '422':
          description: validation errors
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                    - client.parameters.validation
                  message:
                    type: string
                description: Please switch on the response's status code and/or error
                  type when handling errors. Error messages may change over time.
                required:
                - type
                - message
            required:
            - error
          examples:
            application/json:
              error:
                message: 'Tijdsslot is invalid: Date moet opgegeven zijn. Parsed amount
                  of de tijdsduur moet ingevuld zijn, of de begintijd en daarbij eventueel
                  de eindtijd. Started at of de tijdsduur moet ingevuld zijn, of de
                  begintijd en daarbij eventueel de eindtijd.'
                type: client.parameters.validation
    get:
      summary: list hours
      tags:
      - Hours
      parameters:
      - "$ref": "#/parameters/page"
      - "$ref": "#/parameters/per_page"
      responses:
        '200':
          description: successful
          schema:
            type: object
            properties:
              hours:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      description: Read only.
                      x-nullable: true
                    client_id:
                      type: integer
                      x-nullable: true
                    project_id:
                      type: integer
                      x-nullable: true
                    calculated_duration:
                      type: string
                      description: Arbitrary-precision floating point number represented
                        as a string. Read only.
                      x-nullable: true
                    calculated_duration_without_pause:
                      type: string
                      description: Arbitrary-precision floating point number represented
                        as a string. Read only.
                      x-nullable: true
                    calculated_ended_at:
                      type: datetime
                      description: When ended_at is null this is the started_at +
                        calculated_duration_without_pause Read only.
                      x-nullable: true
                    date:
                      type: date
                      x-nullable: true
                    started_at:
                      type: datetime
                      x-nullable: true
                    ended_at:
                      type: datetime
                      x-nullable: true
                    description:
                      type: string
                      x-nullable: true
                  required:
                  - id
                  - client_id
                  - project_id
                  - calculated_duration
                  - calculated_duration_without_pause
                  - calculated_ended_at
                  - date
                  - started_at
                  - ended_at
                  - description
            required:
            - hours
          examples:
            application/json:
              hours:
              - id: 795774434
                client_id:
                project_id:
                calculated_duration: '1.0'
                calculated_duration_without_pause: '1.0'
                calculated_ended_at: '2024-03-02T00:00:00.000+01:00'
                date: '2024-03-02'
                started_at: '2024-03-01T23:00:00.000+01:00'
                ended_at: '2024-03-02T00:00:00.000+01:00'
                description: MyText
consumes:
- application/json
produces:
- application/json
