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

# Get journal entries (Multiple Analytic Plans)

> Returns a list of journal entries with invoice items including multiple analytic plan.Optionally, you can retrieve journal entries linked to a specific client/supplier using the partner_id parameter. When retrieving entries linked to a specific client/supplier, some journal items of an entry (e.g. a miscellaneous operation) could be excluding resulting in an unbalanced journal entry.



## OpenAPI

````yaml get /consumers/{consumer_id}/accounting/journal/entries/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/journal/entries/multi-analytic-plans:
    get:
      tags:
        - Accounting
        - Journal entries
      summary: Get journal entries (Multiple Analytic Plans)
      description: >-
        Returns a list of journal entries with invoice items including multiple
        analytic plan.Optionally, you can retrieve journal entries linked to a
        specific client/supplier using the partner_id parameter. When retrieving
        entries linked to a specific client/supplier, some journal items of an
        entry (e.g. a miscellaneous operation) could be excluding resulting in
        an unbalanced journal entry.
      operationId: accounting_get_journal_entries_multi_plan
      parameters:
        - name: consumer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Consumer Id
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
          description: Page number
        - name: size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 50
            title: Size
          description: Page size
        - 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: unposted_allowed
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/BoolParam'
        - name: journal_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Journal Id
          description: >-
            Journal ID used to filter journal entries to only retrieve entries
            for a specific journal. This is an optional filter parameter.
        - name: date_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Date From
          description: >-
            Accounting date from which the journal entries will be retrieved
            (this date will be included in the response). This parameter is
            mandatory if the 'updated_after' parameter is not provided.
        - name: date_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            title: Date To
          description: >-
            Accounting date until which the journal entries will be retrieved
            (this date will be included in the response).This parameter is
            mandatory if the 'updated_after' parameter is not provided.
        - name: updated_after
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            title: Updated After
          description: >-
            When provided only journal entries modified or created after this
            datetime will be retrieved (this datetime will NOT be included in
            the response). E.g. 2023-01-31T15:00:00 for 31 of January 2023 at
            3PM UTC, UTC is the only format that is supported on all connectors.
        - name: partner_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Partner Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChiftPage_JournalEntryMultiAnalyticPlan_'
        '400':
          content:
            application/json:
              example:
                message: >-
                  You can retrieve maximum 3 months of data at once. The
                  difference between 'date_from' and 'date_to' is at maximum 3
                  months when 'updated_after' parameter is not provided.
                status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - mcp_auth:
            - accounting
            - accounting.read
            - accounting.journal_entries
            - accounting.journal_entries.read
