Obtenir un assentament comptable
accounting:daily-ledger.readhttps://api.holded.com/api/v2/ledger-entries/{ledgerEntryId}Recupera un assentament comptable (apunt del llibre diari) pel seu identificador, incloent totes les seves línies de deure/haver.
Paràmetres
Paràmetres de ruta
stringobligatoriID de l'assentament comptable (ObjectId hexadecimal de 24 caràcters)
Petició
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())Respostes
Resposta
{
"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"
]
}
]
}Respostes exitoses
200Assentament comptable trobatapplication/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
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json404Assentament comptable no trobatapplication/json429Límit de sol·licituds exceditapplication/json