API reference
Large transaction alerts
Who hears when money over an amount moves: roles, members and outside addresses, told once per transaction.
- GET
/v1/transaction_alert_rulesList the books' large transaction alerts - POST
/v1/transaction_alert_rulesAlert people when money over an amount moves - GET
/v1/transaction_alert_rules/{rule_id}Get a large transaction alert - PATCH
/v1/transaction_alert_rules/{rule_id}Change a large transaction alert - DELETE
/v1/transaction_alert_rules/{rule_id}Delete a large transaction alert
Guides: Settings and your team
List the books' large transaction alerts
GET/v1/transaction_alert_rules
client.transactionAlertRules.list()
The books' large transaction alerts, the newest first: which way, over how much, and who hears.
Parameters
| Name | Type | Description |
|---|---|---|
directionQuery | string or null | Only rules on money out, in, any |
limitQuery | integer | Page size, 1–200. |
cursorQuery | string or null | The |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/transaction_alert_rules" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Alert people when money over an amount moves
POST/v1/transaction_alert_rules· Idempotent
client.transactionAlertRules.create()
Alert people when money over an amount moves. Every transaction that
arrives from now on, dated within the last week and over min_amount
in currency, is alerted once: in the app and by email to the members
it names (each on the channels they chose), and by email to emails.
A pending charge is alerted, and the charge that settles it is not
again; transfers between the books' own accounts are not alerted. Name
at least one role, member or address.
Request body
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X POST "https://api.ledgerit.ai/v1/transaction_alert_rules" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"min_amount":0}'Get a large transaction alert
GET/v1/transaction_alert_rules/{rule_id}
client.transactionAlertRules.get()
One large transaction alert.
Parameters
| Name | Type | Description |
|---|---|---|
rule_idPath · Required | string | An id that starts with |
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl "https://api.ledgerit.ai/v1/transaction_alert_rules/{rule_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Change a large transaction alert
PATCH/v1/transaction_alert_rules/{rule_id}
client.transactionAlertRules.update()
Change which way, how much or who hears. Only the fields sent change; a list sent replaces the one there. A transaction already alerted is not alerted again.
Parameters
| Name | Type | Description |
|---|---|---|
rule_idPath · Required | string | An id that starts with |
Request body
Response
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X PATCH "https://api.ledgerit.ai/v1/transaction_alert_rules/{rule_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Delete a large transaction alert
DELETE/v1/transaction_alert_rules/{rule_id}
client.transactionAlertRules.delete()
Stop alerting on this rule. The alerts it already sent stay in each member's notifications.
Parameters
| Name | Type | Description |
|---|---|---|
rule_idPath · Required | string | An id that starts with |
Response
204No content
Errors
- 400
- The request was malformed or a parameter is invalid.
- 401
- No valid credential was sent.
- 403
- The credential or the member's role does not allow this.
- 404
- No such resource in this ledger.
- 409
- A conflicting request, e.g. one with the same Idempotency-Key still running.
- 422
- A well-formed request a business rule refused.
- 429
- Too many requests; retry after the Retry-After header.
- 500
- Something failed on our side; the request_id identifies it.
Example
curl -X DELETE "https://api.ledgerit.ai/v1/transaction_alert_rules/{rule_id}" \
-H "Authorization: Bearer $LEDGERIT_TOKEN"Objects
The objects these operations take and return.
TransactionAlertRulePage
| Name | Type | Description |
|---|---|---|
dataRequired | array of TransactionAlertRuleOut | |
has_moreRequired | boolean | |
next_cursorRequired | string or null |
TransactionAlertRuleCreate
| Name | Type | Description |
|---|---|---|
currency | string or null | An ISO 4217 code. The books' own by default. |
direction | string | Which way the money moves. Money out by default. out, in, anyDefault out |
emails | array of string | Addresses outside the membership that are emailed: a person, or a group such as finance@. |
member_ids | array of string | Members who hear whatever their role. |
min_amountRequired | number | string | Alert on a transaction moving at least this much. |
roles | array of string | Every member with one of these roles hears. owner, admin, accountant, member, viewerDefault [] |
TransactionAlertRuleOut
| Name | Type | Description |
|---|---|---|
created_atRequired | string (date-time) | |
created_byRequired | string or null | An id that starts with |
currencyRequired | string | The currency it is compared in. Transactions in another are not alerted. |
directionRequired | string |
out, in, any |
emailsRequired | array of string | Addresses outside the membership that are emailed. |
idRequired | string | An id that starts with |
member_idsRequired | array of string | Members who hear whatever their role. |
min_amountRequired | string | A transaction moving at least this much is alerted. |
rolesRequired | array of string | Every member with one of these roles hears. owner, admin, accountant, member, viewer |
updated_atRequired | string (date-time) |
TransactionAlertRuleUpdate
| Name | Type | Description |
|---|---|---|
currency | string or null | An ISO 4217 code. |
direction | string or null | One of out, in, any |
emails | array of string or null | Addresses outside the membership that are emailed: a person, or a group such as finance@. |
member_ids | array of string or null | Members who hear whatever their role. |
min_amount | number | string or null | Alert on a transaction moving at least this much. |
roles | array of string or null | Every member with one of these roles hears. owner, admin, accountant, member, viewer |