components:
  schemas:
    BoolParam:
      type: string
      enum:
        - 'true'
        - 'false'
      title: BoolParam
    ChiftPage_JournalEntryMultiAnalyticPlan_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/JournalEntryMultiAnalyticPlan'
          type: array
          title: Items
        total:
          type: integer
          minimum: 0
          title: Total
        page:
          type: integer
          minimum: 1
          title: Page
        size:
          type: integer
          minimum: 1
          title: Size
      type: object
      required:
        - items
        - total
        - page
        - size
      title: ChiftPage[JournalEntryMultiAnalyticPlan]
    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'
    JournalEntryMultiAnalyticPlan:
      properties:
        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 example, it can be used to
            store a reference number, the invoice number issued by the suppllier
            or any other relevant information.
        due_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Due Date
          description: >-
            If the journal entry relates to an invoice, this is the due date for
            payment or settlement (format: YYYY-MM-DD).
        journal_id:
          type: string
          title: Journal Id
          description: >-
            Id of the journal instance in the accounting system in which the
            journal entry is recorded.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        journal_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Journal Name
          description: Name of the journal in which the journal entry is recorded.
        date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date
          description: >-
            Accounting date of the journal entry. It is automatically set to
            '1970-01-01' if the value is not available/empty in the accounting
            system.
          default: '1970-01-01'
        posted:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Posted
          description: >-
            Indicates if the journal entry has been posted (finalized) in the
            accounting system.
          default: false
        id:
          type: string
          title: Id
          description: Unique id of the journal entry instance in the accounting system.
        due_dates:
          anyOf:
            - items:
                $ref: '#/components/schemas/JournalItemDueDatesOut'
              type: array
            - type: 'null'
          title: Due Dates
          description: List of all due dates of a journal entry.
          default: []
        attachments_info:
          $ref: '#/components/schemas/ItemAttachmentInfoOut'
          description: >-
            Indicates whether a file attachment (e.g. PDF or image) is linked to
            this journal entry 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=entry&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.
        items:
          anyOf:
            - items:
                $ref: '#/components/schemas/JournalItemMultiAnalyticPlan'
              type: array
            - type: 'null'
          title: Items
          description: >-
            List of journal items that make up the journal entry. Each item
            represents a line in the journal entry, and the sum of debits must
            equal the sum of credits to ensure the entry is balanced.
          default: []
      type: object
      required:
        - journal_id
        - id
      title: JournalEntryMultiAnalyticPlan
    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
    JournalItemDueDatesOut:
      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 entry 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 entry on that due
            date.
        debit:
          anyOf:
            - type: number
            - type: 'null'
          title: Debit
          description: Debit of the item on this due date.
          default: 0
        credit:
          anyOf:
            - type: number
            - type: 'null'
          title: Credit
          description: Credit of the item on this due date.
          default: 0
      type: object
      required:
        - due_date
      title: JournalItemDueDatesOut
    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
    JournalItemMultiAnalyticPlan:
      properties:
        account_number:
          type: string
          minLength: 1
          title: Account Number
          description: >-
            Depending on account_type, if the account_type is 'general_account',
            this is the general ledger account number used to book the journal
            item against. If the account_type is 'customer_account',
            'supplier_account' or 'employee_account', this is the thirdparty_id
            (id of the customer, supplier or employee in the accounting system).
        partner_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Partner Id
          description: >-
            Id of the thirdparty (customer, supplier or employee) in the
            accounting system if the journal item relates to a thirdparty (e.g.,
            an invoice).
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: >-
            Text description for this journal item. This is typically used to
            provide additional context or information.
        debit:
          type: number
          title: Debit
          description: Amount to debit on the account. Must be 0 if credit field is not 0
        credit:
          type: number
          title: Credit
          description: Amount to credit on the account. Must be 0 if debit field is not 0
        currency:
          type: string
          minLength: 1
          title: Currency
          description: Currency code (e.g., USD, EUR) used for the journal item amounts.
        currency_exchange_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Currency Exchange Rate
          description: >-
            Exchange rate applicable at the date of the journal item. Required
            when currency is different from the folder's default currency.
          default: 1
        id:
          type: string
          title: Id
          description: Unique id of the journal item instance in the accounting system.
        partner_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Partner Name
          description: >-
            Name of the thirdparty (customer, supplier or employee) linked to
            the journal item if journal item relates to a thirdparty (e.g., an
            invoice).
        account_name:
          type: string
          title: Account Name
          description: >-
            Name or label of the ledger account used to book the journal item
            against.
        matching_numbers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Matching Numbers
          description: >-
            List of matching numbers used to link this journal item to other
            entries in the accounting system. This is used for
            reconciliation/lettering purposes.
          default: []
        analytic_distribution:
          anyOf:
            - items:
                $ref: '#/components/schemas/AnalyticDistribution'
              type: array
            - type: 'null'
          title: Analytic Distribution
          description: >-
            List of analytic distributions for the journal item. Each
            distribution specifies an analytic plan and the allocation of the
            journal entry item's amount across analytic accounts using
            percentages.
          default: []
      type: object
      required:
        - account_number
        - debit
        - credit
        - currency
        - id
        - account_name
      title: JournalItemMultiAnalyticPlan
    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
    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
    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
  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.

````