MailerGetTriggers¶
GET mailer/triggers/list
Returns the triggers of the brand, including global ones. Pair it with MailerGetTriggerSubscriptions to tell a configured trigger from one the module is actually listening to.
Access Control¶
Allowed role: admin, within the brand of the caller.
Request¶
GET request
GET https://{broker_domain}/mailer/triggers/list?limit=50&orderBy=%5B%22event%22%2C%22ASC%22%5D
Authorization: <JWT_TOKEN>
{
"command": "MailerGetTriggers",
"extID": "1",
"data": {
"limit": 50,
"orderBy": [
"event",
"ASC"
]
}
}
const res = await platform.MailerGetTriggers({
limit: 50,
orderBy: [
"event",
"ASC"
]
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
limit |
int | No | Page size, 1..1000, default 100 |
offset |
int | No | Rows to skip |
orderBy |
array | No | Sorting, for example ["id", "DESC"] |
count |
array | No | Row count aggregate, ["id"] |
where |
object | No | Filters, see Table filter syntax |
Response Data¶
{
"rows": [
{
"id": 2,
"brand": "default",
"event": "crm.customer.deposit",
"description": null,
"merge": { "client.email": "email", "payment.sum": "amount" },
"arguments": null,
"type": "PRIVATE",
"global": false,
"status": "ENABLED"
}
]
}
Errors¶
| Code | Error | Description |
|---|---|---|
401 |
PERMISSION_DENIED |
Not an admin session |