SubscriptionAddThreshold

Request to add a threshold to a specified balance or meter in a subscription wallet.

REST Example

The number of thresholds allowed, the threshold IDs, and threshold characteristics, such as whether the threshold is a credit limit, and an absolute value, or a percentage, are statically defined in the balance or meter template definition in My MATRIXX. This API call can change the threshold value, name, and state of any unlocked threshold on a subscription balance. In addition, you can define threshold-triggered auto recharge and specify if an event is generated when the threshold is crossed. Any existing custom threshold present is overwritten. To set the threshold as a credit limit, the ThresholdId must refer to a threshold created in My MATRIXX with the Credit Limit flag set. To set the credit limit to infinity (no threshold), set the Amount value to INFINITY.
Note: When an AddThreshold or RemoveThreshold SubMan API is called to add, modify, or remove a threshold for a subscriber or group, an MtxBalanceThresholdModifyEvent event is generated. The action field indicates the type of change.
  • "add_threshold" (1) — This is the action the first time the threshold is replaced.
  • "remove_threshold" (2) — This is the action when the threshold is removed.
  • "modify_threshold" (3) — This is the action after the first "add_threshold" action.
URL
PUT http://host:port/rsgateway/data/v3/subscription/0-1-5-11/wallet/1/thresholds
Request XML
<MtxRequestSubscriberAddThreshold>
    <Threshold>
        <MtxThresholdData>
            <ThresholdId>2</ThresholdId>
            <Name>You have reached 80% of your Streaming limit</Name>
            <Amount>80</Amount>
            <NotificationState>true</NotificationState>
            <RecurringStart></RecurringStart>
            <RecurringStop></RecurringStop>
            <VirtualCreditLimitIsPct></VirtualCreditLimitIsPct>
            <RechargeData>
                <MtxRechargeData>
                    <Amount>5</Amount>
                    <PaymentMethodResourceId>12345</PaymentMethodResourceId>
                </MtxRechargeData>
            </RechargeData>
            <EventEnabled>true</EventEnabled>
            <IsTemporaryCreditLimit></IsTemporaryCreditLimit>
        </MtxThresholdData>
    </Threshold>  
</MtxRequestSubscriberAddThreshold>
Response
<MtxResponse>
    <RouteId>1</RouteId>
    <Result>0</Result>
    <ResultText>OK</ResultText>
</MtxResponse>