v1

latestOpenAPI 3.0.12026-07-141671231.8 MB
Ledger Entry Lines

Link Analytical Categories to a Ledger Entry line

This endpoint replaces already existing categories on the Ledger Entry line with new values. If an empty array of categories_ids is provided, it will remove all categories from the Ledger Entry line.

ℹ️ This endpoint requires the following scope: ledger_entries:all

put/api/external/v2/ledger_entry_lines/{ledger_entry_line_id}/categories

Path parameters

ledger_entry_line_idnumber required

Existing Ledger Entry line (id)

Request body

idinteger required
weightstring required

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

Example request

[
  {
    "id": 394,
    "weight": "0.6575"
  }
]

Response

Returns the Ledger Entry line with attached Analytical Categories

Example response

{
  "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"
      }
    ]
  }
}