> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chift.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Create sale/purchase entry (Multiple plans)

> Create a new sale/purchase entry with multiple analytic plans in the accounting



## OpenAPI

````yaml post /consumers/{consumer_id}/accounting/invoices/multi-analytic-plans
openapi: 3.1.0
info:
  title: Chift API
  description: >-
    The Chift API is a universal API giving you access to financial data from
    the software of your clients. It helps software companies to offer native
    integrations to their clients without the effort needed to maintain those
    native integrations. By using the APIs (Accounting, POS, eCommerce) of
    Chift, you connect once and allow your clients to use their software
    packages.
  version: 1.0.0
servers:
  - url: https://api.chift.eu
    description: Chift
security:
  - bearerAuth: []
paths:
  /consumers/{consumer_id}/accounting/invoices/multi-analytic-plans:
    post:
      tags:
        - Accounting
        - Invoices
      summary: Create sale/purchase entry (Multiple plans)
      description: >-
        Create a new sale/purchase entry with multiple analytic plans in the
        accounting
      operationId: accounting_create_invoice_multiple_plans
      parameters:
        - name: consumer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Consumer Id
        - name: folder_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Folder Id
          description: >-
            Id of the accounting folder instance. A folder represents a legal
            entity within the system. Required when the multiple folders feature
            is enabled.
        - name: force_financial_period
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Force Financial Period
          description: >-
            Forces financial period in which the invoice must be created. This
            will create the invoice in the forced financial period rather than
            the current period. The format is: mmYYYY.
        - name: regroup_lines
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/BoolParam'
              - type: 'null'
            default: 'true'
            title: Regroup Lines
          description: >-
            Regroup lines by account number, tax code and analytic distribution
            in the accounting system.
        - name: ignore_accounting_id
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Ignore Accounting Id
          description: >-
            If set to true, Chift will not wait for the invoice to be processed
            to return, use this when you do not need the ID in the return
            value.Note that this might also change the output of the call.
        - name: force_currency_exchange
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            default: false
            title: Force Currency Exchange
          description: >-
            Boolean flag indicating whether to force the use of the provided
            currency exchange rate instead of the rate used by the accounting
            software. 
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceItemInMultiAnalyticPlans'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvoiceItemOutMultiAnalyticPlans'
        '400':
          content:
            application/json:
              examples:
                Invalid VAT Code:
                  value:
                    message: The format of the VAT Code doesn't seem to be correct.
                    status: error
                Invalid journal Id:
                  value:
                    message: The format of the journal_id doesn't seem to be correct.
                    status: error
                Invalid analytic account:
                  value:
                    message: >-
                      The format of the analytic account doesn't seem to be
                      correct.
                    status: error
                Unsupported date:
                  value:
                    message: The accounting system is not set up for this invoice date.
                    status: error
                Invalid journal scope:
                  value:
                    message: The journal cannot be used with this type of invoice.
                    status: error
                Duplicate invoice number:
                  value:
                    message: >-
                      The invoice number is already used in the accounting
                      system.
                    status: error
                Invoice number too long:
                  value:
                    message: >-
                      The invoice number has a maximal length of 8 characters in
                      the accounting system. (Only applicable to Winbooks).
                    status: error
                Invalid untaxed amount:
                  value:
                    message: You cannot create an invoice with an untaxed amount of 0.
                    status: error
                Invoice couldn't be created:
                  value:
                    message: The invoice couldn't be created in the accounting system.
                    status: error
                No invoice lines:
                  value:
                    message: Please add at least one invoice line.
                    status: error
                Invalid forced financial period:
                  value:
                    message: >-
                      The forced financial period must be must be 6 numbers
                      (e.g. 02 for february and 20222 => 022022)
                    status: error
                Invalid PDF:
                  value:
                    message: >-
                      The document is not a valid base64 string representing a
                      PDF.
                    status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Bad Request
        '404':
          content:
            application/json:
              examples:
                VAT Code not found:
                  value:
                    message: The Tax Code doens't exist in the accounting system.
                    status: error
                Journal not found:
                  value:
                    message: The journal doesn't exist in the accounting system
                    status: error
                Multiple journals found:
                  value:
                    message: >-
                      Multiple journals were found. Please indicate the wanted
                      journal in the request.
                    status: error
                Partner not found:
                  value:
                    message: The partner doesn't exist in the accounting system.
                    status: error
                Account not found:
                  value:
                    message: >-
                      The account number 'x' doesn't exist in the accounting
                      system.
                    status: error
                Analytic account not found:
                  value:
                    message: >-
                      The analytic account 'x' doesn't exist in the accounting
                      system.
                    status: error
                Analytic plan not found:
                  value:
                    message: The analytic plan doesn't exist in the accounting system.
                    status: error
                Currency not found:
                  value:
                    message: The currency 'x' doesn't exist in the accounting system
                    status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - mcp_auth:
            - accounting
            - accounting.invoices
