GET
Obtener un asiento contable
Scope:
accounting:daily-ledger.readhttps://api.holded.com/api/v2/ledger-entries/{ledgerEntryId}Recupera un asiento contable (apunte del libro diario) por su identificador, incluyendo todas sus líneas de debe/haber.
Parámetros
Parámetros de ruta
ledgerEntryId
stringobligatorioID del asiento contable (ObjectId hexadecimal de 24 caracteres)
Petición
python
import requests
url = "https://api.holded.com/api/v2/ledger-entries/{ledgerEntryId}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respuestas
Respuesta
json
{
"id": "507f1f77bcf86cd799439011",
"date": "2024-01-15",
"type": "invoice",
"entry_number": 0,
"doc_description": "string",
"notes": "string",
"contact_id": "string",
"lines": [
{
"line": 0,
"account": 43000001,
"description": "string",
"debit": "100.00",
"credit": "0.00",
"tags": [
"string"
]
}
]
}Respuestas exitosas
200Asiento contable encontradoapplication/jsonobject
idstring
Ledger entry ID
datestring<date>
Date of the ledger entry
typestring | null
Type of the ledger entry
entry_numberinteger | null
Sequential number of the ledger entry, once the ledger has been numbered
doc_descriptionstring | null
Description of the document that originated this entry
notesstring | null
Free-text notes for the ledger entry
contact_idstring | null
Contact identifier linked to this entry
lines[]object[]
Debit/credit lines that make up the ledger entry
lineinteger
Line number within the entry
accountinteger
Full account number from the chart of accounts
descriptionstring | null
Line description
debitstring
Debit amount as decimal string
creditstring
Credit amount as decimal string
tags[]string[]
List of tags attached to this line
Respuestas de error
401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json404Asiento contable no encontradoapplication/json429Límite de solicitudes excedidoapplication/json