Retrieve
Get an alert
post/v1/customer-alerts/get
Get the customer alert status and alert information for the specified customer and alert
Body Parameters
alert_idstring
The Metronome ID of the alert
formatuuid
customer_idstring
The Metronome ID of the customer
formatuuid
plans_or_contractsenum
optional
"PLANS" OR "CONTRACTS"
When parallel alerts are enabled during migration, this flag denotes whether to fetch alerts for plans or contracts.
Returns
dataalertobjectcustomer_statusenumtriggered_bystringCustomerAlert
curl https://api.metronome.com/v1/customer-alerts/get \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \
-d '{
"alert_id": "8deed800-1b7a-495d-a207-6c52bac54dc9",
"customer_id": "9b85c1c1-5238-4f2a-a409-61412905e1e1"
}'
200 Example
{
"data": {
"alert": {
"id": "id",
"name": "name",
"status": "enabled",
"threshold": 0,
"type": "low_credit_balance_reached",
"updated_at": "2019-12-27T18:11:19.117Z",
"credit_grant_type_filters": [
"string"
],
"credit_type": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"name": "name"
},
"custom_field_filters": [
{
"entity": "Contract",
"key": "key",
"value": "value"
}
],
"group_key_filter": {
"key": "key",
"value": "value"
},
"group_values": [
{
"key": "key",
"value": "value"
}
],
"invoice_types_filter": [
"PLAN_ARREARS, SCHEDULED, USAGE, CORRECTION, CREDIT_PURCHASE, or SEAT_PURCHASE"
],
"uniqueness_key": "x"
},
"customer_status": "ok",
"triggered_by": "triggered_by"
}
}