Saltar al contingut principal
GET

Llistat del pla de comptes

Scope:accounting:chart-of-accounts.read
https://api.holded.com/api/v2/accounting-accounts

Retorna la llista de tots els comptes comptables del teu pla de comptes. La resposta inclou el número, nom i grup de cada compte. Utilitza aquest endpoint per consultar els comptes disponibles abans de crear assentaments comptables.

Paràmetres

Paràmetres de consulta

archivedbooleanopcional

Incloure comptes arxivats quan és cert

start_datestring<date>opcional

Filtrar comptes amb activitat des d'aquesta data

end_datestring<date>opcional

Filtrar comptes amb activitat fins a aquesta data

include_emptybooleanopcional

Incloure comptes sense transaccions quan és cert

textstringopcional

Cerca parcial, sense distingir majúscules, per nom o número de compte

Petició

python
import requests

url = "https://api.holded.com/api/v2/accounting-accounts?archived=value&start_date=2024-01-01&end_date=2024-12-31"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

response = requests.get(url, headers=headers)
print(response.json())

Respostes

Resposta

json
{
  "items": [
    {
      "id": "507f1f77bcf86cd799439011",
      "color": "#FF5733",
      "number": 4300,
      "name": "string",
      "description": "string",
      "group": "string",
      "debit": "1500.00",
      "credit": "500.00",
      "balance": "1000.00",
      "archived": false,
      "non_deductible": false
    }
  ]
}

Respostes exitoses

200Llistat del pla de comptesapplication/json
object
items[]object[]
idstring

Unique identifier of the accounting account

colorstring | null

Color code for visual identification

numberinteger

Numeric code from the chart of accounts

namestring

Display name of the account

descriptionstring

Free-text description of the account. Empty when none was set

groupstring | null

Accounting group this account belongs to

debitstring

Decimal as string for precision

creditstring

Decimal as string for precision

balancestring

Decimal as string for precision

archivedboolean

Whether the account has been archived

non_deductibleboolean

Whether this expense account (group 6) is excluded from deductible-expense calculations

Respostes d'error

401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
429Límit de sol·licituds exceditapplication/json