Codat
Capability: Financial Data
Market: UK
Business Capabilities
Access customers' financial data from their accounting, banking, and commerce platforms. Codat provides standardized financial statements, balance sheets, profit and loss reports, cash flow statements, and account categorization to support lending decisions and financial assessments.
Exposed Endpoints
- Create client:
POST /api/codat/v1/createclient- Creates a new client (company) in Codat and returns a link URL for the user to connect their accounting platform. - Check data status:
GET /api/codat/v1/checkdatastatus/{companyId}- Checks the synchronization status of a company's financial data. - Get balance sheet:
GET /api/codat/v1/getbalancesheet/{companyId}- Retrieves the balance sheet for a connected company. - Get cash flow statement:
GET /api/codat/v1/getcashflowstatement/{companyId}- Retrieves the cash flow statement for a connected company. - Get company connections:
GET /api/codat/v1/getCompanyConnections/{companyId}- Lists all active data connections for a company. - Get account categorization:
GET /api/codat/v1/getAccountCategorization/{companyId}/{connectionId}- Retrieves categorized account data for enhanced financial analysis. - Get financial metrics key:
GET /api/codat/v1/getFinancialMetricsKey/{companyId}- Retrieves key financial metrics and ratios. - Get enhanced profit and loss:
GET /api/codat/v1/getEnhancedProfitAndLoss/{companyId}- Retrieves an enhanced profit and loss statement with categorized line items. - Get profit and loss:
GET /api/codat/v1/profitandloss/{companyId}- Retrieves the standard profit and loss statement.
Vault Configuration
codat.baseUrl- Base URL of the Codat API.codat.apiKey- API key for authentication with Codat.
Request Structures and Samples
POST /api/codat/v1/createclient
Creates a new company in Codat and returns a redirect link for the end user to connect their accounting software.
Request structure:
{
"companyName": "string",
"platformType": "string",
"redirectUrl": "string"
}
Sample request:
{
"companyName": "Acme Ltd",
"platformType": "xero",
"redirectUrl": "https://your-app.com/codat/callback"
}
Sample response:
{
"companyId": "c1d2e3f4-a5b6-7890-cdef-1234567890ab",
"companyName": "Acme Ltd",
"linkUrl": "https://link.codat.io/company/c1d2e3f4-a5b6-7890-cdef-1234567890ab",
"status": "pending",
"createdDate": "2025-01-15T10:30:00Z"
}
GET /api/codat/v1/checkdatastatus/{companyId}
Sample response:
{
"companyId": "c1d2e3f4-a5b6-7890-cdef-1234567890ab",
"dataSources": [
{
"dataType": "balanceSheet",
"status": "complete",
"lastSyncedDate": "2025-01-15T12:00:00Z"
},
{
"dataType": "profitAndLoss",
"status": "complete",
"lastSyncedDate": "2025-01-15T12:00:00Z"
},
{
"dataType": "cashFlowStatement",
"status": "fetching",
"lastSyncedDate": null
}
]
}
GET /api/codat/v1/getbalancesheet/{companyId}
Sample response (abbreviated):
{
"reportDate": "2024-12-31",
"assets": {
"currentAssets": 125000.00,
"fixedAssets": 340000.00,
"totalAssets": 465000.00
},
"liabilities": {
"currentLiabilities": 85000.00,
"longTermLiabilities": 150000.00,
"totalLiabilities": 235000.00
},
"equity": {
"totalEquity": 230000.00
},
"currency": "GBP"
}
Error Codes
| Code | Description |
|---|---|
| 200 | Success. |
| 400 | Bad Request - Invalid parameters. |
| 401 | Unauthorized - Invalid API key. |
| 404 | Not Found - Company ID does not exist. |
| 422 | Unprocessable - Data not yet available (sync in progress). |
| 500 | Internal Server Error. |