Transaction Labels

Get a transaction's labels

get

This method returns the transaction's labels.

Authorizations
X-Ledger-API-KeystringRequired

If you've set up your API Key when initializing your LAM, you'll need to include it as a header along with the api user header. For more details, see step 5 of the get started documentation.

X-Ledger-API-UserstringRequired

(required) Username of a registered API User

Path parameters
transaction_idintegerRequired

The transaction's ID

Responses
get
/transactions/{transaction_id}/labels
GET /transactions/{transaction_id}/labels HTTP/1.1
Host: 
X-Ledger-API-Key: YOUR_API_KEY
X-Ledger-API-User: YOUR_API_KEY
Accept: */*
[
  {
    "created_by": 42,
    "created_on": "2025-11-14T12:22:21.534Z",
    "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
X-Ledger-API-KeystringRequired

If you've set up your API Key when initializing your LAM, you'll need to include it as a header along with the api user header. For more details, see step 5 of the get started documentation.

X-Ledger-API-UserstringRequired

(required) Username of a registered API User

Path parameters
transaction_idintegerRequired

The transaction's ID

Body
label_idintegerRequired

ID of the label to add to the resource

Example: 42
Responses
post
/transactions/{transaction_id}/labels
POST /transactions/{transaction_id}/labels HTTP/1.1
Host: 
X-Ledger-API-Key: YOUR_API_KEY
X-Ledger-API-User: 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
X-Ledger-API-KeystringRequired

If you've set up your API Key when initializing your LAM, you'll need to include it as a header along with the api user header. For more details, see step 5 of the get started documentation.

X-Ledger-API-UserstringRequired

(required) Username of a registered API User

Path parameters
label_idintegerRequired

The label's ID

transaction_idintegerRequired

The transaction's ID

Responses
delete
/transactions/{transaction_id}/labels/{label_id}
DELETE /transactions/{transaction_id}/labels/{label_id} HTTP/1.1
Host: 
X-Ledger-API-Key: YOUR_API_KEY
X-Ledger-API-User: YOUR_API_KEY
Accept: */*
{
  "success": true
}