Transaction Labels

Get a transaction's labels

get

This method returns the transaction's labels.

Authorizations
Path parameters
transaction_idintegerRequired

The transaction's ID

Responses
200
Transaction object
application/json
get
GET /transactions/{transaction_id}/labels HTTP/1.1
Host: 
X-Ledger-API-Key: YOUR_API_KEY
Accept: */*
[
  {
    "created_by": 42,
    "created_on": "2025-07-11T03:07:28.750Z",
    "id": 1,
    "info": {
      "color": "#fe3423",
      "description": "Flag resources as potentially harmfull"
    },
    "name": "SPAM",
    "updated_by": 42,
    "updated_on": "2023-02-06T02:48:59+00:00"
  }
]

Add a Label to the Transaction matching the ID

post

This post endpoint set the Label matching the ID passed in the payload to the Transaction matching the ID passed in the url

Authorizations
Path parameters
transaction_idintegerRequired

The transaction's ID

Body
label_idintegerRequired

ID of the label to add to the resource

Example: 42
Responses
200
Whether or not the Label has been successfully attached
application/json
post
POST /transactions/{transaction_id}/labels HTTP/1.1
Host: 
X-Ledger-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "label_id": 42
}
{
  "success": true
}

Remove a Label to the Transaction matching the ID

delete

This post endpoint remove the Label from the transaction matching the IDs passed in url

Authorizations
Path parameters
label_idintegerRequired

The label's ID

transaction_idintegerRequired

The transaction's ID

Responses
200
Whether or not the Label has been successfully removed
application/json
delete
DELETE /transactions/{transaction_id}/labels/{label_id} HTTP/1.1
Host: 
X-Ledger-API-Key: YOUR_API_KEY
Accept: */*
{
  "success": true
}