Obtener un asiento contable
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
stringobligatorioID del asiento contable (ObjectId hexadecimal de 24 caracteres)
Petición
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
{
"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/jsonLedger entry ID
Date of the ledger entry
Type of the ledger entry
Sequential number of the ledger entry, once the ledger has been numbered
Description of the document that originated this entry
Free-text notes for the ledger entry
Contact identifier linked to this entry
Debit/credit lines that make up the ledger entry
Line number within the entry
Full account number from the chart of accounts
Line description
Debit amount as decimal string
Credit amount as decimal 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