Saltar al contingut principal
GET

Llistat d'assentaments comptables

Scope:accounting:daily-ledger.read
https://api.holded.com/api/v2/ledger-entries

Retorna una llista paginada d'assentaments comptables del teu llibre major.

Paràmetres

Paràmetres de consulta

start_datestring<date>obligatori

Filtrar assentaments des d'aquesta data

end_datestring<date>obligatori

Filtrar assentaments fins a aquesta data

cursorstringopcional

Cursor opac per a la paginació

limitintegeropcional= 50

Nombre màxim d'assentaments a retornar per pàgina. Per defecte 25, màxim 100

accountintegeropcional

Filtrar assentaments per número de compte del pla comptable

Petició

python
import requests

url = "https://api.holded.com/api/v2/ledger-entries?start_date=2026-01-01&end_date=2026-12-31&cursor=value"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

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

Respostes

Resposta

json
{
  "items": [
    {
      "id": "string",
      "entry_number": 0,
      "line": 0,
      "date": "string",
      "type": "string",
      "description": "string",
      "doc_description": "string",
      "account": 4300,
      "debit": "100.00",
      "credit": "0.00",
      "tags": [
        "string"
      ],
      "checked": false
    }
  ],
  "cursor": "string",
  "has_more": false
}

Respostes exitoses

200Llistat d'assentaments comptablesapplication/json
object
items[]object[]
idstring

Ledger entry ID — use it to fetch the full entry via GET /ledger-entries/{id}

entry_numberinteger

Sequential number of the ledger entry

lineinteger

Line number within the entry

datestring

Date of the ledger entry

typestring | null

Type of the ledger entry

descriptionstring

Description of the entry

doc_descriptionstring | null

Description from the linked document

accountinteger

Account number from the chart of accounts

debitstring

Debit amount as a decimal string

creditstring

Credit amount as a decimal string

tags[]string[]

List of tags attached to the entry

checkedboolean

Whether the entry has been reviewed

cursorstring | null
has_moreboolean

Respostes d'error

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