Agicap Integration Feasibility Analysis

Date: 2026-02-22 Status: API exploration complete -- write endpoints confirmed, connection provisioning required

Summary

Agicap's Business Documents API supports write operations for invoices, purchase orders, and credit notes. These endpoints are not publicly documented but were discovered via Celigo's native connector and confirmed by direct API testing.

Confirmed Write Endpoints (both v1 and v2 tested)

Base URL: https://api.agicap.com/public/business-documents/{v1|v2}/entities/{entityId}/connections/{connectionId}/

Resource POST (Create) PUT (Update) V2 Required Fields
supplier-invoices YES (tested) YES (via Celigo) externalId, invoiceNumber, issueDate, dueDate, counterParty.id, currency, amounts.{totalAmount,taxesAmount,dueAmount}, status
client-invoices YES (tested) YES (via Celigo) externalId, invoiceNumber, issueDate, dueDate, counterParty.id, currency, amounts.{totalAmount,taxesAmount,dueAmount}, status
purchase-orders YES (tested) YES (via Celigo) externalId, purchaseOrderNumber, issueDate, dueDate, counterParty.id, currency, amounts.{...}, status
client-credit-notes YES (tested) YES (via Celigo) externalId, creditNoteNumber, issueDate, counterParty.id, currency, amounts.{...}, status (no dueDate required)
supplier-credit-notes YES (tested) YES (via Celigo) externalId, creditNoteNumber, issueDate, counterParty.id, currency, amounts.{...}, status (no dueDate required)

Valid status values:

NOT available as separate write endpoints: categories, cost-centers, accounts, contacts, suppliers, expected-transactions, payment-orders (all return 404)

V2 DTO Schema (reverse-engineered via validation errors)

V2 is recommended -- richer schema with more fields. Both v1 and v2 coexist.

V1 required fields: externalId, currency, amounts.totalAmount, status V2 adds: invoiceNumber/purchaseOrderNumber/creditNoteNumber, issueDate, dueDate (invoices only), counterParty.id, amounts.taxesAmount, amounts.dueAmount

Optional fields (confirmed parsed by DTO via type-error testing):

Field Type Notes
counterParty.name string Supplier/customer display name
paymentDate Nullable<DateTimeOffset> Date payment was made
metadata IDictionary<string, string> Key-value pairs for custom data (both v1 and v2)

The metadata field is the most likely mechanism for pushing cost centers and GL accounts as key-value pairs (e.g., {"costCenter": "CC-001", "glAccount": "4200"}). The exact key names recognized by Agicap need to be confirmed with a live connection.

Fields confirmed NOT on the DTO (silently ignored): description, costCenter (as top-level), category, account, tags, lineItems, notes, paymentTerms, reference, lines, items, allocations, payments, attachments, supplier, contact, bankAccount, paymentMethod

Request format: Array of DTOs, e.g.:

[{
  "externalId": "orcha-001",
  "invoiceNumber": "INV-2024-001",
  "currency": "EUR",
  "amounts": {"totalAmount": 119.00, "taxesAmount": 19.00, "dueAmount": 119.00},
  "status": "draft",
  "issueDate": "2024-01-15",
  "dueDate": "2024-02-15",
  "counterParty": {"id": "supplier-001", "name": "Test Supplier GmbH"},
  "paymentDate": null,
  "metadata": {"costCenter": "CC-001", "glAccount": "4200"}
}]

Connection Requirement (Blocker)

Write endpoints require a valid connectionId (GUID format) in the URL path. This represents a configured integration source in Agicap.

Current state: Entity 211584 has zero connections (GET /connections returns []). All invoice POST attempts return HTTP 500 because the backend crashes on non-existent connection IDs.

Connection creation endpoint (POST /entities/{entityId}/connections) exists and expects a CreateConnectionDto wrapped in {"dto": {...}}, but always returns HTTP 500 regardless of field combinations tested. This endpoint appears to require internal Agicap provisioning or partner-level access.

Implication: To push invoices, a connection must first exist for the entity. It can likely be created through:

  1. Agicap UI: Forecast page > cogwheel > "Banks and integrations" > "Connect a bank" > set up any integration. Pre-built connectors (NetSuite, Xero, Spendesk, etc.) auto-create a connection during setup.
  2. Partner connector like Celigo creating the connection during its setup flow
  3. Agicap onboarding/support setting up a custom integration source
  4. Agicap's internal admin UI

To try yourself: In your Agicap test account, go to the Forecast page, click the cogwheel icon, navigate to "Banks and integrations", and try adding any integration. Once added, check GET /connections again to see if a connection ID appears.

Open questions:

Auth

Questions Investigated

