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..500, 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¶
arguments is the firing condition of the trigger and merge the field renaming; both
come back exactly as they were stored. null in arguments means the trigger reacts to
every event with this name.
{
"rows": [
{
"id": 2,
"brand": "default",
"event": "customer.password_reset.delivery_requested",
"description": null,
"merge": { "client.email": "email" },
"arguments": { "match": { "delivery_route": "customer-recovery" } },
"type": "PRIVATE",
"global": false,
"status": "ENABLED"
}
]
}
Errors¶
| Code | Error | Description |
|---|---|---|
401 |
PERMISSION_DENIED |
Not an admin session |