Accounting · Banks & Accounts
Bank Connections
One configured integration with one bank — endpoint, credentials, file transfer, the identifiers the bank assigned, and how often to collect. Credentials are encrypted on the way in and never come back out.
/api/accounting/bank-connectionsPublished as /api/v1/bank-connectionsDownload specification (OpenAPI 3.1) Screen: Bank Connections
Overview
| Package | Accounting |
|---|---|
| Authentication | Bearer token: a service account's token (POST /api/auth/service-token) or, for the published path, an API key |
| Authorization | The caller's roles must hold Accounting › Bank Connections on the Roles screen: display for GET, add for POST, change for PUT, delete for DELETE; an action needs the grant of the button that runs it on the screen. |
| Table | acct.bank_connections · kept per company (and organisational unit where it has one) |
| Record | Created, changed and (where the screen allows) deleted; key id |
| Rules | The same as the screen: validation, numbering, approvals, posting, the company the caller belongs to, and the audit trail. |
API reference
16 operations. Open one for its parameters, bodies, responses and a sample request.
GET/api/accounting/bank-connectionsList bank connections
Query parameters
| Name | Description | Example |
|---|---|---|
limit | Rows per page (50 by default, at most 200) | limit=100 |
offset | Rows to skip | offset=200 |
q | Free-text search over the search columns | q=acme |
sort | column:asc or column:desc, several separated by commas | sort=created_at:desc |
filter | A JSON condition or group (see the filter language), URL-encoded; any field below can be filtered and sorted | filter={"col":"status","op":"eq","value":"open"} |
<field>=<value> | Shorthand for "field is value" |
Response 200
{
"rows": [
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"provider_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"environment": "sandbox",
"integration_type": "text",
"auth_method": "text",
"base_url": "https://example.com",
"token_url": "https://example.com",
"client_id": "text",
"client_secret_cipher": "text",
"api_key_cipher": "text",
"scopes": [],
"certificate_cipher": "text"
}
],
"count": 1
}Sample request
curl "https://demo.tranxact.ai/api/accounting/bank-connections?limit=20" \
-H "Authorization: Bearer $TOKEN"GET/api/accounting/bank-connections/{id}Read one bank connections
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response 200
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"provider_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"environment": "sandbox",
"integration_type": "text",
"auth_method": "text",
"base_url": "https://example.com",
"token_url": "https://example.com",
"client_id": "text",
"client_secret_cipher": "text",
"api_key_cipher": "text",
"scopes": [],
"certificate_cipher": "text"
}404 when no record with that id is visible to the caller.
Sample request
curl "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/accounting/bank-connectionsCreate a bank connections
Request body
The record as JSON. Fields marked Yes are required.
| Field | Type | Required | Description |
|---|---|---|---|
provider_id | uuid | Yes | Bank |
code | text | Yes | Connection code — e.g. BANK-CHASE-01 |
name | text | Yes | Name |
environment | text | No | Environment — Production is real money. Nothing else about the configuration changes. Allowed: sandbox uat production |
integration_type | text | No | Channel — The test refuses a channel the bank does not offer. |
auth_method | text | No | Authentication |
base_url | text | No | API endpoint — HTTPS only. |
token_url | text | No | OAuth token endpoint |
client_id | text | No | Client ID |
scopes | _text | No | Scopes — e.g. balances:read, transactions:read, payments:write |
certificate_expires | date | No | Certificate expires — The test warns thirty days out and fails once it has passed. |
sftp_host | text | No | SFTP host |
sftp_port | integer | No | SFTP port |
sftp_username | text | No | SFTP username |
inbound_dir | text | No | Inbound directory — Where the bank leaves statements. |
outbound_dir | text | No | Outbound directory — Where payment files are collected from. |
pgp_key_id | text | No | PGP key id |
company_id | text | No | Bank-assigned company id |
ach_company_id | text | No | ACH company id — The immediate origin on a NACHA file. Without it no ACH file can be built. |
ach_company_name | text | No | ACH company name |
originator_id | text | No | Originator id |
division_code | text | No | Division code |
webhook_url | text | No | Webhook URL — Where the bank posts real-time notifications. Store a signing secret alongside it. |
notification_email | text | No | Notification email |
poll_interval_minutes | integer | No | Collect every (minutes) |
statement_format | text | No | Statement format |
payment_format | text | No | Payment file format |
auto_reconcile | boolean | No | Match the feed automatically |
auto_post | boolean | No | Auto post |
match_tolerance | numeric | No | Amount tolerance — How far two amounts may differ and still be the same payment. |
match_window_days | integer | No | Date window (days) |
platform_connection_id | uuid | No | Platform connection — Links this to the cross-application integration record. |
status | text | No | Status |
owner_id | uuid | No | Owner |
notes | text | No | Notes |
Sample body
{
"provider_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"environment": "sandbox",
"integration_type": "text",
"auth_method": "text",
"base_url": "https://example.com"
}Response 201
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"provider_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"environment": "sandbox",
"integration_type": "text",
"auth_method": "text",
"base_url": "https://example.com",
"token_url": "https://example.com",
"client_id": "text",
"client_secret_cipher": "text",
"api_key_cipher": "text",
"scopes": [],
"certificate_cipher": "text"
}Sample request
curl -X POST "https://demo.tranxact.ai/api/accounting/bank-connections" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"provider_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","code":"COD-000001","name":"Example","environment":"sandbox","integration_type":"text","auth_method":"text","base_url":"https://example.com"}'PUT/api/accounting/bank-connections/{id}Change a bank connections
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
Only the fields to change; fields left out keep their value.
| Field | Type | Required | Description |
|---|---|---|---|
provider_id | uuid | Yes | Bank |
code | text | Yes | Connection code — e.g. BANK-CHASE-01 |
name | text | Yes | Name |
environment | text | No | Environment — Production is real money. Nothing else about the configuration changes. Allowed: sandbox uat production |
integration_type | text | No | Channel — The test refuses a channel the bank does not offer. |
auth_method | text | No | Authentication |
base_url | text | No | API endpoint — HTTPS only. |
token_url | text | No | OAuth token endpoint |
client_id | text | No | Client ID |
scopes | _text | No | Scopes — e.g. balances:read, transactions:read, payments:write |
certificate_expires | date | No | Certificate expires — The test warns thirty days out and fails once it has passed. |
sftp_host | text | No | SFTP host |
sftp_port | integer | No | SFTP port |
sftp_username | text | No | SFTP username |
inbound_dir | text | No | Inbound directory — Where the bank leaves statements. |
outbound_dir | text | No | Outbound directory — Where payment files are collected from. |
pgp_key_id | text | No | PGP key id |
company_id | text | No | Bank-assigned company id |
ach_company_id | text | No | ACH company id — The immediate origin on a NACHA file. Without it no ACH file can be built. |
ach_company_name | text | No | ACH company name |
originator_id | text | No | Originator id |
division_code | text | No | Division code |
webhook_url | text | No | Webhook URL — Where the bank posts real-time notifications. Store a signing secret alongside it. |
notification_email | text | No | Notification email |
poll_interval_minutes | integer | No | Collect every (minutes) |
statement_format | text | No | Statement format |
payment_format | text | No | Payment file format |
auto_reconcile | boolean | No | Match the feed automatically |
auto_post | boolean | No | Auto post |
match_tolerance | numeric | No | Amount tolerance — How far two amounts may differ and still be the same payment. |
match_window_days | integer | No | Date window (days) |
platform_connection_id | uuid | No | Platform connection — Links this to the cross-application integration record. |
status | text | No | Status |
owner_id | uuid | No | Owner |
notes | text | No | Notes |
Sample body
{
"provider_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001"
}Response 200
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"provider_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"environment": "sandbox",
"integration_type": "text",
"auth_method": "text",
"base_url": "https://example.com",
"token_url": "https://example.com",
"client_id": "text",
"client_secret_cipher": "text",
"api_key_cipher": "text",
"scopes": [],
"certificate_cipher": "text"
}Sample request
curl -X PUT "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"provider_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","code":"COD-000001"}'DELETE/api/accounting/bank-connections/{id}Delete a bank connections
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response 200
{ "deleted": true }Many documents are cancelled or reversed instead; the API refuses a delete the screen would refuse.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/accounting/bank-connections/{id}/copyCopy
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
overrides, preview, withLinesResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/copy" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"overrides":"value","preview":"value","withLines":"value"}'PUT/api/accounting/bank-connections/{id}/credentialsCredentials
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PUT "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/credentials" \
-H "Authorization: Bearer $TOKEN"POST/api/accounting/bank-connections/{id}/testTest
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/test" \
-H "Authorization: Bearer $TOKEN"POST/api/accounting/bank-connections/{id}/transactionsTransactions
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
accountId, externalAccountId, transactions*Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/transactions" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"accountId":"value","externalAccountId":"value","transactions":"value"}'POST/api/accounting/bank-connections/{id}/webhookWebhook
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
signature, payloadResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/webhook" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"signature":"value","payload":"value"}'POST/api/accounting/bank-connections/{id}/syncSync
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/sync" \
-H "Authorization: Bearer $TOKEN"PUT/api/accounting/bank-connections/{id}/direct-connectDirect connect
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
userId, credential, ofxUrl, ofxOrg, ofxFid, ofxVersionResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PUT "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/direct-connect" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"userId":"value","credential":"value","ofxUrl":"value","ofxOrg":"value","ofxFid":"value","ofxVersion":"value"}'POST/api/accounting/bank-connections/{id}/pullPull
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
from, overlapDaysResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/pull" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"from":"value","overlapDays":"value"}'GET/api/accounting/bank-connections/{id}/direct-accountsDirect accounts
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/direct-accounts" \
-H "Authorization: Bearer $TOKEN"POST/api/accounting/bank-connections/{id}/direct-accountsDirect accounts
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
accountsResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/direct-accounts" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"accounts":"value"}'POST/api/accounting/bank-connections/{id}/oauth/refreshOauth refresh
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/accounting/bank-connections/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/oauth/refresh" \
-H "Authorization: Bearer $TOKEN"Data model
Every field of a bank connections, as the API returns it. Field names are the JSON keys; any of them can be filtered and sorted on a list.
| Field | Type | Access | Description |
|---|---|---|---|
id | uuid | read only | Id |
org_id | uuid | read only | Org id |
provider_id | uuid | read, write | Bank |
code | text | read, write | Connection code — e.g. BANK-CHASE-01 |
name | text | read, write | Name |
environment | text | read, write | Environment — Production is real money. Nothing else about the configuration changes. Allowed: sandbox uat production |
integration_type | text | read, write | Channel — The test refuses a channel the bank does not offer. |
auth_method | text | read, write | Authentication |
base_url | text | read, write | API endpoint — HTTPS only. |
token_url | text | read, write | OAuth token endpoint |
client_id | text | read, write | Client ID |
client_secret_cipher | bytea | read only | Client secret cipher |
api_key_cipher | bytea | read only | Api key cipher |
scopes | _text | read, write | Scopes — e.g. balances:read, transactions:read, payments:write |
certificate_cipher | bytea | read only | Certificate cipher |
certificate_expires | date | read, write | Certificate expires — The test warns thirty days out and fails once it has passed. |
sftp_host | text | read, write | SFTP host |
sftp_port | integer | read, write | SFTP port |
sftp_username | text | read, write | SFTP username |
sftp_key_cipher | bytea | read only | Sftp key cipher |
inbound_dir | text | read, write | Inbound directory — Where the bank leaves statements. |
outbound_dir | text | read, write | Outbound directory — Where payment files are collected from. |
pgp_key_id | text | read, write | PGP key id |
company_id | text | read, write | Bank-assigned company id |
ach_company_id | text | read, write | ACH company id — The immediate origin on a NACHA file. Without it no ACH file can be built. |
ach_company_name | text | read, write | ACH company name |
originator_id | text | read, write | Originator id |
division_code | text | read, write | Division code |
webhook_url | text | read, write | Webhook URL — Where the bank posts real-time notifications. Store a signing secret alongside it. |
webhook_secret_cipher | bytea | read only | Webhook secret cipher |
notification_email | text | read, write | Notification email |
poll_interval_minutes | integer | read, write | Collect every (minutes) |
statement_format | text | read, write | Statement format |
payment_format | text | read, write | Payment file format |
auto_reconcile | boolean | read, write | Match the feed automatically |
auto_post | boolean | read, write | Auto post |
match_tolerance | numeric | read, write | Amount tolerance — How far two amounts may differ and still be the same payment. |
match_window_days | integer | read, write | Date window (days) |
platform_connection_id | uuid | read, write | Platform connection — Links this to the cross-application integration record. |
status | text | read, write | Status |
last_tested_at | timestamp with time zone | read only | Last tested at |
last_test_ok | boolean | read only | Last test ok |
last_test_message | text | read only | Last test message |
last_sync_at | timestamp with time zone | read only | Last sync at |
owner_id | uuid | read, write | Owner |
notes | text | read, write | Notes |
created_at | timestamp with time zone | read only | Created at |
org_unit_id | uuid | read only | Org unit id |
link_session_id | uuid | read only | Link session id |
aggregator_id | uuid | read only | Aggregator id |
external_item_id | text | read only | External item id |
ofx_url | text | read only | Ofx url |
ofx_org | text | read only | Ofx org |
ofx_fid | text | read only | Ofx fid |
ofx_version | integer | read only | Ofx version |
ofx_app_id | text | read only | Ofx app id |
ofx_app_ver | text | read only | Ofx app ver |
ofx_user_id | text | read only | Ofx user id |
ofx_password_cipher | bytea | read only | Ofx password cipher |
ofx_client_uid | text | read only | Ofx client uid |
credential_stored_at | timestamp with time zone | read only | Credential stored at |
credential_last_ok_at | timestamp with time zone | read only | Credential last ok at |
credential_expires_at | timestamp with time zone | read only | Credential expires at |
credential_status | text | read only | Credential status |
credential_message | text | read only | Credential message |
pulled_through | date | read only | Pulled through |
oauth_client_id | uuid | read only | Oauth client id |
oauth_access_cipher | bytea | read only | Oauth access cipher |
oauth_refresh_cipher | bytea | read only | Oauth refresh cipher |
oauth_expires_at | timestamp with time zone | read only | Oauth expires at |
consent_expires_at | timestamp with time zone | read only | Consent expires at |
data_api_base | text | read only | Data api base |
data_api_standard | text | read only | Data api standard |
xf_text_1 | text | read only | Xf text 1 |
xf_text_2 | text | read only | Xf text 2 |
xf_text_3 | text | read only | Xf text 3 |
xf_text_4 | text | read only | Xf text 4 |
xf_text_5 | text | read only | Xf text 5 |
xf_num_1 | numeric | read only | Xf num 1 |
xf_num_2 | numeric | read only | Xf num 2 |
xf_num_3 | numeric | read only | Xf num 3 |
xf_date_1 | date | read only | Xf date 1 |
xf_date_2 | date | read only | Xf date 2 |
created_by | uuid | read only | Created by |
updated_at | timestamp with time zone | read only | Updated at |
updated_by | uuid | read only | Updated by |
Errors
| Status | Meaning |
|---|---|
| 400 | The request could not be read: a filter that is not JSON, a bad parameter |
| 401 | No credential, or it is wrong, revoked or expired |
| 403 | The caller's roles do not hold Accounting › Bank Connections for this verb, or the address or origin is not allowed |
| 404 | No record with that id is visible to the caller |
| 409 | A conflict: a duplicate number, a document in a state that does not allow it, or a record changed or locked by someone else |
| 422 | Refused by the same validation as the screen; the error names the field and why |
Every error is JSON: {"error": "a sentence saying what was wrong"}, with field where it applies.