set_transaction_tags
Type: mutation
Sets the tags on a transaction
Signature
async def set_transaction_tags(
transaction_id: str,
tag_ids: List[str]
) -> Dict[str, Any]
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id | str | Yes | The transaction id |
tag_ids | List[str] | Yes | The list of tag ids to set on the transaction. Overwrites existing tags. Empty list removes all tags. |
Example
from monarchmoney import MonarchMoney
mm = MonarchMoney()
await mm.login(email, password)
result = await mm.set_transaction_tags("example_transaction_id", "example_tag_ids")
print(result)
GraphQL Operation
Operation Name: Web_SetTransactionTags
GraphQL Query
mutation Web_SetTransactionTags($input: SetTransactionTagsInput!) {
setTransactionTags(input: $input) {
errors {
...PayloadErrorFields
__typename
}
transaction {
id
tags {
id
__typename
}
__typename
}
__typename
}
}
fragment PayloadErrorFields on PayloadError {
fieldErrors {
field
messages
__typename
}
message
code
__typename
}
Try It Out
To test this API method locally:
- Install the package:
pip install monarchmoney - Create a Python script with the example code above
- Replace
emailandpasswordwith your Monarch Money credentials - Run the script
See the Authentication Guide for details on logging in.