The alerts endpoint evaluates five real-time anomaly detection rules against recent event data and returns any that are currently triggered. Each rule uses a separate lookback window tuned to its signal type. If no rules fire, a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ALEJ4NDRO2025/urban-store/llms.txt
Use this file to discover all available pages before exploring further.
all_clear alert is returned so your dashboard always has a defined state to render. This endpoint is designed to be polled periodically — every few minutes is typically sufficient.
Endpoint
Authentication
Bearer token required withis_admin: true in the JWT payload. Returns 403 if the user is not an admin.
Alert Object Fields
Machine-readable alert type identifier. See the rules table below.
Human-readable description of the anomaly, including specific numbers.
Urgency level:
"critical", "warning", or "info".ISO 8601 timestamp of when the alert was generated.
Alert Rules
| Type | Trigger | Lookback | Severity |
|---|---|---|---|
high_abandonment | Abandonment rate > 70% with ≥ 3 checkout attempts | Last 24 hours | critical |
popular_no_conversion | Product with > 10 unique views but 0 purchases | Last 7 days | warning |
payment_errors | Any payment_error events recorded | Last 1 hour | critical |
carts_abandoned | ≥ 5 sessions added to cart without starting checkout | Last 6 hours | warning |
stuck_sessions | Sessions with > 15 events but no purchase | Last 24 hours | info |
all_clear | No other rules triggered | — | info |
Rule Details
high_abandonment — Counts unique identifiers (user email or session ID) that fired begin_checkout in the last 24 hours. If more than 70% of those did not also fire purchase, and the total checkout count is at least 3, this alert fires.
popular_no_conversion — Uses a MongoDB aggregation to find products with more than 10 unique viewing sessions in the last 7 days. For each such product, if no purchase events exist for it in the same window, a separate alert object is emitted (one per affected product). Each includes a product_slug field in addition to the standard fields.
payment_errors — Counts payment_error events from the last hour. Any count greater than zero triggers the alert.
carts_abandoned — Compares add_to_cart session IDs to begin_checkout session IDs over the last 6 hours. If 5 or more sessions added items but never reached checkout, the alert fires.
stuck_sessions — Aggregates sessions with more than 15 total events in the last 24 hours that never fired a purchase event. Any count greater than zero triggers the alert.
all_clear — Added automatically only when the alerts array would otherwise be empty.
Response
Array of alert objects. Contains at least one entry (
all_clear when everything is normal).