Question Answer Confidence
Can we write invoices after extraction? YES -- Business Documents API supports POST for supplier-invoices, client-invoices, purchase-orders, supplier-credit-notes, client-credit-notes. Requires a provisioned connection (see blocker above). 95%+
Can we push cost centers? Likely via metadata field -- no /cost-centers endpoint (404), but invoice DTOs have a metadata: IDictionary<string,string> field that likely supports {"costCenter": "..."}. Needs live connection to confirm. 80%
Can we push booking accounts? Likely via metadata field -- no /accounts endpoint (404), but same metadata dictionary likely supports {"glAccount": "..."}. Needs live connection to confirm. 80%
Can we trigger approval workflows? No, not possible via any channel 95%+
Can we get bank/channel entries? YES -- Treasury Bank Journal API confirmed working (HTTP 200, cursor-based pagination with after/before + size params) Confirmed
Can we get transactions? YES -- via Treasury Bank Journal exports Confirmed
Can we get card expenses? Endpoint exists -- Card Expenses Bank Journal API responds but test account has no data High

Agicap API Landscape

Three API Layers

Layer Base URL Status Auth Write?
New Public API api.agicap.com/public/... Active OAuth 2.0 Client Credentials Export-only (publicly)
Legacy OpenAPI openapi.agicap.com/api/... Deprecated API Token (Bearer) Possibly had write endpoints
Internal App API app.agicap.com/api/... Undocumented Username/Password + EntrepriseId Unknown

Public API Products (6 confirmed)

API Product Purpose Direction Confirmed
Auth (v1) Token generation - YES
Treasury Bank Journal (v1) Export bank journal entries (cursor-based, after/before + size) Read/Export YES (tested)
Business Documents (v1) Create/update invoices, POs, credit notes (simple schema) Read + Write YES (tested)
Business Documents (v2) Same as v1 with richer schema (invoiceNumber, counterParty, issueDate, dueDate, taxesAmount, dueAmount) Read + Write YES (tested)
Banking Documents (v1) Banking document handling Read (possibly upload?) Untested
Card Expenses Bank Journal (v1) Card expense journal entries Read Endpoint responds

Agicap UI Navigation


Write API Verification

Phase 1: Web Research (no write endpoints found publicly)

After 40+ targeted searches across Postman collections, GitHub, Celigo docs, and community notebooks: all publicly documented POST endpoints are functionally read/export triggers. All community code samples (7 Jupyter notebooks) are read-only.

Phase 2: Celigo Discovery (write capability confirmed)

Celigo's native Agicap connector confirmed "Import" (write) support, revealing that write endpoints exist on the same api.agicap.com infrastructure.

Phase 3: Direct API Testing (endpoints confirmed, connection blocker found)

Confirmed write endpoints via HTTP 400 validation errors (proving the endpoints exist and parse requests):

POST /public/business-documents/v1/entities/{entityId}/connections/{connectionId}/supplier-invoices
POST /public/business-documents/v1/entities/{entityId}/connections/{connectionId}/client-invoices
POST /public/business-documents/v1/entities/{entityId}/connections/{connectionId}/purchase-orders
POST /public/business-documents/v1/entities/{entityId}/connections/{connectionId}/client-credit-notes
POST /public/business-documents/v1/entities/{entityId}/connections/{connectionId}/supplier-credit-notes

Confirmed via validation error responses:

Confirmed NOT available (all return 404): categories, cost-centers, accounts, contacts, suppliers, expected-transactions, payment-orders, settings, integrations, sources

Confirmed read endpoints:

Connection creation blocker:


SFTP Investigation

SFTP is a custom-quoted professional services engagement, not self-service.

From Agicap's Terms & Conditions (Section 3.2.2):

"Any specific request which requires a significant amount of time may be the subject of a separate quotation (such as, for example, implementation of an SFTP server, importing a high volume of historical data...)"


Chift Investigation

Chift CANNOT bridge Orcha to Agicap.

Agicap is a customer of Chift, not a connector within Chift's ecosystem. There is no "Agicap connector" in Chift's 129-connector catalog. Chift bridges SaaS apps to accounting tools (Sage, Xero, etc.), not between SaaS apps.

[Accounting Tools] <--Chift--> [Agicap]
 (Sage, Pennylane,               (uses Chift to
  Cegid, Horus, etc.)             pull/push data)

Even as a Chift customer, Orcha would access accounting tools, NOT Agicap itself.


Celigo Deep Dive

Key Revelation

Celigo's native Agicap connector (November 2024) supports:

Flow Type Direction Meaning
Export Read FROM Agicap Celigo pulls data out
Import Write INTO Agicap Celigo pushes data in (POST/PUT/PATCH)
Lookup Read FROM Agicap Supplementary reads

The "Import" support confirms Agicap's API HAS write endpoints that aren't publicly documented. The Celigo connector uses the same OAuth 2.0 Client Credentials auth as the public API.

What can be written?

The definitive list is at https://docs.celigo.com/hc/en-us/articles/30494721329051-Available-Agicap-APIs (behind Cloudflare, couldn't be scraped). Likely writable objects based on Agicap's data model:

Celigo as Middleware