components:
  schemas:
    BoolParam:
      type: string
      enum:
        - 'true'
        - 'false'
      title: BoolParam
    InvoiceItemInMultiAnalyticPlans:
      properties:
        invoice_type:
          $ref: '#/components/schemas/InvoiceType'
          description: Specifies the type of invoice
        invoice_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Invoice Number
          description: >-
            Unique 'number' of the invoice instance in the accounting software.
            This is an internal reference number. if not specified, will be
            automatically generated according to the system’s numbering rules.
            It does not necessarily match the number displayed on an invoice.It
            is recommended to use this number for idempotency to prevent
            duplicate entries. Refer to the idempotency documentation in the
            Developer Guides for more details
        currency:
          type: string
          title: Currency
          description: Code (e.g., USD, EUR) of the currency used for invoice amounts.
        untaxed_amount:
          type: number
          title: Untaxed Amount
          description: Total amount of the invoice excluding taxes.
        tax_amount:
          type: number
          title: Tax Amount
          description: Total amount of tax applied to the invoice
        total:
          type: number
          title: Total
          description: >-
            Total amount of the invoice, including taxes (untaxed_amount +
            tax_amount).
        reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference
          description: >-
            Optional reference field used to store an external or contextual
            identifier related to the entry. For purchase invoices, it typically
            contains the invoice number issued by the supplier. For sales
            invoices, it may reference a quote number or any other relevant
            document. Unlike number, this field is not subject to specific
            format or character restrictions and can hold free-form text.
        payment_communication:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Communication
          description: >-
            Field containing the payment reference or communication associated
            with the invoice (e.g., bank transfer reference, SEPA remittance
            message). Often used for reconciliation purposes.
        customer_memo:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Memo
          description: >-
            Internal or external note associated with the invoice, typically
            intended for the customer. Can include additional context, comments,
            or special instructions related to the transaction.
        payment_term_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Term Id
          description: Technical ID of the payment term associated with the invoice.
        withholding_tax:
          anyOf:
            - $ref: '#/components/schemas/WithholdingTax'
            - type: 'null'
          description: Withholding tax information for the invoice.
        invoice_date:
          type: string
          format: date
          title: Invoice Date
          description: 'Accounting date of the invoice (format: YYYY-MM-DD).'
        due_date:
          type: string
          format: date
          title: Due Date
          description: 'Due date for payment or settlement (format: YYYY-MM-DD).'
        partner_id:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Partner Id
          description: >-
            Id of the related third party (supplier or customer) in the
            accounting software. Used to link the invoice to the corresponding
            client or supplier record in the accounting system.
        journal_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Journal Id
          description: >-
            Identifier of the journal for the invoice. If not provided, the
            journal will be set automatically if only one exists; otherwise, an
            error will be thrown.
        status:
          anyOf:
            - $ref: '#/components/schemas/InvoiceStatusIn'
            - type: 'null'
          description: >-
            string indicating if invoice has been posted (finalized) in the
            accounting system.
          default: posted
        pdf:
          anyOf:
            - type: string
            - type: 'null'
          title: Pdf
          description: Base 64 string representing the PDF attached to the invoice.
        pdf_name:
          anyOf:
            - type: string
              maxLength: 200
              minLength: 1
              pattern: ^[a-zA-Z0-9\-_ ]{1,196}(?:.pdf)?$
            - type: 'null'
          title: Pdf Name
          description: >-
            A name for the PDF file to be created for accounting software that
            support it.
        currency_exchange_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Currency Exchange Rate
          description: >-
            Exchange rate applicable at the date of the invoice. Required when
            the invoice currency is different from the folder's default
            currency.
          default: 1
        invoice_correction:
          anyOf:
            - $ref: '#/components/schemas/InvoiceCorrection'
            - type: 'null'
          description: >-
            Information used to add a correction line when roundings have an
            impact on the total amount of the invoice.
        nl_payment_terms_split:
          anyOf:
            - $ref: '#/components/schemas/NlPaymentTermsSplit'
            - type: 'null'
          description: >-
            NL only - For Dutch split payment compliance (G/N-rekening): use to
            specify how invoice amounts are divided between a blocked (G) and
            normal (N) account in high-risk sectors (e.g., construction,
            staffing).
        shipping_country:
          anyOf:
            - type: string
            - type: 'null'
          title: Shipping Country
          description: 'Format: ISO 3166-1 codes.'
        partner_info:
          anyOf:
            - $ref: '#/components/schemas/AccountToCreate'
            - type: 'null'
          description: >-
            Information about the client/supplier that must be created. In some
            tools we cannot create a client/supplier by API. Missing
            clients/suppliers must be explicitly provided during the invoice
            creation and will be automatically created by the accounting
            software. This is for example the case for Tiime.
        lines:
          items:
            $ref: '#/components/schemas/InvoiceLineItemInMultiAnalyticPlans'
          type: array
          title: Lines
        start_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Start Date
          description: >-
            Start date of the period covered by the invoice (format:
            YYYY-MM-DD). This field should be used when the invoice relates to
            prepaid income or expenses (accruals and deferrals), indicating when
            the covered period begins.
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: End Date
          description: >-
            End date of the period covered by the invoice (format: YYYY-MM-DD).
            This field should be used when the invoice relates to prepaid income
            or expenses (accruals and deferrals), indicating when the covered
            period ends.
        payment_method_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Method Id
          description: >-
            Technical ID of the payment method in the accounting system. This is
            an indication of the payment method that will be used to pay the
            invoice. It is not necessarily the payment method that will
            eventually be used to pay the invoice.
      type: object
      required:
        - invoice_type
        - currency
        - untaxed_amount
        - tax_amount
        - total
        - invoice_date
        - due_date
        - lines
      title: InvoiceItemInMultiAnalyticPlans
    InvoiceItemOutMultiAnalyticPlans:
      properties:
        invoice_type:
          $ref: '#/components/schemas/InvoiceType'
          description: Specifies the type of invoice
        invoice_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Invoice Number
          description: >-
            Unique 'number' of the invoice instance in the accounting software.
            This is an internal reference number. if not specified, will be
            automatically generated according to the system’s numbering rules.
            It does not necessarily match the number displayed on an invoice.It
            is recommended to use this number for idempotency to prevent
            duplicate entries. Refer to the idempotency documentation in the
            Developer Guides for more details
        currency:
          type: string
          title: Currency
          description: Code (e.g., USD, EUR) of the currency used for invoice amounts.
        untaxed_amount:
          type: number
          title: Untaxed Amount
          description: Total amount of the invoice excluding taxes.
        tax_amount:
          type: number
          title: Tax Amount
          description: Total amount of tax applied to the invoice
        total:
          type: number
          title: Total
          description: >-
            Total amount of the invoice, including taxes (untaxed_amount +
            tax_amount).
        reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference
          description: >-
            Optional reference field used to store an external or contextual
            identifier related to the entry. For purchase invoices, it typically
            contains the invoice number issued by the supplier. For sales
            invoices, it may reference a quote number or any other relevant
            document. Unlike number, this field is not subject to specific
            format or character restrictions and can hold free-form text.
        payment_communication:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Communication
          description: >-
            Field containing the payment reference or communication associated
            with the invoice (e.g., bank transfer reference, SEPA remittance
            message). Often used for reconciliation purposes.
        customer_memo:
          anyOf:
            - type: string
            - type: 'null'
          title: Customer Memo
          description: >-
            Internal or external note associated with the invoice, typically
            intended for the customer. Can include additional context, comments,
            or special instructions related to the transaction.
        payment_term_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Term Id
          description: Technical ID of the payment term associated with the invoice.
        withholding_tax:
          anyOf:
            - $ref: '#/components/schemas/WithholdingTax'
            - type: 'null'
          description: Withholding tax information for the invoice.
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        invoice_date:
          type: string
          format: date
          title: Invoice Date
          description: >-
            Accounting invoice date. It is automatically set to '1970-01-01' if
            the value is empty in the accounting system.
        due_date:
          type: string
          format: date
          title: Due Date
          description: >-
            Last Due date of the invoice. The invoice date is used when this
            information is not given by the software.
        partner_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Partner Id
        journal_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Journal Id
          description: >-
            Indicates the journal used in for the invoice. If the journal is not
            given, the journal will be automatically set if only one journal
            exists otherwise an error will be thrown.
        payments:
          anyOf:
            - items:
                $ref: '#/components/schemas/Payment'
              type: array
            - type: 'null'
          title: Payments
        status:
          anyOf:
            - $ref: '#/components/schemas/InvoiceStatusOut'
            - type: 'null'
          default: posted
        last_updated_on:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated On
          description: The last time the invoice has been updated.
        partner:
          anyOf:
            - $ref: '#/components/schemas/Partner'
            - type: 'null'
          description: >-
            Extra information about the partner (client/supplier) linked to the
            invoice. To ensure this information is returned, you need to use the
            include_partner_info query parameter.
        due_dates:
          anyOf:
            - items:
                $ref: '#/components/schemas/InvoiceItemDueDatesOut'
              type: array
            - type: 'null'
          title: Due Dates
          description: List of all due dates of the invoice.
          default: []
        attachments_info:
          $ref: '#/components/schemas/ItemAttachmentInfoOut'
          description: >-
            Indicates whether a file attachment (e.g. PDF or image) is linked to
            this invoice and how to retrieve it. Check the status field: 'yes'
            means a direct download URL is available in the attachments array;
            'yes_to_request' means the file exists but must be fetched
            separately via GET
            /accounting/attachments?type=invoice&document_id={id}, which returns
            the file as a base64-encoded string. 'no' means no attachment is
            linked. 'unknown' means the connector does not support this.
        accounting_info:
          anyOf:
            - $ref: '#/components/schemas/AccountingInfoOut'
            - type: 'null'
          description: Additional information about the invoice.
        payment_method_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Method Id
          description: >-
            Technical ID of the payment method in the accounting system. This is
            the payment method currently linked to the invoice. It is not
            necessarily the payment method that will eventually be used to pay
            the invoice.
        approval_status:
          $ref: '#/components/schemas/InvoiceApprovalStatus'
          description: Approval status of the invoice.
          default: unknown
        lines:
          items:
            $ref: '#/components/schemas/InvoiceLineItemOutMultiAnalyticPlans'
          type: array
          title: Lines
      type: object
      required:
        - invoice_type
        - currency
        - untaxed_amount
        - tax_amount
        - total
        - invoice_date
        - due_date
        - partner_id
        - lines
      title: InvoiceItemOutMultiAnalyticPlans
    ChiftError:
      properties:
        message:
          type: string
          title: Message
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          default: error
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          default: ''
      type: object
      required:
        - message
      title: ChiftError
    HTTPValidationError:
      title: Validation Error
      required:
        - message
      type: object
      properties:
        message:
          title: Message
          type: string
          default: Validation error
        status:
          title: Status
          type: string
          default: error
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    InvoiceType:
      type: string
      enum:
        - customer_invoice
        - customer_refund
        - supplier_invoice
        - supplier_refund
      title: InvoiceType
    WithholdingTax:
      properties:
        tax_rate:
          type: number
          title: Tax Rate
          description: >-
            Rate of the withholding tax. Normal withholding tax should have a
            negative tax rate.
        tax_code:
          type: string
          title: Tax Code
          description: >-
            Tax code of the withholding tax. This is the Id of the Tax Code in
            the accounting software.
        tax_amount:
          type: number
          title: Tax Amount
          description: >-
            Amount of the withholding tax. This is the amount of the withholding
            tax that will be applied to the invoice. It should be negative for
            normal withholding tax.
      type: object
      required:
        - tax_rate
        - tax_code
        - tax_amount
      title: WithholdingTax
    InvoiceStatusIn:
      type: string
      enum:
        - draft
        - posted
      title: InvoiceStatusIn
    InvoiceCorrection:
      properties:
        sale_invoice_correction_tax_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Sale Invoice Correction Tax Code
          description: >-
            Tax code to apply on the correction line when the invoice is a sale
            (customer invoice). Required only when invoice_correction is used
            for a sale invoice or refund.
        purchase_invoice_correction_tax_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Purchase Invoice Correction Tax Code
          description: >-
            Tax code to apply on the correction line when the invoice is a
            purchase (supplier invoice). Required only when invoice_correction
            is used for a purchase invoice or refund.
        invoice_correction_credit_account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Invoice Correction Credit Account Number
          description: >-
            Account number to use for the correction line on a sale (customer
            invoice).
        invoice_correction_debit_account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Invoice Correction Debit Account Number
          description: >-
            Account number to use for the correction line on a purchase
            (supplier invoice).
      type: object
      title: InvoiceCorrection
    NlPaymentTermsSplit:
      properties:
        g_account:
          $ref: '#/components/schemas/PaymentTermAccountInfo'
          description: >-
            This is the 'Geblokkeerde rekening' in Dutch. It is a blocked bank
            account used only for tax-related payments, such as VAT and payroll
            tax.
        n_account:
          $ref: '#/components/schemas/PaymentTermAccountInfo'
          description: >-
            This is the 'Normale rekening' in Dutch. It is a regular bank
            account used for standard business operations and unrestricted
            funds. The non-tax portion of the invoice is paid here.
      type: object
      required:
        - g_account
        - n_account
      title: NlPaymentTermsSplit
    AccountToCreate:
      properties:
        account_number:
          type: string
          minLength: 1
          title: Account Number
        account_name:
          type: string
          minLength: 1
          title: Account Name
      type: object
      required:
        - account_number
        - account_name
      title: AccountToCreate
    InvoiceLineItemInMultiAnalyticPlans:
      properties:
        line_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Line Number
          description: >-
            Optional line sequence number used to preserve the order of invoice
            items.
          default: 1
        unit_price:
          type: number
          title: Unit Price
          description: Unit price of the item, before tax.
        unit_of_measure:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit Of Measure
          description: >-
            A list of default units can be used for which an advanced mapping
            has been done (units: 'hour', 'day', 'cm', 'm2', 'm3', 'm', 'km',
            'mile', 'g', 'kg', 'ton', 'box', 'pallet', 'roll', 'liter', 'unit').
            Custom units of measure must have an identical name in the target
            software.
        quantity:
          type: number
          title: Quantity
          description: Quantity of items. This is the amount of units sold or purchased.
        untaxed_amount:
          type: number
          title: Untaxed Amount
          description: >-
            Amount excluding tax for the line item (i.e., unit_price ×
            quantity).
        tax_rate:
          type: number
          title: Tax Rate
          description: Tax rate used for the line (e.g., 21.0).
        tax_amount:
          type: number
          title: Tax Amount
          description: Tax amount calculated for the line (i.e. untaxed_amount * tax_rate).
        total:
          type: number
          title: Total
          description: >-
            Total amount for the item, including tax (untaxed_amount +
            tax_amount).
        account_number:
          type: string
          minLength: 1
          title: Account Number
          description: >-
            Ledger account number (of type general) used for the line (e.g.,
            701000).
        tax_code:
          type: string
          minLength: 1
          title: Tax Code
          description: >-
            Indicates the tax code used for the line. This is the Id of the Tax
            Code in the accounting software.
        description:
          type: string
          title: Description
          description: Text description for this line item.
          default: ''
        analytic_distribution:
          anyOf:
            - items:
                $ref: '#/components/schemas/AnalyticDistribution'
              type: array
            - type: 'null'
          title: Analytic Distribution
          default: []
      type: object
      required:
        - unit_price
        - quantity
        - untaxed_amount
        - tax_rate
        - tax_amount
        - total
        - account_number
        - tax_code
      title: InvoiceLineItemInMultiAnalyticPlans
    Payment:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        currency:
          type: string
          title: Currency
        amount:
          type: number
          title: Amount
          description: >-
            Total amount of the payment. A part of this amount could be
            reconciled with another invoice.
        dedicated_amount:
          type: number
          title: Dedicated Amount
          description: 'Amount of the payment dedicated to the invoice. '
          default: 0
        payment_date:
          type: string
          format: date
          title: Payment Date
        journal_type:
          $ref: '#/components/schemas/JournalType'
        journal_id:
          type: string
          title: Journal Id
        journal_name:
          type: string
          title: Journal Name
        reconciled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Reconciled
          default: false
        communication:
          anyOf:
            - type: string
            - type: 'null'
          title: Communication
        matching_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Matching Number
      type: object
      required:
        - id
        - name
        - currency
        - amount
        - payment_date
        - journal_type
        - journal_id
        - journal_name
      title: Payment
    InvoiceStatusOut:
      type: string
      enum:
        - cancelled
        - draft
        - posted
        - paid
      title: InvoiceStatusOut
    Partner:
      properties:
        external_reference:
          anyOf:
            - type: string
            - type: 'null'
          title: External Reference
          description: >-
            External identifier used to link the client in the accounting system
            with the corresponding client reference in your own system.
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the first name of the client.
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the last name of the client.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: >-
            Full name or legal name of the client (individual or company). This
            is the name displayed in the accounting software.
        function:
          anyOf:
            - type: string
            - type: 'null'
          title: Function
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the function of the client.
        is_company:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Company
          description: Indicates if the client is an individual or a company.
          default: true
        company_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Id
          description: >-
            Only used when the client is an individual (is_company=false).
            Indicates the id of the company linked to the client.
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
          description: Phone number of the client.
        mobile:
          anyOf:
            - type: string
            - type: 'null'
          title: Mobile
          description: Mobile phone number of the client.
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Email address of the client.
        language:
          anyOf:
            - type: string
            - type: 'null'
          title: Language
          description: 'Language of the client. Format: ISO 639-1 codes.'
        internal_notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Internal Notes
          description: Internal notes about the client.
        website:
          anyOf:
            - type: string
            - type: 'null'
          title: Website
          description: Website of the client.
        vat:
          anyOf:
            - type: string
            - type: 'null'
          title: Vat
          description: VAT number of the client.
        company_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Number
          description: National identification number of the company.
        iban:
          anyOf:
            - type: string
            - type: 'null'
          title: Iban
          description: IBAN account number of the client. DEPRECATED see bank_accounts
        bank_account:
          anyOf:
            - type: string
            - type: 'null'
          title: Bank Account
          description: Bank account number of the client. DEPRECATED see bank_accounts
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
          description: Indicates the currency of the client (e.g., EUR).
        active:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Active
          description: Indicates if the client is active.
          default: true
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Number
          description: >-
            Ledger account number assigned to the customer in the accounting
            system as it will appear in the official accounting export file
            (FEC, SIE, iXBRL, etc.).
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: >-
            Id of the client in the accounting software. This is the unique
            identifier used to reference the client in the system.
        last_updated_on:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated On
          description: The last time the client has been updated.
        addresses:
          anyOf:
            - items:
                $ref: '#/components/schemas/AddressItemOut'
              type: array
            - type: 'null'
          title: Addresses
          description: List of addresses associated with the client.
          default: []
        third_party_account:
          anyOf:
            - type: string
            - type: 'null'
          title: Third Party Account
          description: >-
            Third party account number/code representing the client in the
            accounting software.
        bank_accounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/BankAccountsItem'
              type: array
            - type: 'null'
          title: Bank Accounts
          description: List of bank accounts information associated with the client.
      type: object
      title: Partner
    InvoiceItemDueDatesOut:
      properties:
        due_date:
          type: string
          format: date
          title: Due Date
          description: Due date of the item.
        payment_method:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Method
          description: Payment method used to pay the invoice on that due date.
        payment_method_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Method Id
          description: >-
            Technical ID of the payment method used to pay the invoice on that
            due date.
        amount:
          type: number
          title: Amount
          description: >-
            Amount due for the invoice on that due date. A positive amount
            represents debit on customer invoices and supplier refunds or credit
            on supplier invoices and customer refunds. A negative amount
            represents credit on customer invoices and supplier refunds or debit
            on supplier invoices and customer refunds.
      type: object
      required:
        - due_date
        - amount
      title: InvoiceItemDueDatesOut
    ItemAttachmentInfoOut:
      properties:
        status:
          $ref: '#/components/schemas/ItemAttachmentInfoStatus'
          description: >-
            Indicates whether an attachment (e.g. PDF or image) is available for
            this entry, and how to retrieve it. 'yes': one or more attachments
            are available directly — each entry in the attachments array
            contains a filename and a download URL. 'yes_to_request': an
            attachment exists but cannot be returned inline. Call GET
            /accounting/attachments with type and document_id to retrieve the
            file as a base64-encoded string. The attachments array may be empty
            in this case. 'no': no attachment is linked to this entry.
            'unknown': the connector does not support attachment detection for
            this provider.
        attachments:
          anyOf:
            - items:
                $ref: '#/components/schemas/ItemAttachmentInfoAttachment'
              type: array
            - type: 'null'
          title: Attachments
          description: >-
            List of attachments available directly for this entry. Populated
            only when status is 'yes'. When status is 'yes_to_request', this
            list is empty — use GET /accounting/attachments to fetch the file
            content.
          default: []
      type: object
      required:
        - status
      title: ItemAttachmentInfoOut
    AccountingInfoOut:
      properties:
        main_currency:
          type: string
          title: Main Currency
          description: Main currency of the accounting folder. ISO-4217 format.
          examples:
            - EUR
            - USD
            - GBP
        main_currency_total:
          type: number
          title: Main Currency Total
          description: Total amount of the invoice in the accounting folder's currency.
          default: 0
          examples:
            - '100.0'
            - '123.4'
            - '1.23'
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Number
          description: >-
            Client/supplier ledger account used to book the invoice total
            amount. (optional)
          examples:
            - '411001'
            - '401234'
            - '1600'
      type: object
      title: AccountingInfoOut
    InvoiceApprovalStatus:
      type: string
      enum:
        - unknown
        - pending
        - approved
        - rejected
      title: InvoiceApprovalStatus
    InvoiceLineItemOutMultiAnalyticPlans:
      properties:
        line_number:
          anyOf:
            - type: integer
            - type: 'null'
          title: Line Number
          description: >-
            Optional line sequence number used to preserve the order of invoice
            items.
          default: 1
        unit_price:
          type: number
          title: Unit Price
          description: Unit price of the item, before tax.
        unit_of_measure:
          anyOf:
            - type: string
            - type: 'null'
          title: Unit Of Measure
          description: >-
            A list of default units can be used for which an advanced mapping
            has been done (units: 'hour', 'day', 'cm', 'm2', 'm3', 'm', 'km',
            'mile', 'g', 'kg', 'ton', 'box', 'pallet', 'roll', 'liter', 'unit').
            Custom units of measure must have an identical name in the target
            software.
        quantity:
          type: number
          title: Quantity
          description: Quantity of items. This is the amount of units sold or purchased.
        untaxed_amount:
          type: number
          title: Untaxed Amount
          description: >-
            Amount excluding tax for the line item (i.e., unit_price ×
            quantity).
        tax_rate:
          type: number
          title: Tax Rate
          description: Tax rate used for the line (e.g., 21.0).
        tax_amount:
          type: number
          title: Tax Amount
          description: Tax amount calculated for the line (i.e. untaxed_amount * tax_rate).
        total:
          type: number
          title: Total
          description: >-
            Total amount for the item, including tax (untaxed_amount +
            tax_amount).
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Number
          description: >-
            Ledger account number (of type general) used for the line (e.g.,
            701000).
        tax_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Tax Code
          description: >-
            Indicates the tax code used for the line. This is the Id of the Tax
            Code in the accounting software.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Text description for this line.
          default: ''
        analytic_distribution:
          anyOf:
            - items:
                $ref: '#/components/schemas/AnalyticDistribution'
              type: array
            - type: 'null'
          title: Analytic Distribution
          description: >-
            List of analytic distributions for the line item. Each distribution
            specifies an analytic plan and the associated analytic accounts with
            their percentages.
          default: []
      type: object
      required:
        - unit_price
        - quantity
        - untaxed_amount
        - tax_rate
        - tax_amount
        - total
      title: InvoiceLineItemOutMultiAnalyticPlans
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PaymentTermAccountInfo:
      properties:
        amount:
          type: number
          title: Amount
          description: Amount to be paid to the G or N account
        iban:
          type: string
          title: Iban
          description: IBAN of the G or R account
      type: object
      required:
        - amount
        - iban
      title: PaymentTermAccountInfo
    AnalyticDistribution:
      properties:
        analytic_plan:
          type: string
          title: Analytic Plan
          description: Id of the analytic plan to which the distribution applies.
        analytic_accounts:
          items:
            $ref: '#/components/schemas/AnalyticDistributionDetail'
          type: array
          title: Analytic Accounts
          description: >-
            List of analytic accounts and their respective percentages for the
            distribution.
      type: object
      required:
        - analytic_plan
        - analytic_accounts
      title: AnalyticDistribution
    JournalType:
      type: string
      enum:
        - customer_invoice
        - customer_refund
        - supplier_invoice
        - supplier_refund
        - financial_operation
        - miscellaneous_operation
        - unknown
      title: JournalType
    AddressItemOut:
      properties:
        address_type:
          $ref: '#/components/schemas/AddressType'
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        number:
          anyOf:
            - type: string
            - type: 'null'
          title: Number
        box:
          anyOf:
            - type: string
            - type: 'null'
          title: Box
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
        mobile:
          anyOf:
            - type: string
            - type: 'null'
          title: Mobile
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        street:
          anyOf:
            - type: string
            - type: 'null'
          title: Street
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
        postal_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Postal Code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: 'Format: ISO 3166-1 codes.'
      type: object
      required:
        - address_type
      title: AddressItemOut
    BankAccountsItem:
      properties:
        is_primary:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Primary
          description: >-
            Indicates whether this is the default bank account for this
            third-party. Only one bank account per third-party can have
            is_primary set to true. Defaults to true.
          default: true
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
          description: Indicates the currency of the bank account (e.g., EUR).
        iban:
          anyOf:
            - type: string
            - type: 'null'
          title: Iban
          description: >-
            International Bank Account Number (ISO 13616). Present for countries
            in the IBAN scheme (e.g., France, Germany, United Kingdom). null for
            countries that do not participate in the IBAN scheme (e.g., US,
            Canada, Australia).
        bic_swift:
          anyOf:
            - type: string
            - type: 'null'
          title: Bic Swift
          description: >-
            Bank Identifier Code (ISO 9362), also known as SWIFT code. 8 or 11
            characters. Optional for domestic payments, but required for
            international wire transfers.
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Number
          description: >-
            Local bank account number. Used when the country does not
            participate in the IBAN scheme (e.g., US, CA, AU). Always paired
            with a routing_code.
        routing_code:
          anyOf:
            - $ref: '#/components/schemas/RoutingCodeItem'
            - type: 'null'
          description: >-
            Domestic routing identifier for the bank. Required when no iban is
            present. Contains two subfields: type and value
      type: object
      title: BankAccountsItem
    ItemAttachmentInfoStatus:
      type: string
      enum:
        - unknown
        - 'yes'
        - yes_to_request
        - 'no'
      title: ItemAttachmentInfoStatus
    ItemAttachmentInfoAttachment:
      properties:
        filename:
          anyOf:
            - type: string
            - type: 'null'
          title: Filename
          description: The name of the attachment.
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: >-
            Direct download URL for the attachment file. Only populated when the
            parent attachments_info.status is 'yes'. When status is
            'yes_to_request', this field is null and the file must be retrieved
            via GET /accounting/attachments with the appropriate type and
            document_id, which returns the content as a base64-encoded string.
      type: object
      title: ItemAttachmentInfoAttachment
    AnalyticDistributionDetail:
      properties:
        analytic_account:
          type: string
          title: Analytic Account
        percentage:
          type: number
          title: Percentage
          description: >-
            Percentage of the untaxed amount attributed to this analytic
            account. Only whole numbers (no decimals) are allowed. The total
            across the analytic distribution (all accounts in a given analytic
            plan) must equal 100%.
      type: object
      required:
        - analytic_account
        - percentage
      title: AnalyticDistributionDetail
    AddressType:
      type: string
      enum:
        - main
        - delivery
        - invoice
      title: AddressType
    RoutingCodeItem:
      properties:
        type:
          $ref: '#/components/schemas/BankAccountRoutingType'
          description: >-
            The routing format. Possible values: ach (US), sort_code (UK), bsb
            (AU), transit (CA), ifsc (IN), clabe (MX).
          default: unknown
        value:
          anyOf:
            - type: string
            - type: 'null'
          title: Value
          description: The raw routing code value, without spaces or dashes.
      type: object
      title: RoutingCodeItem
    BankAccountRoutingType:
      type: string
      enum:
        - unknown
        - ach
        - sort_code
        - bsb
        - transit
        - ifsc
        - clabe
      title: BankAccountRoutingType
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        This access token needs to be included in each of your request to the
        Chift API.

````