PUT
/
api
/
external
/
v2
/
ledger_entry_lines
/
{ledger_entry_line_id}
/
categories
Link Analytical Categories to a Ledger Entry line
curl --request PUT \
  --url https://app.pennylane.com/api/external/v2/ledger_entry_lines/{ledger_entry_line_id}/categories \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "id": 394,
    "weight": "0.6575"
  }
]'
{
  "ledger_entry_line": {
    "id": 2,
    "label": "Employee - remuneration and contributions",
    "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"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

ledger_entry_line_id
number
required

Existing Ledger Entry line (id)

Body

application/json
id
integer
required
Example:

394

weight
string
required

A number between 0 and 1, including 1. It must have a maximum of 4 decimals. 0.85 means 85%.

Example:

"0.6575"

Response

Returns the Ledger Entry line with attached Analytical Categories

ledger_entry_line
object
required