POST /ramps/{ramp-id}/update
Updates an existing subscription ramp by replacing its current attribute values with the new parameters provided. When using this API to modify a ramp, make sure to include all the ramp's attributes as you would do during creation of the ramp with the necessary values updated.
Example: step-by-step flow
The following steps explains how to update effective_from value of an existing ramp.
Step 1: Retrieve current ramp values
- Send a request to retrieve the current values of all parameters for the subscription ramp using Retrieve a subscription ramp API.
- Review the response to get the current values of the ramp's attributes. Note down all the parameters and their values.
Step 2: Update ramp with new values
- Prepare the request to update the ramp.
- Update the effective_from value in the noted down attributes of ramp from the previous step.
- Ensure all parameters, even those not being changed, are included in the request.
- Send the prepared request to Update subscription ramp API.
- Verify the response object to ensure a successful subscription ramp update. If it returns an error, repeat step 1 again.
Note
- Ramp status : You cannot update a ramp in
succeeded
orfailed
status. - Advance invoice : You cannot update ramps for subscriptions that have an advance invoice schedule.
Servers
- {protocol}://{site}.{environment}:{port}/api/v2
- {protocol}://{site}-test.{environment}:{port}/api/v2
Path parameters
Name | Type | Required | Description |
---|---|---|---|
ramp-id |
String | Yes |
Request headers
Name | Type | Required | Description |
---|---|---|---|
chargebee-request-origin-device |
String | No |
The device from which the customer has made the request |
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
chargebee-event-webhook |
String | No |
skip only webhooks Possible values:
|
chargebee-business-entity-id |
String | No |
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. |
chargebee-event-actions |
String | No |
skip all actions to be done on the events Possible values:
|
chargebee-request-origin-user |
String | No |
The email address of your customer/user. Use this when the email address has only ASCII characters. |
chargebee-request-origin-ip |
String | No |
The IP address of the customer where the request originated |
chargebee-request-origin-user-encoded |
String | No |
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-event-email |
String | No |
skip only emails Possible values:
|
Request body fields
Name | Type | Required | Description |
---|---|---|---|
items_to_remove[] |
Array | No |
List of item prices removed from the subscription through this ramp. Ensure this list does not include:
|
coupons_to_add |
Object | No |
Details about the added to the subscription through this ramp. |
coupons_to_add.coupon_id[] |
Array | No |
Unique ID of the coupon to be added.
|
coupons_to_add.apply_till[] |
Array | No |
The date till when the coupon can be applied. Applicable for |
description |
String | No |
A brief summary of the pricing changes applied with this ramp. |
discounts_to_remove[] |
Array | No |
List of removed from the subscription through this ramp. Ensure this list does not include discounts already removed by a previous ramp. |
item_tiers |
Object | No |
**Note** Allowed only when both of these conditions are met: * Price overriding is enabled for the site. * pricing_model of the item price is either tiered, volume, or stairstep. Replaces the existing item_tiers for specific `item_price`s within the subscription. You must provide the complete tier set for any `item_price`, even if you're changing the price for only one tier. |
item_tiers.starting_unit_in_decimal[] |
Array | No |
The decimal representation of the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as |
item_tiers.price_in_decimal[] |
Array | No |
The decimal representation of the per-unit price for the tier when the |
item_tiers.package_size[] |
Array | No |
Package size for the tier when pricing type is |
item_tiers.price[] |
Array | No |
The overridden price of the tier. The value depends on the type of currency. |
item_tiers.ending_unit[] |
Array | No |
The highest value in the quantity tier. |
item_tiers.item_price_id[] |
Array | No |
The identifier of the The identifier must correspond to an |
item_tiers.pricing_type[] |
Array | No | |
item_tiers.starting_unit[] |
Array | No |
The lowest value in the quantity tier. |
item_tiers.ending_unit_in_decimal[] |
Array | No |
The decimal representation of the highest value of quantity in this tier. This attribute is not applicable for the highest tier. For all other tiers, it must be equal to the |
items_to_update |
Object | No |
Details about the [item prices](item_prices) updated in the subscription through this ramp. |
items_to_update.unit_price[] |
Array | No |
The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the |
items_to_update.unit_price_in_decimal[] |
Array | No |
The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled. |
items_to_update.item_price_id[] |
Array | Yes |
The unique identifier of the item price. Ensure this list:
|
items_to_update.quantity[] |
Array | No |
The quantity of the item purchased |
items_to_update.quantity_in_decimal[] |
Array | No |
The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled. |
items_to_update.service_period_days[] |
Array | No |
The service period of the item in days from the day of charge. |
items_to_update.billing_cycles[] |
Array | No |
For the plan-item price: For addon-item prices: |
effective_from |
Integer | Yes |
The time when this ramp takes effect.
|
coupons_to_remove[] |
Array | No |
List of removed from the subscription through this ramp. Ensure this list does not include:
|
discounts_to_add |
Object | No |
Details about the [discounts](/docs/api/discounts?prod_cat_ver=2) added to the subscription through this ramp. |
discounts_to_add.apply_on[] |
Array | Yes | |
discounts_to_add.included_in_mrr[] |
Array | No |
The discount is included in MRR calculations for your site. This attribute is only applicable when |
discounts_to_add.period_unit[] |
Array | No | |
discounts_to_add.percentage[] |
Array | No |
The percentage of the original amount that should be deducted from it. |
discounts_to_add.period[] |
Array | No |
The duration of time for which the discount is attached to the subscription, in |
discounts_to_add.amount[] |
Array | No |
The value of the discount. The format of this value depends on the kind of currency. |
discounts_to_add.duration_type[] |
Array | Yes | |
discounts_to_add.item_price_id[] |
Array | No |
The id of the item price in the subscription to which the discount is to be applied. Relevant only when |
items_to_add |
Object | No |
Details about the [item prices](/docs/api/item_prices?prod_cat_ver=2) added to the subscription through this ramp. |
items_to_add.unit_price[] |
Array | No |
The price/per unit price of the item. When not provided, the value set for the item price is used. This is only applicable when the |
items_to_add.unit_price_in_decimal[] |
Array | No |
The decimal representation of the price or per-unit price of the plan. The value is in major units of the currency. Always returned when multi-decimal pricing is enabled. |
items_to_add.item_price_id[] |
Array | Yes |
The unique identifier of the item price.
|
items_to_add.quantity[] |
Array | No |
The quantity of the item purchased |
items_to_add.quantity_in_decimal[] |
Array | No |
The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when multi-decimal pricing is enabled. |
items_to_add.service_period_days[] |
Array | No |
The service period of the item in days from the day of charge. |
items_to_add.billing_cycles[] |
Array | No |
For the plan-item price: For addon-item prices: |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.