PUT
/
api
/
external
/
v2
/
ledger_entries
/
{id}
Update a ledger entry
curl --request PUT \
  --url https://app.pennylane.com/api/external/v2/ledger_entries/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "date": "2023-08-30",
  "label": "Payment for Services",
  "journal_id": 123,
  "ledger_attachment_id": 42,
  "currency": "EUR",
  "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
      }
    ]
  }
}'
{
  "id": 1,
  "label": "Payment for Services",
  "date": "2023-08-30",
  "journal_id": 123,
  "ledger_attachment_filename": "filename.pdf",
  "ledger_attachment_id": 42,
  "ledger_entry_lines": [
    {
      "id": 42,
      "debit": "100.00",
      "credit": "0.00",
      "ledger_account_id": 987,
      "label": "Transaction label"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
string
required

Body

application/json
date
string<date>

<span style="color: red;">date-time</span> format is deprecated. Please use date format (ISO 8601).

Example:

"2023-08-30"

label
string

Label that describes the ledger entry

Example:

"Payment for Services"

journal_id
integer

The journal ID where you want to create the ledger entry

Example:

123

ledger_attachment_id
integer

Ledger attachment ID

Example:

42

currency
enum<string>

Currency code of the ledger entry as per ISO 4217. This currency is applicable to all ledger_entry_lines

Available options:
EUR,
USD,
GBP,
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BYR,
BZD,
CAD,
CDF,
CHE,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
FJD,
FKP,
GEL,
GGP,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
IMP,
INR,
IQD,
IRR,
ISK,
JEP,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LTL,
LVL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MRU,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STD,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
UYU,
UZS,
VEF,
VND,
VUV,
WST,
XAF,
XCD,
XDR,
XOF,
XPF,
YER,
ZAR,
ZMK,
ZMW,
ZWL
Example:

"EUR"

ledger_entry_lines
object

Add, update, delete ledger entry lines. The entry lines must be balanced. In total, max number of entry lines that you can create, update or delete using this endpoint is 1000 per request.

Response

Returns the updated ledger entry

id
integer
required

ID of the ledger entry

Example:

1

label
string
required

Label that describes the ledger entry

Example:

"Payment for Services"

date
string<date>
required

Date of the ledger entry (ISO 8601)

Example:

"2023-08-30"

journal_id
integer
required

The journal ID where the ledger entry was created

Example:

123

ledger_attachment_filename
string | null
required

Attachment's filename

Example:

"filename.pdf"

ledger_attachment_id
integer | null
required

Ledger attachment ID

Example:

42

ledger_entry_lines
object[]
required

Array of entry lines