Saltar al contingut principal
PUT

Actualitzar un compte bancari

Scope:accounting:banks.write
https://api.holded.com/api/v2/treasury/accounts/{id}

Actualitza un compte bancari existent.

Paràmetres

Paràmetres de ruta

idstringobligatori

Identificador del compte de tresoreria

Cos de la petició

object
namestringrequired

Nom per mostrar del compte bancari

currencystringrequired

Codi de moneda ISO 4217

accounting_account_idstringrequired

Identificador del compte comptable vinculat

auto_syncbooleanrequired

Si se sincronitzen automàticament les transaccions del banc

ibanstring | nulloptional

Número de compte bancari internacional (IBAN)

bicstring | nulloptional

Codi d'identificació bancària (SWIFT/BIC)

creditor_idstring | nulloptional

Identificador de creditor SEPA per a domiciliacions

issuer_idstring | nulloptional

Identificador de l'emissor per a ordres de pagament

default_accountbooleanoptional

Si aquest és el compte bancari predeterminat

Petició

python
import requests

url = "https://api.holded.com/api/v2/treasury/accounts/{id}"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "name": "string",
    "currency": "EUR",
    "accounting_account_id": "507f1f77bcf86cd799439011",
    "auto_sync": false,
    "iban": "string",
    "bic": "string",
    "creditor_id": "string",
    "issuer_id": "string",
    "default_account": false
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())

Respostes

Resposta

json
{
  "id": "507f1f77bcf86cd799439011",
  "name": "Main bank account",
  "type": "bank",
  "currency": "EUR",
  "balance": "15230.50",
  "iban": "ES9121000418450200051332",
  "bic": "CAIXESBBXXX",
  "account_number": "string",
  "creditor_id": "string",
  "issuer_id": "string",
  "archived": false,
  "synced_at": "2024-01-15T10:30:00Z",
  "transactions_pending_to_reconcile": 148
}

Respostes exitoses

200Compte bancari actualitzatapplication/json
object
idstring

Unique identifier of the banking account

namestring

Display name of the banking account

typestring

Type of banking account

Enum:bankcardgatewaycash
currencystring

ISO 4217 currency code of the account

balancestring

Decimal as string for precision

ibanstring | null

IBAN number of the bank account

bicstring | null

SWIFT/BIC code of the bank

account_numberstring | null

Bank account number when IBAN is not available

creditor_idstring | null

SEPA creditor identifier for direct debits

issuer_idstring | null

Issuer identifier used in remittances

archivedboolean

Whether the banking account is archived

synced_atstring<date-time> | null

Timestamp of the last bank synchronization

transactions_pending_to_reconcileinteger

Number of transactions pending reconciliation in the last 12 months for this account (precomputed, not a live count).

Respostes d'error

400Sol·licitud incorrectaapplication/json
401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Compte bancari no trobatapplication/json
422Error de validacióapplication/json
429Límit de sol·licituds exceditapplication/json