Orcha (Clojure/JVM)
  -> HTTP call to Celigo API (Bearer token auth)
    -> Celigo transforms/validates
      -> Celigo calls Agicap API (native connector)
        -> Response flows back (synchronous for imports/exports)

Capabilities:

Celigo Pricing

Plan Endpoints Flows Est. Annual Cost
Free 2 1 $0 (30-day full trial)
Standard 3 16 ~$6,000-7,200/yr
Professional 5 100 ~$12,000/yr
Premium 10 Unlimited ~$14,400-24,000/yr
Enterprise Unlimited Unlimited ~$24,000-73,000+/yr

Flat-rate, no per-transaction fees. 33-47% discounts common in negotiation.

Celigo Assessment for Orcha

Pros: Native Agicap connector with confirmed write support, full API for programmatic control, built-in error handling/retry/monitoring, EU (Germany) deployment, HTTP mode escape hatch for any Agicap endpoint.

Cons: ~$6k+/year minimum for a single integration, adds third-party dependency, cloud-only (not self-hostable), not code-first, vendor lock-in, debugging across three systems.


How Data Gets INTO Agicap Today

Channel Data Types Self-Service?
Direct bank connections (PSD2/Open Banking) Bank transactions, statements Yes (UI setup)
EBICS / SWIFT / H2H Bank data (DACH / global) Custom implementation
Chift (from accounting tools) Open invoices, supplier data Agicap-managed
GetMyInvoices Invoices Yes (their platform)
Excel plugin Budget data, forecasts, KPIs Yes (UI)
SFTP Various (custom format) Custom-quoted
OCR / Email forwarding Invoice PDFs Yes (UI)
ERP connectors (NetSuite, SAP, etc.) Invoices, POs, contacts Pre-built

Critical Next Step: Get a Connection Provisioned

The write API endpoints are confirmed working, but they require a connectionId that must be provisioned by Agicap. Without this, no data can be pushed.

Immediate Actions

  1. Contact Agicap via partner program (https://agicap.com/en/partners/become-partner/) -- request:
  2. Alternative: Use Celigo -- Celigo's native connector likely auto-provisions the connection during its setup flow. The free tier (2 endpoints, 1 flow) could be used to:

Medium-Term

  1. Decide on architecture: Direct API integration vs. Celigo middleware
  2. Test optional fields: Once a connection exists, send invoices with cost center, GL account, supplier, and other optional fields to see which are persisted
  3. Rotate API credentials: The current test credentials (Client ID MWKY9K5mrD) were used in this exploration and should be rotated

Architecture Decision

Approach Cost Complexity Control Best When
Direct Agicap API $0 Low Full Agicap provisions connection + provides docs
Celigo middleware ~$6k/yr Medium Partial Connection only available via Celigo
SFTP Custom quote Medium-High Medium Agicap provides file format specs

Recommended: Direct API integration. The endpoints work, the auth is standard OAuth 2.0, the DTO format is straightforward. The only missing piece is connection provisioning. Build a native Clojure integration module following Orcha's existing DATEV/Maesn pattern (config.edn, integrations namespace, Malli schemas, KMS encryption, audit trail).

If Agicap won't provision connections directly, use Celigo's free tier to create the connection, then call the Agicap API directly from Orcha (bypassing Celigo for ongoing operations).


Direct API Testing Log

Test Account

Successful Calls

Endpoint Method Status Response
/public/auth/v1/token POST 200 {access_token, expires_in: 3600, token_type: "Bearer"}
/public/treasury-bank-journal/v1/entities/211584/exports?size=5&after=2020-01-01T00:00:00Z GET 200 {items:[], cursor:{before:null, after:null, size:0}}
/public/business-documents/v1/entities/211584/connections GET 200 [] (no connections exist)

Validation Error Responses (confirming endpoint existence)

Endpoint Method Status Key Error
.../connections/{uuid}/supplier-invoices POST [{}] 400 Missing externalId, currency, amounts.totalAmount, status
.../connections/{uuid}/supplier-invoices POST [{..., "status":"open"}] 400 Invalid status. Valid: none, draft, due, paid, cancelled, deleted, paymentExecuted
.../connections/{base64}/supplier-invoices POST 400 "The value '...' is not valid" for connectionId (must be GUID)
.../connections POST [] 400 "dto field is required", expects CreateConnectionDto not array
.../exports GET (no params) 400 "Must specify after or before parameter" + "size field is required"

Error Responses

Endpoint Method Status Meaning
.../connections/{valid-guid}/supplier-invoices POST 500 Connection ID doesn't exist -> backend NullReferenceException
.../connections POST {"dto":{...}} 500 Connection creation crashes for all field combinations
.../entities/211584 GET 404 No entity detail endpoint
.../entities GET 404 No entity listing endpoint
.../entities/211584/categories GET 404 No categories endpoint
.../entities/211584/cost-centers GET 404 No cost-centers endpoint
.../exports POST 405 Treasury bank journal is GET-only

Sources

Agicap Official

Celigo

Chift

Community