Appearance
Bank Account
Introduction
Bank accounts in StrawBlond represent different types of financial accounts used for business transactions and cash flow management. The system supports three distinct account types, each serving specific business needs and having different requirements for setup and management.
Account Types
Type | Description | Requirements |
---|---|---|
Bank | Traditional bank accounts with full banking features including IBAN validation and QR-bill support | Valid IBAN (non-QR-IBAN) |
Cash | Physical cash registers, petty cash funds, or other cash-based payment methods | Custom account name |
Credit Card | Credit card accounts for tracking card payments and expenses | Custom account name |
Bank accounts automatically link to the Swiss chart of accounts structure and can be associated with specific accounting accounts for proper double-entry bookkeeping. The system validates Swiss and Liechtenstein IBANs and provides special handling for QR-bill functionality through separate QR-IBAN fields.
Allowed query parameters
Filters
Filter | Type | Description |
---|---|---|
search | String | Full-text search |
currency | String | Filter by currency code |
type | String | Filter by type: cash , bank , creditcard |
Sorting
name
, owner_name
, bank_name
, created_at
Includes
account
, transactions
, transactionsCount
, unreconciledTransactions
, unreconciledTransactionsCount
Appends
balance
, account_balance
Create bank account from IBAN
post
/bank_account/create-from-iban
Creates a bank account by automatically populating bank details from the provided IBAN. This endpoint uses the Swiss Bank Master database to look up bank information based on the IBAN's clearing number and automatically fills in bank details like name, BIC, and institution identifier.
Attribute (* required) | Type | Description |
---|---|---|
iban * | String | Valid Swiss or Liechtenstein IBAN (cannot be QR-IBAN) |
IBAN Requirements
- Must be a valid Swiss (CH) or Liechtenstein (LI) IBAN
- Cannot be a QR-IBAN (5th digit must not be '3')
- IBAN format: 21 characters total (e.g., "CH93 0024 0240 1234 5601 C")
- Bank must exist in the Swiss Bank Master database
Example request
json
{
"iban": "CH93 0024 0240 1234 5601 C"
}
Example response
json
// HTTP 200 OK
{
"id": "AbCdEfGhIj",
"name": "UBS Switzerland AG - 0234-123456.01",
"type": "bank",
"iban": "CH93 0024 0240 1234 5601 C",
"iban_last_digits": "601C",
"bank_name": "UBS Switzerland AG",
"bank_iid": 240,
"bank_bic": "UBSWCHZH80A",
"bank_account_number": "0234-123456.01",
"currency": "CHF",
"balance": 0,
"account_balance": 0,
"owner_name": null,
"owner_address": null,
"owner_zip": null,
"owner_city": null,
"qr_bill_type": null,
"qr_bill_iban": null,
"qr_bill_cin": null,
"account_id": null,
"created_at": "2024-03-15T10:30:00.000000Z",
"updated_at": "2024-03-15T10:30:00.000000Z"
}
Create a bank account
post
/bank_account
Attribute (* required) | Type | Description |
---|---|---|
type * | String | Bank account type: cash , bank , creditcard |
name | String? | Account name (max 255 characters) |
iban | String? | IBAN (required for bank type, cannot be QR-IBAN) |
account_id | String? | Associated Account ID |
qr_bill_type | String? | QR bill type: NON , SCOR , QR |
qr_bill_iban | String? | QR-IBAN (required when qr_bill_type is QR ) |
owner_name | String? | Account owner name (max 255 characters) |
owner_address | String? | Owner address (max 255 characters) |
owner_zip | String? | Owner ZIP code (max 10 characters) |
owner_city | String? | Owner city (max 255 characters) |
bank_name | String? | Bank name (max 255 characters) |
bank_iid | Number? | Bank institution identifier (max 99999) |
bank_bic | String? | Bank BIC code (max 11 characters) |
bank_account_number | String? | Bank account number (max 255 characters) |
Example response
json
// HTTP 201 Created
{
// a bank account object
}
Update a bank account
put
/bank_account/{id}
Attribute | Type | Description |
---|---|---|
type | String | Bank account type: cash , bank , creditcard |
name | String | Account name (max 255 characters) |
iban | String? | IBAN (required for bank type, cannot be QR-IBAN) |
account_id | String? | Associated Account ID |
qr_bill_type | String? | QR bill type: NON , SCOR , QR |
qr_bill_iban | String? | QR-IBAN (required when qr_bill_type is QR ) |
owner_name | String? | Account owner name (max 255 characters) |
owner_address | String? | Owner address (max 255 characters) |
owner_zip | String? | Owner ZIP code (max 10 characters) |
owner_city | String? | Owner city (max 255 characters) |
bank_name | String? | Bank name (max 255 characters) |
bank_iid | Number? | Bank institution identifier (max 99999) |
bank_bic | String? | Bank BIC code (max 11 characters) |
bank_account_number | String? | Bank account number (max 255 characters) |
Example response
json
// HTTP 200 OK
{
// a bank account object
}
Retrieve a bank account
get
/bank_account/{id}
Example response
json
// HTTP 200 OK
{
"id": "AbCdEfGhIj",
"name": "Business Account",
"type": "bank",
"balance": 15432.50,
"account_id": "XyZ123AbC7",
"account": {
// Account object when included
},
"account_balance": 15432.50,
"owner_name": "StrawBlond GmbH",
"owner_address": "Rütistrasse 2",
"owner_zip": "8645",
"owner_city": "Rapperswil",
"bank_name": "UBS Switzerland AG",
"bank_iid": 240,
"bank_bic": "UBSWCHZH80A",
"bank_account_number": "0234-123456.01",
"iban": "CH93 0024 0240 1234 5601 C",
"iban_last_digits": "601C",
"currency": "CHF",
"qr_bill_type": "SCOR",
"qr_bill_iban": "CH21 3080 8001 2345 6782 7",
"qr_bill_cin": null,
"transactions": [
// Only present when included `transactions` relation
],
"unreconciled_transactions": [
// Only present when included `unreconciledTransactions` relation
],
"transactions_count": 47,
"unreconciled_transactions_count": 3
}
Delete a bank account
delete
/bank_account/{id}
Example response
json
// HTTP 204 No Content
List bank accounts
get
/bank_account
The list endpoint accepts the same parameters as in Retrieve a bank account and returns a paginated array of the same bank account object in the data
property.
Read more about Pagination, Filtering, Sorting and Includes on the Introduction page.