Ledger Entries
Update a ledger entry
Changed onUpdate a ledger entry
ℹ️ This endpoint requires the following scope: ledger_entries:all
put/api/external/v2/ledger_entries/{id}
Request
- Base URLhttps://app.pennylane.com
- URLhttps://app.pennylane.com/api/external/v2/ledger_entries/{id}
- AuthOAuth 2Authorization code: https://app.pennylane.com/oauth/authorizeToken URL: https://app.pennylane.com/oauth/oauth/token scopes: ledger_entries:all
Path parameters
idstring required
The unique identifier of the ledger entry
Headers
X-Company-Idstring
Example:12345
Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.
Request body
Example request
{
"date": "2023-08-30",
"label": "Payment for Services",
"journal_id": 123,
"file_attachment_id": 42,
"currency": "EUR",
"piece_number": "TENSNYLUGV",
"ledger_entry_lines": {
"create": [
{
"debit": "100.00",
"credit": "0.00",
"ledger_account_id": 987,
"label": "Transaction label"
}
],
"update": [
{
"id": 42,
"debit": "100.00",
"credit": "0.00",
"ledger_account_id": 421,
"label": "Transaction label"
}
],
"delete": [
{
"id": 42
}
]
}
}Response
Returns the updated ledger entry
Example response
{
"id": 1,
"label": "Payment for Services",
"piece_number": "TENSNYLUGV",
"date": "2023-08-30",
"due_date": "2023-08-30",
"invoice_number": "FAC-2024-001",
"journal_id": 123,
"journal": {
"id": 123,
"url": "https://app.pennylane.com/api/external/v2/journals/123"
},
"categories": [
{
"id": 421,
"label": "HR - Salaries",
"weight": "0.25",
"category_group": {
"id": 229
},
"analytical_code": "CODE123",
"created_at": "2023-08-30T10:08:08.146343Z",
"updated_at": "2023-08-30T10:08:08.146343Z"
}
],
"ledger_attachment_filename": "filename.pdf",
"ledger_attachment_id": 42,
"attachment": {
"filename": "filename.pdf",
"url": "http://www.pennylane.com/rails/active_storage/blobs/redirect/eyJfc..==--26d6e7391dd728fae2cde59bd3fbe4dd11e20a95/filename.pdf"
},
"ledger_entry_lines": [
{
"id": 42,
"debit": "100.00",
"credit": "0.00",
"ledger_account_id": 987,
"ledger_account": {
"id": 987,
"number": "411000",
"url": "https://app.pennylane.com/api/external/v2/ledger_accounts/42"
},
"label": "Transaction label"
}
]
}Changes
- warning
removed the request property
- info
added the new optional
headerrequest parameterX-Company-Id - info
added the new
VESenum value to the request property
- warning