BankAccounts

Make a bank account the main one

Changed on

Exactly one account is the company's main account, so this moves the designation rather than adding it: whichever account held it loses it in the same operation. Setting the account that already holds it changes nothing and still succeeds.

Allowed on a connected account, unlike PUT and DELETE. Being the main account is Altoviz's own designation, not something the provider owns. <b>400</b> when the account's type cannot be the main one: only an account kept by hand and a Linxo-synchronized account qualify. A Stripe, GoCardless, PayPal or SumUp account is a payment balance rather than a bank account, and is refused. The main account is what the application offers first when a settlement needs a bank account. It is unrelated to defaultPaymentMethod, which is per-account.

post/v1/bankaccounts/setasmain/{id}

Request

Path parameters

idinteger required

Bank account ID

Response

OK

accountNumberstring nullable

Accounting account number

balancenumber double

Current balance, derived from the initial balance and every transaction since

bankNamestring nullable

Bank name

bicstring nullable

BIC

connectedboolean

Whether this account is synchronized from a provider, which is exactly whether Altoviz.Api.Models.BankAccount.Provider is set.

A connected account is read-only: PUT and DELETE on it are refused. Disconnect it in the Altoviz application first if you mean to take it over by hand.

currencystring nullable

ISO currency code. Defaults to EUR.

defaultPaymentMethod'Transfer' | 'Order' | 'Check' | 'Cash' | 'Card' | 'Bill' | 'Usec' | 'Other'
ibanstring nullable

IBAN

idinteger

Bank account ID

initialBalancenumber double

Balance the account held before the first transaction Altoviz knows about. The running balance is derived from it, so changing it moves every balance after it.

isMainboolean

Whether this is the company's main account

journalCodestring nullable

Accounting journal code

lastUpdatedAtstring date-time nullable

When the account was last synchronized with its provider

logoUristring nullable

Bank logo URL

metadataobject nullable

Metadata: free-form key/value pairs carried with the bank account, for an integration to keep its own identifiers and flags against it.

Sent as a PATCH, not a replacement: keys you send are added or updated, keys you leave out keep whatever they held, and a key is removed only when you send it as null. Omitting the property entirely leaves the whole bag untouched, and "" stores an empty value rather than removing the key.

namestring nullable

Name

pendingTransactionsinteger

Transactions not yet reconciled with a document

pendingTransactionsTotalnumber double

Total value of the transactions not yet reconciled

synchronizingboolean

Whether a synchronization is running

Changes