Overview
To add metadata to an entity (such as a ledger, balance, transaction, identity, or balance monitor), include themeta_data
object in the JSON payload when creating or updating the item.
The meta_data
object is a flexible key-value store that allows you to attach custom data to an entity.
Basic example
Below is a simple example of how to include metadata when creating an entity:- Key: A unique identifier for the metadata attribute (e.g., “purpose”, “external_id”).
- Value: The corresponding value for that key (e.g., “payment”, “INV-12345”).
Expanded example with more fields
For a transaction, you might want to include several pieces of metadata, such as the transaction purpose, the associated invoice, and the account information of the sender:Retrieving metadata
Once metadata is attached to an entity, it can be retrieved by using the Search API or GET endpoint for the respective entity. For example, when fetching a transaction, the response will include themeta_data
object along with the core transaction details.
Response