Date: 2026-02-22 Status: API exploration complete -- write endpoints confirmed, connection provisioning required
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.
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:
none, draft, due, paid, cancelled, deleted, paymentExecutednone, draft, due, paid, cancelled, deletedNOT available as separate write endpoints: categories, cost-centers, accounts, contacts, suppliers, expected-transactions, payment-orders (all return 404)
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"}
}]
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:
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:
metadata keys does Agicap recognize for cost centers and GL accounts? (can only test once a connection exists)POST https://api.agicap.com/public/auth/v1/tokenagicap:public-api| 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 |
| 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 |
| 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 |
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.
Celigo's native Agicap connector confirmed "Import" (write) support, revealing that write endpoints exist on the same api.agicap.com infrastructure.
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:
entityId must be numeric (not UUID or OAuth Client ID)connectionId must be GUID format[{...}]externalId, currency, amounts.totalAmount, statusnone, draft, due, paid, cancelled, deleted (client) + paymentExecuted (supplier)CreateSupplierInvoiceDto, CreateClientInvoiceDto, etc.Confirmed NOT available (all return 404): categories, cost-centers, accounts, contacts, suppliers, expected-transactions, payment-orders, settings, integrations, sources
Confirmed read endpoints:
GET /public/treasury-bank-journal/v1/entities/{entityId}/exports?size=N&after=DATE -- works, returns {items:[], cursor:{...}}GET /public/business-documents/v1/entities/{entityId}/connections -- works, returns []POST /public/treasury-bank-journal/.../exports -- returns 405 (GET only)Connection creation blocker:
POST /entities/{entityId}/connections expects {"dto": <CreateConnectionDto>} but returns HTTP 500 for all field combinationsSFTP 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 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'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.
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:
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:
api.integrator.io) for programmatic control| 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.
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.
| 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 |
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.
MWKY9K5mrD) were used in this exploration and should be rotated| 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).
agicap:public-apiPOST https://api.agicap.com/public/auth/v1/token| 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) |
| 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" |
| 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 |