Agicap Export API

The Export API from Agicap — 4 operation(s) for export.

OpenAPI Specification

agicap-export-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  contact: {}
  title: Clients AR Account reports Export API
  version: v1
servers:
- url: https://api.agicap.com
- url: https://api.agicap.internal
tags:
- name: Export
paths:
  /public/treasury-bank-journal/v1/entities/{entityId}/exported-bank-journal-entries/mark-as-imported:
    post:
      description: 'Indicates Agicap that some exported bank journal entries from Agicap were successfully imported in the client accounting system.



        To identify the exported bank journal entry, use the agicapUniqueId provided by Agicap during the export (see the POST Export operation response)



        Entries with pending corrections will have their corrections cancelled.


        Unknown agicapUniqueId values are silently ignored.



        The maximum number of exported bank journal entries you can report is 1000 per request, if you need to report more,

        simply call this endpoint as many times as necessary.'
      operationId: MarkAsImported
      parameters:
      - description: Agicap entity identifier
        example: 456897
        in: path
        name: entityId
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/*+json:
            schema:
              allOf:
              - $ref: '#/components/schemas/MarkAsImportedRequest'
              description: Request to indicate Agicap that some exported bank journal entries from Agicap were successfully imported in the client accounting system.
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/MarkAsImportedRequest'
              description: Request to indicate Agicap that some exported bank journal entries from Agicap were successfully imported in the client accounting system.
          text/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/MarkAsImportedRequest'
              description: Request to indicate Agicap that some exported bank journal entries from Agicap were successfully imported in the client accounting system.
        description: Request body with the list of bank journal entries successfully imported
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Indicates Agicap that some exported bank journal entries from Agicap were successfully imported in the client accounting system.
      tags:
      - Export
  /public/treasury-bank-journal/v1/entities/{entityId}/exported-bank-journal-entries/mark-as-not-imported:
    post:
      description: "Indicates Agicap that some exported bank journal entries from Agicap were not correctly imported in the client accounting system.\n\n\nYou can report several errors per bank journal entry. For each error, use the most precise error type whenever possible, and OTHER otherwise.\n\n\nTo identify the exported bank journal entry, use the agicapUniqueId provided by Agicap during the export (see the POST Export operation response)\n\nThis means, you need to keep track of which entry in the client accounting system corresponds to the agicapUniqueId.\n\n\nThe maximum number of exported bank journal entries you can report is 1000 per request, if you need to report more,\nsimply call this endpoint as many times as necessary.\n\n\nIn the example of an export response below, the id to use is \"agicapUniqueId\": \"f7f7ed5c-943c-4385-aa8d-145fd76b2fa1\":\n<pre>\n    POST /public-api/treasury-bank-journal/v1/entities/{entityId}/exports/{exportId}\n    {\n      \"exportId\": \"7397d1b5-d76d-43d2-a153-2bcff5e57455\",\n      \"year\": 2024,\n      \"bankJournalExportIndexInYear\": 1,\n      \"entityName\": \"Contoso\",\n      \"entries\": [\n        {\n          \"indexInYear\": 57,\n          \"indexInExport\": 1,\n          \"agicapUniqueId\": \"f7f7ed5c-943c-4385-aa8d-145fd76b2fa1\",   -- this is the id to use !\n          \"name\": \"ACME Payment\",\n          ... other fields omitted for brevity.\n        }\n      ]\n    }\n</pre>"
      operationId: MarkAsNotImported
      parameters:
      - description: Agicap entity identifier
        example: 456897
        in: path
        name: entityId
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/*+json:
            example:
              entriesNotImported:
              - entryAgicapUniqueId: f7f7ed5c-943c-4385-aa8d-145fd76b2fa1
                errors:
                - errorMessage: 1234 is not a valid accounting account
                  errorType: UNKNOWN_ACCOUNTING_ACCOUNT
                - errorMessage: 5678 is not a valid third party
                  errorType: UNKNOWN_THIRD_PARTY
              - entryAgicapUniqueId: 6dd1efd6-f286-4877-9012-2cf7c3bc6858
                errors:
                - errorMessage: No journal code set
                  errorType: UNKNOWN_JOURNAL_CODE
            schema:
              allOf:
              - $ref: '#/components/schemas/MarkAsNotImportedRequest'
              description: Request to indicate Agicap that some exported bank journal entries from Agicap were not correctly imported in the client accounting system.
          application/json:
            example:
              entriesNotImported:
              - entryAgicapUniqueId: f7f7ed5c-943c-4385-aa8d-145fd76b2fa1
                errors:
                - errorMessage: 1234 is not a valid accounting account
                  errorType: UNKNOWN_ACCOUNTING_ACCOUNT
                - errorMessage: 5678 is not a valid third party
                  errorType: UNKNOWN_THIRD_PARTY
              - entryAgicapUniqueId: 6dd1efd6-f286-4877-9012-2cf7c3bc6858
                errors:
                - errorMessage: No journal code set
                  errorType: UNKNOWN_JOURNAL_CODE
            schema:
              allOf:
              - $ref: '#/components/schemas/MarkAsNotImportedRequest'
              description: Request to indicate Agicap that some exported bank journal entries from Agicap were not correctly imported in the client accounting system.
          text/json:
            example:
              entriesNotImported:
              - entryAgicapUniqueId: f7f7ed5c-943c-4385-aa8d-145fd76b2fa1
                errors:
                - errorMessage: 1234 is not a valid accounting account
                  errorType: UNKNOWN_ACCOUNTING_ACCOUNT
                - errorMessage: 5678 is not a valid third party
                  errorType: UNKNOWN_THIRD_PARTY
              - entryAgicapUniqueId: 6dd1efd6-f286-4877-9012-2cf7c3bc6858
                errors:
                - errorMessage: No journal code set
                  errorType: UNKNOWN_JOURNAL_CODE
            schema:
              allOf:
              - $ref: '#/components/schemas/MarkAsNotImportedRequest'
              description: Request to indicate Agicap that some exported bank journal entries from Agicap were not correctly imported in the client accounting system.
        description: Request body describing the errors for each bank journal entry not correctly imported in the client accounting system
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Indicates Agicap that some exported bank journal entries from Agicap were not correctly imported in the client accounting system.
      tags:
      - Export
  /public/treasury-bank-journal/v1/entities/{entityId}/exports:
    get:
      description: 'Returns a list of short summaries of bank journal entries previous exports, without their entries.


        You can then use `exportId` of a summary to call the <strong>GET Export</strong> endpoint to retrieve the export content with its entries.


        The query pagination is based on a mandatory timestamp cursor whose value is specified either with the `after` parameter or the

        `before` parameter (but not both).


        It returns (at most) `size` bank journal exports whose export dates are either:



        - strictly after the given `after` parameter if specified, the results ordered chronologically (from oldest to newest)


        - strictly before the given `before` parameter if specified, the results in reverse chronological order (from newest to oldest)



        Both `after` and `before` parameters are ISO8601 date-time format interpreted in UTC, examples:



        - `2024-11-01`

        - `2024-11-01T14:30:00`

        - `2024-11-01T14:30:00Z`

        - `2024-11-01T14:30:00.123Z`


        Note that the server can return less than the `size` items requested if it deems the value too big, in this case, query again by using the

        returned cursor value as a new starting point.


        In the response if the cursor `after` value is null, this means there is no value `after` that, same goes for the

        `before` value.


        Example:



        - Query 1: `/public-api/treasury-bank-journal/v1/entities/42/exports?size=10&after=2024-11-01`


        - Response: 10 bank journals returned chronologically, the last one at `2024-11-07T14:30:00Z` which is the value of the returned cursor `after`

        field



        To get the next bank journal exports, use the returned cursor `after` field value as the `after` parameter,

        remember that bank journals at this date are excluded so you won''t get the last bank journal of the previous response again.



        - Query 2: `/public-api/treasury-bank-journal/v1/entities/42/exports?size=10&after=2024-11-07T14:30:00Z`


        - Response: 7 bank journal exports returned, since there are no more bank journal exports to get, the returned cursor `after` field is null



        The `before` parameter works the same way, but instead of going in chronological order, it goes backward, the newest export is first and the oldest

        last.'
      operationId: GetBankJournalExports
      parameters:
      - description: Agicap entity identifier
        example: 456897
        in: path
        name: entityId
        required: true
        schema:
          format: int32
          type: integer
      - description: When specified, returns bank journals whose export date is before the given UTC date time
        example: '2024-11-01T11:27:00'
        in: query
        name: before
        schema:
          type: string
      - description: When specified, returns bank journals whose export date is after the given UTC date time
        example: '2024-10-21T14:30:00'
        in: query
        name: after
        schema:
          type: string
      - description: Number of bank journals to return
        example: 100
        in: query
        name: size
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              example:
                cursor:
                  after: '2024-10-30T18:07:00.806Z'
                  before: null
                  size: 3
                items:
                - exportDateUtc: '2024-10-28T14:30:00.123Z'
                  exportId: f8e601b1-1724-41cf-bd60-f720f91236c2
                  exportIndexInYear: 1
                  exportYear: 2024
                  indexInYearOfFirstEntryInBankJournal: 1
                  indexInYearOfLastEntryInBankJournal: 20
                  numberOfEntries: 20
                - exportDateUtc: '2024-10-29T09:18:00.504Z'
                  exportId: 0e9d04c2-c6dd-44ec-9789-eef8a04ec7a0
                  exportIndexInYear: 2
                  exportYear: 2024
                  indexInYearOfFirstEntryInBankJournal: 21
                  indexInYearOfLastEntryInBankJournal: 30
                  numberOfEntries: 10
                - exportDateUtc: '2024-10-30T18:07:00.806Z'
                  exportId: 0e9d04c2-c6dd-44ec-9789-eef8a04ec7a0
                  exportIndexInYear: 3
                  exportYear: 2024
                  indexInYearOfFirstEntryInBankJournal: 31
                  indexInYearOfLastEntryInBankJournal: 50
                  numberOfEntries: 20
              schema:
                $ref: '#/components/schemas/GetBankJournalExportsResponse'
            text/json:
              example:
                cursor:
                  after: '2024-10-30T18:07:00.806Z'
                  before: null
                  size: 3
                items:
                - exportDateUtc: '2024-10-28T14:30:00.123Z'
                  exportId: f8e601b1-1724-41cf-bd60-f720f91236c2
                  exportIndexInYear: 1
                  exportYear: 2024
                  indexInYearOfFirstEntryInBankJournal: 1
                  indexInYearOfLastEntryInBankJournal: 20
                  numberOfEntries: 20
                - exportDateUtc: '2024-10-29T09:18:00.504Z'
                  exportId: 0e9d04c2-c6dd-44ec-9789-eef8a04ec7a0
                  exportIndexInYear: 2
                  exportYear: 2024
                  indexInYearOfFirstEntryInBankJournal: 21
                  indexInYearOfLastEntryInBankJournal: 30
                  numberOfEntries: 10
                - exportDateUtc: '2024-10-30T18:07:00.806Z'
                  exportId: 0e9d04c2-c6dd-44ec-9789-eef8a04ec7a0
                  exportIndexInYear: 3
                  exportYear: 2024
                  indexInYearOfFirstEntryInBankJournal: 31
                  indexInYearOfLastEntryInBankJournal: 50
                  numberOfEntries: 20
              schema:
                $ref: '#/components/schemas/GetBankJournalExportsResponse'
            text/plain:
              example:
                cursor:
                  after: '2024-10-30T18:07:00.806Z'
                  before: null
                  size: 3
                items:
                - exportDateUtc: '2024-10-28T14:30:00.123Z'
                  exportId: f8e601b1-1724-41cf-bd60-f720f91236c2
                  exportIndexInYear: 1
                  exportYear: 2024
                  indexInYearOfFirstEntryInBankJournal: 1
                  indexInYearOfLastEntryInBankJournal: 20
                  numberOfEntries: 20
                - exportDateUtc: '2024-10-29T09:18:00.504Z'
                  exportId: 0e9d04c2-c6dd-44ec-9789-eef8a04ec7a0
                  exportIndexInYear: 2
                  exportYear: 2024
                  indexInYearOfFirstEntryInBankJournal: 21
                  indexInYearOfLastEntryInBankJournal: 30
                  numberOfEntries: 10
                - exportDateUtc: '2024-10-30T18:07:00.806Z'
                  exportId: 0e9d04c2-c6dd-44ec-9789-eef8a04ec7a0
                  exportIndexInYear: 3
                  exportYear: 2024
                  indexInYearOfFirstEntryInBankJournal: 31
                  indexInYearOfLastEntryInBankJournal: 50
                  numberOfEntries: 20
              schema:
                $ref: '#/components/schemas/GetBankJournalExportsResponse'
          description: OK
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Returns a list of bank journal entries export summaries.
      tags:
      - Export
  /public/treasury-bank-journal/v1/entities/{entityId}/exports/{exportId}:
    get:
      description: 'Retrieve an existing bank journal export by its identifier, with all its entries.


        The bank journal export is returned as a JSON payload.


        If the export is not found an error is returned.'
      operationId: GetExport
      parameters:
      - description: Agicap entity identifier
        example: 54
        in: path
        name: entityId
        required: true
        schema:
          format: int32
          type: integer
      - description: Unique ID of an existing bank journal export.
        example: 31dee215-e458-4145-8fe8-c20a0ea06042
        in: path
        name: exportId
        required: true
        schema:
          format: uuid
          type: string
      responses:
        '200':
          content:
            application/json:
              example:
                bankJournalExportIndexInYear: 1
                entityName: Contoso
                entries:
                - accountingAccountExternalId: null
                  accountingAccountNumber: '201.01000'
                  accountingCurrency: USD
                  agicapUniqueId: f7f7ed5c-943c-4385-aa8d-145fd76b2fa1
                  bankAccountName: Cars bank account
                  causale: RIBA
                  counterparts:
                  - accountingAccountExternalId: null
                    accountingAccountNumber: '140.0000'
                    accountingAccountType: SUPPLIER
                    accountingCurrency: null
                    analyticalCodes: {}
                    creditInAccountingCurrency: null
                    creditInOriginalCurrency: null
                    customFields: null
                    debitInAccountingCurrency: null
                    debitInOriginalCurrency: 700000
                    document:
                      documentIssueDate: null
                      documentReference: INV-2025-0001
                      documentType: SUPPLIER_INVOICE
                      externalEntityId: null
                      externalId: 29a7e40d-3e7a-44bc-b245-0b7da2eaf5bd
                      originalDueDate: '2025-12-21'
                      uniqueId: yv73xx45
                    exchangeRate: null
                    journalCode: SG1
                    linkedExportedEntry: null
                    name: ACME Invoice 1
                    originalCurrency: EUR
                    taxKey: null
                    thirdPartyCode: S23
                    thirdPartyExternalId: null
                    thirdPartyName: Supplier 23
                  - accountingAccountExternalId: null
                    accountingAccountNumber: '140.0000'
                    accountingAccountType: SUPPLIER
                    accountingCurrency: USD
                    analyticalCodes:
                      Country: FR
                      Project: Marketing
                    creditInAccountingCurrency: null
                    creditInOriginalCurrency: null
                    customFields:
                    - name: ERP id
                      value: '123'
                    - name: Company division
                      value: Cars
                    debitInAccountingCurrency: 200000
                    debitInOriginalCurrency: 300000
                    document:
                      documentIssueDate: null
                      documentReference: INV-2025-0002
                      documentType: SUPPLIER_INVOICE
                      externalEntityId: null
                      externalId: 37cfb760-8f09-4fc1-8269-18f92e6e90e4
                      originalDueDate: '2025-12-21'
                      uniqueId: 2wrrwpou
                    exchangeRate: null
                    journalCode: SG1
                    linkedExportedEntry: null
                    name: ACME Invoice 2
                    originalCurrency: EUR
                    taxKey: null
                    thirdPartyCode: S23
                    thirdPartyExternalId: null
                    thirdPartyName: Supplier 23
                  creditInAccountingCurrency: 900000
                  creditInOriginalCurrency: 1000000
                  debitInAccountingCurrency: null
                  debitInOriginalCurrency: null
                  entryMemo: null
                  exchangeRate: null
                  exportEntryReference: 0o00001l
                  indexInExport: 1
                  indexInYear: 57
                  journalCode: SG1
                  name: ACME Payment
                  originalCurrency: EUR
                  paymentDate: '2024-12-24'
                  type: BANK
                exportId: 7397d1b5-d76d-43d2-a153-2bcff5e57455
                year: 2024
              schema:
                $ref: '#/components/schemas/GetExportResponse'
            text/json:
              example:
                bankJournalExportIndexInYear: 1
                entityName: Contoso
                entries:
                - accountingAccountExternalId: null
                  accountingAccountNumber: '201.01000'
                  accountingCurrency: USD
                  agicapUniqueId: f7f7ed5c-943c-4385-aa8d-145fd76b2fa1
                  bankAccountName: Cars bank account
                  causale: RIBA
                  counterparts:
                  - accountingAccountExternalId: null
                    accountingAccountNumber: '140.0000'
                    accountingAccountType: SUPPLIER
                    accountingCurrency: null
                    analyticalCodes: {}
                    creditInAccountingCurrency: null
                    creditInOriginalCurrency: null
                    customFields: null
                    debitInAccountingCurrency: null
                    debitInOriginalCurrency: 700000
                    document:
                      documentIssueDate: null
                      documentReference: INV-2025-0001
                      documentType: SUPPLIER_INVOICE
                      externalEntityId: null
                      externalId: 29a7e40d-3e7a-44bc-b245-0b7da2eaf5bd
                      originalDueDate: '2025-12-21'
                      uniqueId: yv73xx45
                    exchangeRate: null
                    journalCode: SG1
                    linkedExportedEntry: null
                    name: ACME Invoice 1
                    originalCurrency: EUR
                    taxKey: null
                    thirdPartyCode: S23
                    thirdPartyExternalId: null
                    thirdPartyName: Supplier 23
                  - accountingAccountExternalId: null
                    accountingAccountNumber: '140.0000'
                    accountingAccountType: SUPPLIER
                    accountingCurrency: USD
                    analyticalCodes:
                      Country: FR
                      Project: Marketing
                    creditInAccountingCurrency: null
                    creditInOriginalCurrency: null
                    customFields:
                    - name: ERP id
                      value: '123'
                    - name: Company division
                      value: Cars
                    debitInAccountingCurrency: 200000
                    debitInOriginalCurrency: 300000
                    document:
                      documentIssueDate: null
                      documentReference: INV-2025-0002
                      documentType: SUPPLIER_INVOICE
                      externalEntityId: null
                      externalId: 37cfb760-8f09-4fc1-8269-18f92e6e90e4
                      originalDueDate: '2025-12-21'
                      uniqueId: 2wrrwpou
                    exchangeRate: null
                    journalCode: SG1
                    linkedExportedEntry: null
                    name: ACME Invoice 2
                    originalCurrency: EUR
                    taxKey: null
                    thirdPartyCode: S23
                    thirdPartyExternalId: null
                    thirdPartyName: Supplier 23
                  creditInAccountingCurrency: 900000
                  creditInOriginalCurrency: 1000000
                  debitInAccountingCurrency: null
                  debitInOriginalCurrency: null
                  entryMemo: null
                  exchangeRate: null
                  exportEntryReference: 0o00001l
                  indexInExport: 1
                  indexInYear: 57
                  journalCode: SG1
                  name: ACME Payment
                  originalCurrency: EUR
                  paymentDate: '2024-12-24'
                  type: BANK
                exportId: 7397d1b5-d76d-43d2-a153-2bcff5e57455
                year: 2024
              schema:
                $ref: '#/components/schemas/GetExportResponse'
            text/plain:
              example:
                bankJournalExportIndexInYear: 1
                entityName: Contoso
                entries:
                - accountingAccountExternalId: null
                  accountingAccountNumber: '201.01000'
                  accountingCurrency: USD
                  agicapUniqueId: f7f7ed5c-943c-4385-aa8d-145fd76b2fa1
                  bankAccountName: Cars bank account
                  causale: RIBA
                  counterparts:
                  - accountingAccountExternalId: null
                    accountingAccountNumber: '140.0000'
                    accountingAccountType: SUPPLIER
                    accountingCurrency: null
                    analyticalCodes: {}
                    creditInAccountingCurrency: null
                    creditInOriginalCurrency: null
                    customFields: null
                    debitInAccountingCurrency: null
                    debitInOriginalCurrency: 700000
                    document:
                      documentIssueDate: null
                      documentReference: INV-2025-0001
                      documentType: SUPPLIER_INVOICE
                      externalEntityId: null
                      externalId: 29a7e40d-3e7a-44bc-b245-0b7da2eaf5bd
                      originalDueDate: '2025-12-21'
                      uniqueId: yv73xx45
                    exchangeRate: null
                    journalCode: SG1
                    linkedExportedEntry: null
                    name: ACME Invoice 1
                    originalCurrency: EUR
                    taxKey: null
                    thirdPartyCode: S23
                    thirdPartyExternalId: null
                    thirdPartyName: Supplier 23
                  - accountingAccountExternalId: null
                    accountingAccountNumber: '140.0000'
                    accountingAccountType: SUPPLIER
                    accountingCurrency: USD
                    analyticalCodes:
                      Country: FR
                      Project: Marketing
                    creditInAccountingCurrency: null
                    creditInOriginalCurrency: null
                    customFields:
                    - name: ERP id
                      value: '123'
                    - name: Company division
                      value: Cars
                    debitInAccountingCurrency: 200000
                    debitInOriginalCurrency: 300000
                    document:
                      documentIssueDate: null
                      documentReference: INV-2025-0002
                      documentType: SUPPLIER_INVOICE
                      externalEntityId: null
                      externalId: 37cfb760-8f09-4fc1-8269-18f92e6e90e4
                      originalDueDate: '2025-12-21'
                      uniqueId: 2wrrwpou
                    exchangeRate: null
                    journalCode: SG1
                    linkedExportedEntry: null
                    name: ACME Invoice 2
                    originalCurrency: EUR
                    taxKey: null
                    thirdPartyCode: S23
                    thirdPartyExternalId: null
                    thirdPartyName: Supplier 23
                  creditInAccountingCurrency: 900000
                  creditInOriginalCurrency: 1000000
                  debitInAccountingCurrency: null
                  debitInOriginalCurrency: null
                  entryMemo: null
                  exchangeRate: null
                  exportEntryReference: 0o00001l
                  indexInExport: 1
                  indexInYear: 57
                  journalCode: SG1
                  name: ACME Payment
                  originalCurrency: EUR
                  paymentDate: '2024-12-24'
                  type: BANK
                exportId: 7397d1b5-d76d-43d2-a153-2bcff5e57455
                year: 2024
              schema:
                $ref: '#/components/schemas/GetExportResponse'
          description: OK
        '401':
          description: Unauthorized request.
        '403':
          description: Forbidden request.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
            text/plain:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Not Found
        '429':
          description: Too many requests. Please try again later.
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: An internal server occurred.
      security:
      - bearer_client_credentials:
        - agicap:public-api
      - bearerAuth: []
      summary: Get an existing bank journal entries export.
      tags:
      - Export
    post:
      description: "Export all the bank journal entries ready to be exported. You need to provide the export id as a Guid\n\nThe bank journal entries will become exported instead of ready to be exported and won't be exportable anymore, they can be retrieved later on with the same\n`exportId` with the <strong>GET Export</strong> endpoint.\n\nThe bank journal is returned as a JSON payload.\n\nThe maximum number of entries in a bank journal is limited (currently 5000), if you have more entries to export, simply export several journals with\ndifferent `exportId`.\n\nNote that the exported counterparts custom fields include the ERP identification fields from business document when imported in Agicap.<hr /><p><b>This section is only for ERPs requiring the count of bank journals and bank journal entries created during the year</b></p><b>If your ERP does not require these counts, you can simply specify an empty request body (\"\" or \"{}\").</b><p>\n    For the first export of the year via Agicap, if a user has already created bank journals <strong>outside Agicap</strong> and its ERP needs to know\n    these counts, you can specify where to start the counts of bank journal and bank journal entries in the current year, by specifying in the request\n    body a <i>currentExportCounts</i> object and set the appropriate values in <i>currentBankJournalsCountInYear</i> and\n    <i>currentBankJournalEntriesCountInYear</i> fields.\n</p><p><b>Warning:</b> This must be done only once, the request will fail if you try to set these counts multiple times.\n</p>"
      operationId: Export
      parameters:
      - description: Agicap entity identifier
        example: 54
        in: path
        name: entityId
        required: true
        schema:
          format: int32
          type: integer
      - description: 'Unique ID of the export, provided by the caller. In case of network problem, use the same

          unique ID to retry.'
        example: 31dee215-e458-4145-8fe8-c20a0ea06042
        in: path
        name: exportId
        required: true
        schema:
          format: uuid
          type: string
      requestBody:
        content:
          application/*+json:
            example:
              currentExportCounts:
                currentBankJournalEntriesCountInYear: 100
                currentBankJournalsCountInYear: 5
            schema:
              allOf:
        

# --- truncated at 32 KB (66 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/agicap/refs/heads/main/openapi/agicap-export-api-openapi.yml