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
\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
" 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 GET Export 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 GET Export 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.

This section is only for ERPs requiring the count of bank journals and bank journal entries created during the year

If your ERP does not require these counts, you can simply specify an empty request body (\"\" or \"{}\").

\n For the first export of the year via Agicap, if a user has already created bank journals outside Agicap 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 currentExportCounts object and set the appropriate values in currentBankJournalsCountInYear and\n currentBankJournalEntriesCountInYear fields.\n

Warning: This must be done only once, the request will fail if you try to set these counts multiple times.\n

" 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: - $ref: '#/components/schemas/ExportRequest' description: Export request application/json: example: currentExportCounts: currentBankJournalEntriesCountInYear: 100 currentBankJournalsCountInYear: 5 schema: allOf: - $ref: '#/components/schemas/ExportRequest' description: Export request text/json: example: currentExportCounts: currentBankJournalEntriesCountInYear: 100 currentBankJournalsCountInYear: 5 schema: allOf: - $ref: '#/components/schemas/ExportRequest' description: Export request description: "

\n This is only needed if your ERP requires these counts, and if that is the case, it is only needed for the FIRST export.\n

\n

\n If you don't need it, simply pass an empty body (\"\" or \"{}\").\n

\nOptional one time use export parameters allowing to set:\n " 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: '2025-12-21T11:11:11+00:00' 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/ExportResponse' 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: '2025-12-21T11:11:11+00:00' 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/ExportResponse' 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: '2025-12-21T11:11:11+00:00' 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/ExportResponse' description: OK '204': description: No Content '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: Export bank journal entries ready to be exported. tags: - Export components: schemas: CurrentExportCountsDto: additionalProperties: false description: 'Optional export parameters allowing to set where to start: This is needed if there were bank journal already created outside Agicap systems, Agicap needs to know where to pick up the counts.' properties: currentBankJournalEntriesCountInYear: description: The number of bank journal entries previously created (starts at 1) format: int32 type: integer currentBankJournalsCountInYear: description: The number of bank journal previously created (starts at 1) format: int32 type: integer required: - currentBankJournalEntriesCountInYear - currentBankJournalsCountInYear type: object MarkAsNotImportedRequest: additionalProperties: false description: Request to indicate Agicap that some exported bank journal entries from Agicap were not correctly imported in the client accounting system. properties: entriesNotImported: description: The list of bank journal entries not imported in the client accounting system with their errors description (max 1000 entries) items: $ref: '#/components/schemas/NotImportedEntryDto' type: array required: - entriesNotImported type: object CustomFieldDto: additionalProperties: false description: A custom field properties: name: description: The custom field name type: string value: description: The custom field value type: string required: - name - value type: object AccountingAccountTypeDto: enum: - OTHER - SUPPLIER - CLIENT - EXPENSE - PRODUCT - VAT - BANK type: string DocumentDto: additionalProperties: false description: Document related (invoice, credit note, purchase order, etc) information properties: documentIssueDate: description: The document issue date format: date-time nullable: true type: string documentReference: description: '>The document reference number (e.g., invoice number, purchase order number)' nullable: true type: string documentType: description: 'The document type (CLIENT_INVOICE, CLIENT_CREDIT_NOTE, SUPPLIER_INVOICE, SUPPLIER_CREDIT_NOTE, CLIENT_QUOTE, SALES_ORDER, PURCHASE_ORDER, PROFORMA_INVOICE, OTHER)' type: string externalEntityId: description: The external identifier of the owning entity in the source system nullable: true type: string externalId: description: The document identifier from the source system nullable: true type: string originalDueDate: description: The document due date format: date type: string uniqueId: description: A unique 8-character alphanumeric identifier for the document type: string required: - documentType - originalDueDate - uniqueId type: object ExportRequest: additionalProperties: false description: Export request properties: currentExportCounts: allOf: - $ref: '#/components/schemas/CurrentExportCountsDto' description: 'Optional export parameters allowing to set where to start: This is needed if there were bank journal already created outside Agicap systems, Agicap needs to know where to pick up the counts.' nullable: true type: object GetExportResponse: additionalProperties: false description: Get exported bank journal response properties: bankJournalExportIndexInYear: description: The index of the bank journal export in the current year format: int32 type: integer entityName: description: Name of the entity type: string entries: description: Array of all entries in the bank journal export items: $ref: '#/components/schemas/ExportedBankJournalEntryDto' type: array exportId: description: The identifier of the export as specified in the request format: uuid type: string year: description: Current year in UTC when the bank journal has been exported format: int32 type: integer required: - bankJournalExportIndexInYear - entityName - entries - exportId - year type: object ExportedCounterpartDto: additionalProperties: false description: A bank journal entry counterpart properties: accountingAccountExternalId: description: An optional ERP-specific external identifier for the accounting account nullable: true type: string accountingAccountNumber: description: The accounting account number type: string accountingAccountType: allOf: - $ref: '#/components/schemas/AccountingAccountTypeDto' description: The accounting account type (OTHER, SUPPLIER, CLIENT, EXPENSE, PRODUCT, VAT, BANK) accountingCurrency: description: The accounting currency ISO code on three uppercase letters (ISO4217 standard) nullable: true type: string analyticalCodes: additionalProperties: type: string description: The list of analytical codes of the counterpart type: object creditInAccountingCurrency: description: Credit value in accounting currency (rounded to four decimals) format: double nullable: true type: number creditInOriginalCurrency: description: Credit value in original currency (rounded to four decimals) format: double nullable: true type: number customFields: description: Additional fields coming from the reconciled expected used to initialize the counterpart, they include the ERP identification fields from business document when imported in Agicap items: $ref: '#/components/schemas/CustomFieldDto' nullable: true type: array debitInAccountingCurrency: description: Debit value in accounting currency (rounded to four decimals) format: double nullable: true type: number debitInOriginalCurrency: description: Debit value in original currency (rounded to four decimals) format: double nullable: true type: number document: allOf: - $ref: '#/components/schemas/DocumentDto' description: Document related (invoice, credit note, purchase order, etc) information (reference, original due date, type) nullable: true exchangeRate: description: The exchange rate applied between the original currency amount and the accounting currency amount (rounded to six decimals). Null when the rate is not applicable (e.g., synthetic exchange gain/loss counterpart, or when the original amount is zero). format: double nullable: true type: number journalCode: description: The journal code nullable: true type: string linkedExportedEntry: allOf: - $ref: '#/components/schemas/LinkedExportedEntryDto' description: Reference to a previously exported journal entry linked to this counterpart (used for ERP reconciliation) nullable: true name: description: The counterpart name (title) type: string originalCurrency: description: The original currency ISO code on three uppercase letters (ISO4217 standard) type: string taxKey: description: Tax Key (only relevant for Vat accounting account) nullable: true type: string thirdPartyCode: description: The third party code nullable: true type: string thirdPartyExternalId: description: An optional ERP-specific external identifier for the third party nullable: true type: string thirdPartyName: description: The third party name nullable: true type: string required: - accountingAccountNumber - accountingAccountType - analyticalCodes - name - originalCurrency type: object ExportedBankJournalEntryDto: additionalProperties: false description: A bank journal entry properties: accountingAccountExternalId: description: An optional ERP-specific external identifier for the bank accounting account nullable: true type: string accountingAccountNumber: description: The accounting account number type: string accountingCurrency: description: The accounting currency ISO code on three uppercase letters (ISO 4217 standard) type: string agicapUniqueId: description: A unique id generated by Agicap format: uuid type: string bankAccountName: description: The bank account name type: string causale: description: The banking transaction causale (only populated for entities with causale option enabled) nullable: true type: string counterparts: description: The bank journal entry counterparts items: $ref: '#/components/schemas/ExportedCounterpartDto' type: array creditInAccountingCurrency: description: Credit value in accounting currency (rounded to four decimals) format: double nullable: true type: number creditInOriginalCurrency: description: Credit value in original currency (rounded to four decimals) format: double nullable: true type: number debitInAccountingCurrency: description: Debit value in accounting currency (rounded to four decimals) format: double nullable: true type: number debitInOriginalCurrency: description: Debit value in original currency (rounded to four decimals) format: double nullable: true type: number entryMemo: description: A free-text memo for the bank journal entry nullable: true type: string exchangeRate: description: The exchange rate applied between the original currency amount and the accounting currency amount (rounded to six decimals). Null when the rate is not applicable (e.g., synthetic exchange gain/loss counterpart, or when the original amount is zero). format: double nullable: true type: number exportEntryReference: description: A unique reference per entity generated by Agicap, max 8 characters, designed to match reference formats expected by ERPs and accounting systems type: string indexInExport: description: Index of the bank journal entry in the bank journal (starts at 1) format: int32 type: integer indexInYear: description: Index of the bank journal entry in the current year (starts at 1) format: int32 type: integer journalCode: description: The journal code nullable: true type: string name: description: The bank journal entry name (title) type: string originalCurrency: description: The original currency ISO code on three uppercase letters (ISO 4217 standard) type: string paymentDate: description: The banking transaction payment date format: date type: string type: description: 'The journal entry type: ''BANK'' for bank journal entries, ''CASH_IN_TRANSIT'' for cash-in-transit entries.' type: string required: - accountingAccountNumber - accountingCurrency - agicapUniqueId - bankAccountName - counterparts - exportEntryReference - indexInExport - indexInYear - name - originalCurrency - paymentDate - type type: object GetBankJournalExportsResponse: additionalProperties: false description: 'A list of bank journal exports summaries along with a timestamp cursor pagination. ' properties: cursor: allOf: - $ref: '#/components/schemas/CursorDto' description: 'The cursor current state as returned after a query. Both after and before values are ISO 8601 date/time in UTC in this format: 2024-10-28T14:30:00.123Z.' items: items: $ref: '#/components/schemas/BankJournalExportSummaryDto' type: array required: - cursor - items type: object ImportedEntryDto: additionalProperties: false description: Identifies a bank journal entry that was successfully imported in the client accounting system. properties: entryAgicapUniqueId: description: The agicapUniqueId of the exported bank journal entry format: uuid type: string required: - entryAgicapUniqueId type: object ExportResponse: additionalProperties: false description: Export response properties: bankJournalExportIndexInYear: description: The index of the bank journal export in the current year format: int32 type: integer entityName: description: Name of the entity type: string entries: description: List of all entries in the bank journal export items: $ref: '#/components/schemas/ExportedBankJournalEntryDto' type: array exportId: description: The identifier of the export as specified in the request format: uuid type: string year: description: Current year in UTC when the bank journal has been exported format: int32 type: integer required: - bankJournalExportIndexInYear - entityName - entries - exportId - year type: object ErrorDto: additionalProperties: false description: Describes a single error when failing to import a bank journal entry in the client accounting system. properties: errorMessage: description: Optional error message nullable: true type: string errorType: allOf: - $ref: '#/components/schemas/ErrorTypeDto' description: Mandatory error type required: - errorType type: object ProblemDetails: additionalProperties: false properties: detail: nullable: true type: string instance: nullable: true type: string status: format: int32 nullable: true type: integer title: nullable: true type: string type: nullable: true type: string type: object CursorDto: additionalProperties: false description: 'The cursor current state as returned after a query. Both after and before values are ISO 8601 date/time in UTC in this format: 2024-10-28T14:30:00.123Z.' properties: after: description: The export date in UTC of the newest returned bank journal export (only if the request specified the after parameter example: '2024-11-01T09:45:00.000Z' nullable: true type: string before: description: The export date in UTC of the oldest returned bank journal export (only if the request specified the before parameter example: '2024-10-28T14:30:59.999Z' nullable: true type: string size: description: The number of exported bank journals returned (might be different from the requested size) example: 100 format: int32 type: integer required: - size type: object NotImportedEntryDto: additionalProperties: false description: Describes all the errors that occured when failing to import a bank journal entry in the client accounting system. properties: entryAgicapUniqueId: format: uuid type: string errors: items: $ref: '#/components/schemas/ErrorDto' type: array required: - entryAgicapUniqueId - errors type: object BankJournalExportSummaryDto: additionalProperties: false description: A bank journal export description. properties: exportDateUtc: description: The export date-time in UTC format example: '2024-10-28T14:30:59.999Z' type: string exportId: description: Unique ID of the export. example: 31dee215-e458-4145-8fe8-c20a0ea06042 format: uuid type: string exportIndexInYear: description: The index of the bank journal export in the `ExportYear` (index starting at 1) example: 12 format: int32 type: integer exportYear: description: The year the export was done example: 2024 format: int32 type: integer indexInYearOfFirstEntryInBankJournal: description: 'The index in `ExportYear` of the first entry in the bank journal export (index starting at 1)' example: 105 format: int32 type: integer indexInYearOfLastEntryInBankJournal: description: 'The index in `ExportYear` of the last entry in the bank journal export (index starting at 1)' example: 120 format: int32 type: integer numberOfEntries: description: The number of entries in the bank journal export example: 16 format: int32 type: integer required: - exportDateUtc - exportId - exportIndexInYear - exportYear - indexInYearOfFirstEntryInBankJournal - indexInYearOfLastEntryInBankJournal - numberOfEntries type: object LinkedExportedEntryDto: additionalProperties: false description: Reference to a previously exported journal entry linked to this counterpart properties: agicapUniqueId: description: The unique identifier of the linked entry (same format as ExportedBankJournalEntryDto.AgicapUniqueId) format: uuid type: string exportEntryReference: description: The unique export reference of the linked entry (same format as ExportedBankJournalEntryDto.ExportEntryReference) type: string required: - agicapUniqueId - exportEntryReference type: object MarkAsImportedRequest: additionalProperties: false description: Request to indicate Agicap that some exported bank journal entries from Agicap were successfully imported in the client accounting system. properties: entriesImported: description: The list of bank journal entries imported in the client accounting system (max 1000 entries) items: $ref: '#/components/schemas/ImportedEntryDto' type: array required: - entriesImported type: object ErrorTypeDto: description: Describes the types of errors when failing to import a bank journal entry in the client accounting system. enum: - UNKNOWN_JOURNAL_CODE - UNKNOWN_ACCOUNTING_ACCOUNT - UNKNOWN_THIRD_PARTY - UNKNOWN_ANALYTICAL_CODE - OTHER type: string securitySchemes: bearer: bearerFormat: JWT scheme: bearer type: http bearerAuth: bearerFormat: OPAQUE scheme: bearer type: http