younifyd
Menu

List Applicable Alerts For A Subscription

List applicable alerts for a subscription

GET/subscriptions/{subscription-id}/applicable_alerts

Use it in a workflow

  1. Add a step and choose the Chargebee connector.
  2. Pick the List Applicable Alerts For A Subscription action (under Chargebee API).
  3. Fill in the fields below, then reference the result from later steps as {{listApplicableAlertsForASubscription.response.data}}.

Request

Path parameters

subscription-idstringrequired

Query parameters

limitinteger (int32)

optional, integer Maximum number of results to return. **Example →** *limit = 25*

Default 10

offsetstring

<dfn class="text-muted"><p class="mb-2">optional, string</p></dfn> <p class="mb-2">Pagination cursor returned by a previous list call. Use the <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">next_offset</code> value from the previous response.</p>

statusobject

optional, enumerated string filter Filter by [status](/docs/api/alerts/alert-object#status). **Example →** *status\[is\] = "enabled"*

isstring

\* \`enabled\` - enabled \* \`disabled\` - disabled

One ofenableddisabled

typeobject

optional, enumerated string filter Filter by [type](/docs/api/alerts/alert-object#type). **Example →** *type\[is\] = "usage_exceeded"*

isstring

\* \`usage_exceeded\` - usage_exceeded \* \`spend_exceeded\` - spend_exceeded

One ofusage_exceededspend_exceeded

Headers

chargebee-request-origin-devicestring

The device from which the customer has made the request

chargebee-request-origin-userstring (email)

The email address of your customer/user. Use this when the email address has only ASCII characters.

chargebee-request-origin-user-encodedstring (email)

The Base64-encoded email address of your customer/user. Use this if the email address has UTF-8 characters. When this header is provided, the header chargebee-request-origin-user is ignored.

chargebee-request-origin-ipstring

The IP address of the customer where the request originated

chargebee-business-entity-idstring

If the site has multiple business entities, you can use this custom HTTP header to specify the business entity for which Chargebee should perform the operation.

Response

Returns 200 with an object. Read it in later steps with {{listApplicableAlertsForASubscription.response.data.<field>}}.

listarray<object>
alertobjectrequired13 fields

<div class="api-description"><span featureId="cb-ubb"></span><p class="mb-2">An alert defines a threshold rule for a <a href="/docs/api/usages">metered feature</a> within a <a href="/docs/api/subscriptions">subscription</a>. When the usage of a metered feature crosses the configured threshold, Chargebee triggers a webhook notification, enabling you to take action such as notifying the customer, upgrading the plan, or blocking further usage.</p><p class="mb-2">Common examples of alerts include:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed">Notifying a customer when they have consumed 90% of their monthly API call quota.</li> <li class="text-base leading-relaxed">Alerting your operations team when a customer&#x27;s storage usage exceeds an absolute limit.</li> <li class="text-base leading-relaxed">Triggering an automated upgrade workflow when usage crosses a defined threshold.</li> </ul><p class="mb-2">The alert resource represents configuration only. To check the current runtime state of an alert for a subscription (whether it is <code>within_limit</code> or <code>in_alarm</code>), use the <a href="/docs/api/alert_statuses">Alert Status</a> endpoints.</p><div id="global-vs-subscription-alerts" class="cb-accordion"><div class="cb-accordion-title collapsed" data-toggle="collapse" data-target="#global-vs-subscription-alerts-content" aria-expanded="false" aria-controls="global-vs-subscription-alerts-content"><h4>Global vs. subscription-scoped alerts</h4><i class="fa fa-chevron-circle-down fa-lg" aria-hidden="true"></i></div><div class="collapse" id="global-vs-subscription-alerts-content"><p class="mb-2">Alerts can be created at two levels:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><strong class="font-semibold">Global alerts</strong> apply across all subscriptions that use the specified metered feature. To restrict a global alert to specific plans, use <code>filter_conditions</code> with the <code>plan_price_id</code> field. When multiple filter conditions are provided, they are evaluated with OR semantics: the alert applies if any condition matches.</li> <li class="text-base leading-relaxed"><strong class="font-semibold">Subscription-scoped alerts</strong> apply to a single subscription only. Set <code>subscription_id</code> when creating the alert. Subscription-scoped alerts cannot have <code>filter_conditions</code>.</li> </ul><div class="warning alert alert-warning"><p class="mb-2"><strong class="font-semibold">Important</strong></p><p class="mb-2">A global alert and a subscription-scoped alert are mutually exclusive in their parameters: if <code>subscription_id</code> is set, <code>filter_conditions</code> must not be provided, and vice versa.</p></div></div></div><div id="threshold-modes" class="cb-accordion"><div class="cb-accordion-title collapsed" data-toggle="collapse" data-target="#threshold-modes-content" aria-expanded="false" aria-controls="threshold-modes-content"><h4>Threshold modes</h4><i class="fa fa-chevron-circle-down fa-lg" aria-hidden="true"></i></div><div class="collapse" id="threshold-modes-content"><p class="mb-2">The <code>threshold</code> object defines when the alert should fire. It has two fields:</p><ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><code>mode</code>: Either <code>percentage</code> or <code>absolute</code>. <ul class="list-disc list-outside ml-6 my-4 space-y-2"> <li class="text-base leading-relaxed"><code>percentage</code>: The alert fires when usage reaches the specified percentage of the plan quota. The <code>value</code> must be between 0 and 100 (inclusive).</li> <li class="text-base leading-relaxed"><code>absolute</code>: The alert fires when usage reaches an absolute quantity. The <code>value</code> must be &gt;= 0.</li> </ul> </li> <li class="text-base leading-relaxed"><code>value</code>: The numeric threshold at which the alert triggers.</li> </ul></div></div></div>

next_offsetstring

<p class="mb-2">Returned only if more results are available. Pass this value as <code class="bg-gray-100 text-gray-800 font-medium border border-gray-300 rounded px-1.5 py-0.5 mx-1 text-sm font-mono whitespace-nowrap">offset</code> in the next request to fetch the next page.</p>

json
{
  "list": null,
  "next_offset": null
}

Need more? See the Chargebee guide for connection setup and behaviour shared by every action.