(bankAccounts)
Access bank accounts in an SMBs accounting platform.
- create - Create bank account
- getCreateModel - Get create/update bank account model
- list - List bank accounts
The Create bank account endpoint creates a new bank account for a given company's connection.
Bank accounts are financial accounts maintained by a bank or other financial institution.
Integration-specific behaviour
Required data may vary by integration. To see what data to post, first call Get create/update bank account model.
Check out our coverage explorer for integrations that support creating an account.
import { CodatBankFeeds } from "@codat/bank-feeds";
import { BankAccountType } from "@codat/bank-feeds/dist/sdk/models/shared";
async function run() {
const sdk = new CodatBankFeeds({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
const res = await sdk.bankAccounts.create({
bankAccountPrototype: {
currency: "USD",
},
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
});
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.CreateBankAccountRequest | ✔️ | The request object to use for the request. |
retries |
utils.RetryConfig | ➖ | Configuration to override the default retry behavior of the client. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.CreateBankAccountResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
The Get create/update bank account model endpoint returns the expected data for the request payload when creating and updating a bank account for a given company and integration.
Bank accounts are financial accounts maintained by a bank or other financial institution.
Integration-specific behaviour
See the response examples for integration-specific indicative models.
Check out our coverage explorer for integrations that support creating and updating a bank account.
import { CodatBankFeeds } from "@codat/bank-feeds";
async function run() {
const sdk = new CodatBankFeeds({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
const res = await sdk.bankAccounts.getCreateModel({
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
});
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetCreateBankAccountsModelRequest | ✔️ | The request object to use for the request. |
retries |
utils.RetryConfig | ➖ | Configuration to override the default retry behavior of the client. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetCreateBankAccountsModelResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
The List bank accounts endpoint returns a list of bank accounts for a given company's connection.
Bank accounts are financial accounts maintained by a bank or other financial institution.
Before using this endpoint, you must have retrieved data for the company.
import { CodatBankFeeds } from "@codat/bank-feeds";
async function run() {
const sdk = new CodatBankFeeds({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
const res = await sdk.bankAccounts.list({
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
orderBy: "-modifiedDate",
page: 1,
pageSize: 100,
});
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ListBankAccountsRequest | ✔️ | The request object to use for the request. |
retries |
utils.RetryConfig | ➖ | Configuration to override the default retry behavior of the client. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.ListBankAccountsResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |