# Quoted ramps

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


When a `[quote](/docs/api/quotes)` is created, it generates the `quoted_ramps` resource. This captures most of the details of the [ramps](/docs/api/ramps) that would eventually be created once the quote is invoiced. This resource is returned along with the quote for most of the associated operations.

**Note** Applicable only when Chargebee CPQ and [Subscription Ramps](/docs/api/ramps) are enabled. To request access, contact [Chargebee Support](https://www.chargebee.com/docs/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=docs_api&utm_medium=content&utm_campaign=support).

## Sample Quoted ramp

```json
{
  "line_items": [
    {
      "item_price_id": "p1-USD-Monthly",
      "item_type": "plan",
      "quantity": 1,
      "unit_price": 1000,
      "amount_per_billing_cycle": 1000,
      "net_amount_per_billing_cycle": 800,
      "item_level_discount_per_billing_cycle": 0,
      "start_date": 1749148200,
      "end_date": 1751740199,
      "billing_period": 1,
      "billing_period_unit": "month",
      "object": "subscription_item"
    },
    {
      "item_price_id": "p1-USD-Monthly",
      "item_type": "plan",
      "quantity": 1,
      "unit_price": 1000,
      "amount_per_billing_cycle": 1000,
      "net_amount_per_billing_cycle": 950,
      "item_level_discount_per_billing_cycle": 0,
      "start_date": 1751740200,
      "end_date": 1754418599,
      "billing_period": 1,
      "billing_period_unit": "month",
      "object": "subscription_item"
    },
    {
      "item_price_id": "p1-USD-Monthly",
      "item_type": "plan",
      "quantity": 1,
      "unit_price": 1000,
      "amount_per_billing_cycle": 1000,
      "net_amount_per_billing_cycle": 1000,
      "item_level_discount_per_billing_cycle": 0,
      "start_date": 1754418600,
      "end_date": 1843842599,
      "billing_period": 1,
      "billing_period_unit": "month",
      "object": "subscription_item"
    },
    {
      "item_price_id": "a1-USD-Monthly",
      "item_type": "addon",
      "quantity": 1,
      "unit_price": 1000,
      "amount_per_billing_cycle": 1000,
      "net_amount_per_billing_cycle": 800,
      "item_level_discount_per_billing_cycle": 0,
      "start_date": 1749148200,
      "end_date": 1751740199,
      "billing_period": 1,
      "billing_period_unit": "month",
      "object": "subscription_item"
    },
    {
      "item_price_id": "tiered-USD-Monthly",
      "item_type": "addon",
      "quantity": 50,
      "unit_price": 5750,
      "amount_per_billing_cycle": 287500,
      "net_amount_per_billing_cycle": 273125,
      "item_level_discount_per_billing_cycle": 0,
      "start_date": 1751740200,
      "end_date": 1754418599,
      "ramp_tier_id": "tiered-USD-Monthly-1",
      "billing_period": 1,
      "billing_period_unit": "month",
      "object": "subscription_item"
    },
    {
      "item_price_id": "a1-USD-Monthly",
      "item_type": "addon",
      "quantity": 10,
      "unit_price": 1000,
      "amount_per_billing_cycle": 10000,
      "net_amount_per_billing_cycle": 10000,
      "item_level_discount_per_billing_cycle": 0,
      "start_date": 1754418600,
      "end_date": 1843842599,
      "billing_period": 1,
      "billing_period_unit": "month",
      "object": "subscription_item"
    },
    {
      "item_price_id": "tiered-USD-Monthly",
      "item_type": "addon",
      "quantity": 1,
      "unit_price": 5000,
      "amount_per_billing_cycle": 5000,
      "net_amount_per_billing_cycle": 5000,
      "item_level_discount_per_billing_cycle": 0,
      "start_date": 1754418600,
      "end_date": 1843842599,
      "ramp_tier_id": "tiered-USD-Monthly-2",
      "billing_period": 1,
      "billing_period_unit": "month",
      "object": "subscription_item"
    }
  ],
  "item_tiers": [
    {
      "item_price_id": "tiered-USD-Monthly",
      "starting_unit": 1,
      "price": 5000,
      "ramp_tier_id": "tiered-USD-Monthly-1",
      "ending_unit": 25
    },
    {
      "item_price_id": "tiered-USD-Monthly",
      "starting_unit": 26,
      "price": 6500,
      "ramp_tier_id": "tiered-USD-Monthly-1",
      "ending_unit": 100
    },
    {
      "item_price_id": "tiered-USD-Monthly",
      "starting_unit": 101,
      "price": 7500,
      "ramp_tier_id": "tiered-USD-Monthly-1"
    },
    {
      "item_price_id": "tiered-USD-Monthly",
      "starting_unit": 1,
      "price": 5000,
      "ramp_tier_id": "tiered-USD-Monthly-2",
      "ending_unit": 25
    },
    {
      "item_price_id": "tiered-USD-Monthly",
      "starting_unit": 26,
      "price": 6000,
      "ramp_tier_id": "tiered-USD-Monthly-2",
      "ending_unit": 100
    },
    {
      "item_price_id": "tiered-USD-Monthly",
      "starting_unit": 101,
      "price": 7000,
      "ramp_tier_id": "tiered-USD-Monthly-2"
    }
  ],
  "discounts": [
    {
      "type": "percentage",
      "duration_type": "one_time",
      "apply_on": "invoice_amount",
      "included_in_mrr": false,
      "percentage": 20,
      "entity_type": "document_level_discount",
      "start_date": 1749148200,
      "end_date": 1751740199
    },
    {
      "type": "percentage",
      "duration_type": "one_time",
      "apply_on": "invoice_amount",
      "included_in_mrr": false,
      "percentage": 5,
      "entity_type": "document_level_discount",
      "start_date": 1751740200,
      "end_date": 1754418599
    }
  ]
}
```

## Quoted ramps attributes

## Input Parameters

- `id` (required, string, max chars=50)

- `line_items` (optional, list of line_item)
  Provides details of the individual line items in the subscription. If the subscription includes ramps, this array contains line items from all ramps.
  - `item_price_id` (required, string, max chars=100)
    The unique identifier of the item price.
  - `item_type` (required, enumerated string)
    The type of item. There must be one and only one item of type `plan` in this list.
    Possible enum values:
      - `plan`
        Plan
      - `addon`
        Addon
      - `charge`
        Charge
  - `quantity` (optional, integer, min=1)
    The quantity of the item purchased
  - `quantity_in_decimal` (optional, string, max chars=33)
    The decimal representation of the quantity of the item purchased. Can be provided for quantity-based item prices and only when [multi-decimal pricing](/docs/api/getting-started) is enabled.
  - `unit_price` (optional, in cents, min=0)
    The price/per unit price of the item. When not provided, [the value set](/docs/api/item_prices/item-price-object) for the item price is used. This is only applicable when the `pricing_model` of the item price is `flat_fee` or `per_unit`. Also, it is only allowed when [price overriding](https://www.chargebee.com/docs/price-override.html) is enabled for the site. The value depends on the type of currency.
  - `unit_price_in_decimal` (optional, string, max chars=39)
    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](/docs/api/getting-started) is enabled.
  - `amount` (optional, in cents, min=0)
    The total amount for the item as determined from `unit_price` , `free_quantity` , `quantity` and `item_tiers` as applicable. The value depends on the [type of currency](/docs/api/quoted_ramps) .
  - `amount_in_decimal` (optional, string, max chars=39)
    The decimal representation of the total amount for the item, in major units of the currency. Always returned when [multi-decimal pricing](/docs/api/getting-started) is enabled.
  - `billing_period` (optional, integer, min=1)
    The interval between consecutive billing cycles for the subscription item. The interval is measured in the units defined by `billing_period_unit` .
  - `billing_period_unit` (optional, enumerated string)
    The unit of measurement used to define the `billing_period` for the subscription item.
    Possible enum values:
      - `day`
        A period of 24 hours.
      - `week`
        A period of 7 days.
      - `month`
        A period of 1 calendar month.
      - `year`
        A period of 1 calendar year.
  - `free_quantity` (optional, integer, min=0)
    The `free_quantity` of the plan-item as [specified](/docs/api/item_prices) for the item price.
  - `free_quantity_in_decimal` (optional, string, max chars=33)
    The `free_quantity_in_decimal` as set for the item price. Returned for quantity-based item prices when [multi-decimal pricing](/docs/api/getting-started) is enabled.
  - `billing_cycles` (optional, integer, min=0)
    For the plan-item price: the value determines the number of billing cycles the subscription runs before canceling automatically. If not provided, then [the value set](/docs/api/item_prices/item-price-object) for the plan-item price is used.
    
    For addon-item prices: If [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) are enabled then this is the number of subscription billing cycles for which the addon is included. If not provided, then [the value set under attached addons](/docs/api/attached_items/attached-item-object) is used. Further, if that value is not provided, then [the value set for the addon-item price](/docs/api/item_prices/item-price-object) is used.
  - `service_period_days` (optional, integer, min=1, max=730)
    The service period of the item in days from the day of charge.
  - `charge_on_event` (optional, enumerated string)
    When `charge_on_option` option is set to `on_event` , this parameter specifies the event at which the charge-item is applied to the subscription. This parameter only applies to charge-items.
    Possible enum values:
      - `subscription_creation`
        the time of creation of the subscription.
      - `subscription_trial_start`
        the time when the trial period of the subscription begins.
      - `plan_activation`
        same as subscription activation, but also includes the case when the plan-item of the subscription is changed.
      - `subscription_activation`
        the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions.
      - `contract_termination`
        when a contract term is [terminated](/docs/api/subscriptions/cancel-subscription-for-items#contract_term_cancel_option) .
  - `charge_once` (optional, boolean)
    Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items.
  - `charge_on_option` (optional, enumerated string)
    Indicates when the charge-item is to be charged. This parameter only applies to charge-items.
    Possible enum values:
      - `immediately`
        The item is charged immediately on being added to the subscription.
      - `on_event`
        The item is charged at the occurrence of the event specified as `charge_on_event` .
  - `start_date` (optional, timestamp(UTC) in seconds)
    Specifies the start date for the item price in the subscription. The period of the item price, determined by the `start_date` and `end_date`, specifies the [ramp](/docs/api/quoted_ramps) it belongs to.
  - `end_date` (optional, timestamp(UTC) in seconds)
    Specifies the end date for the item price in the subscription. The period of the item price, determined by the `start_date` and `end_date`, specifies the [ramp](/docs/api/quoted_ramps) it belongs to.
  - `ramp_tier_id` (optional, string, max chars=105)
    The index or identifier of the [ramp](/docs/api/ramps) to which the item price belongs. This index is used to map `item_tier[i]` values to the correct ramp, as the target `item_price` of an `item_tier` may be part of multiple ramps.
  - `discount_per_billing_cycle` (optional, in cents, min=0)
    Specifies the discount amount applied to a line item per billing cycle. This includes both item-level and invoice-level discounts. **Example:** Consider a monthly quote that includes a plan, an addon, a $50 discount on the plan, and an additional $100 invoice-level discount. In this case, `discount_per_billing_cycle` for the plan would be ($50 + $100 ÷ 2) = $100.
  - `discount_per_billing_cycle_in_decimal` (optional, string, max chars=39)
    Specifies the discount amount applied to a line item per billing cycle, in decimal format. The value is expressed in the major currency units. This attribute is available only when [Multi-Decimal Pricing](/docs/api/currencies) is enabled. **See also:**`discount_per_billing_cycle`.
  - `item_level_discount_per_billing_cycle` (optional, in cents, min=0)
    Specifies the item-level discount amount applied to a line item per billing cycle. This does not include invoice-level discounts. **Example:** Consider a monthly quote that includes a plan, an addon, a $50 discount on the plan, and an additional $100 invoice-level discount. In this case, `item_level_discount_per_billing_cycle` for the plan would be $50.
  - `item_level_discount_per_billing_cycle_in_decimal` (optional, string, max chars=39)
    Specifies the item-level discount amount applied to a line item per billing cycle, in decimal format. The value is expressed in the major currency units. This attribute is available only when [Multi-Decimal Pricing](/docs/api/currencies) is enabled. **See also:**`item_level_discount_per_billing_cycle`.
  - `amount_per_billing_cycle` (optional, in cents, min=0)
    Specifies the amount for this line item before discounts. \*\*Example:\*\*Consider a monthly quote that includes a $500 plan, an addon, a $50 discount on the plan, and an additional $100 invoice-level discount. In this case, `amount_per_billing_cycle` for the plan would be $500.
  - `amount_per_billing_cycle_in_decimal` (optional, string, max chars=39)
    Specifies the amount for this line item before discounts, in decimal format. The value is expressed in the major currency units. This attribute is available only when [Multi-Decimal Pricing](/docs/api/currencies) is enabled. **See also:**`amount_per_billing_cycle`.
  - `net_amount_per_billing_cycle` (optional, in cents, min=0)
    Specifies the amount for this line item after discounts. **Example:** Consider a monthly quote that includes a $500 plan, an addon, a $50 discount on the plan, and an additional $100 invoice-level discount. In this case, `net_amount_per_billing_cycle` for the plan would be ($500 - ($50 + $100 ÷ 2)) = $400.
  - `net_amount_per_billing_cycle_in_decimal` (optional, string, max chars=39)
    Specifies the amount for this line item after discounts, in decimal format. The value is expressed in the major currency units. This attribute is available only when [Multi-Decimal Pricing](/docs/api/currencies) is enabled. **See also:**`net_amount_per_billing_cycle`.
  - `description` (optional, string, max chars=2000)

- `discounts` (optional, list of discount)
  List of discounts for this quoted subscription.
  - `id` (required, string, max chars=50)
    An immutable unique id for the discount. It is always auto-generated.
  - `invoice_name` (optional, string, max chars=100)
    The name of the discount as it should appear on customer-facing pages and documents such as [invoices](/docs/api/invoices) and [hosted pages](/docs/api/hosted_pages). This is auto-generated based on the `type` , `amount` , and `currency_code` of the discount. For example, it can be `10% off` or `10$ off` .
  - `type` (required, enumerated string, default=percentage)
    The type of discount. Possible value are:
    Possible enum values:
      - `fixed_amount`
        The specified amount will be given as discount.
      - `percentage`
        The specified percentage will be given as discount.
  - `percentage` (optional, double, min=0.01, max=100)
    The percentage of the original amount that should be deducted from it.
  - `amount` (optional, in cents, min=0)
    The value of the discount. [The format of this value](/docs/api/currencies) depends on the kind of currency.
  - `duration_type` (required, enumerated string, default=forever)
    Specifies the time duration for which this discount is attached to the subscription.
    Possible enum values:
      - `one_time`
        The discount stays attached to the subscription till it is applied on an invoice **once**. It is removed after that from the subscription.
      - `forever`
        The discount is attached to the subscription and applied on the invoices till it is [explicitly removed](/docs/api/subscriptions/update-subscription-for-items#discounts_operation_type) .
      - `limited_period`
        The discount is attached to the subscription and applied on the invoices for a limited duration. This duration starts from the point it is applied to an invoice for the first time and expires after a period specified by `period` and `period_unit` .
  - `entity_type` (required, enumerated string)
    The type of deduction and the amount it applies to.
    Possible enum values:
      - `item_level_coupon`
        The deduction comes from a [coupon](/docs/api/coupons) applied to a specific line item. The coupon `id` is available in the `entity_id` attribute.
      - `document_level_coupon`
        The deduction comes from a [coupon](/docs/api/coupons) applied at the invoice level. The coupon id is available in the `entity_id` attribute.
      - `item_level_discount`
        The deduction comes from a [discount](/docs/api/discounts) applied to a specific line item. The discount `id` is available in the `entity_id` attribute.
      - `document_level_discount`
        The deduction comes from a [discount](/docs/api/discounts) applied at the invoice level. The discount `id` is available in the `entity_id` attribute.
  - `entity_id` (optional, string, max chars=100)
    When the deduction results from a [coupon](/docs/api/coupons) or a [discount](/docs/api/discounts), this attribute contains the `id` of that coupon or discount.
  - `period` (optional, integer, min=1)
    The duration of time for which the discount is attached to the subscription, in `period_units`. Applicable only when `duration_type` is `limited_period`.
  - `period_unit` (optional, enumerated string)
    The unit of time for `period`. Applicable only when `duration_type` is `limited_period`.
    Possible enum values:
      - `day`
        A period of 24 hours.
      - `week`
        A period of 7 days.
      - `month`
        A period of 1 calendar month.
      - `year`
        A period of 1 calendar year.
  - `included_in_mrr` (required, boolean)
    The discount is included in MRR calculations for your site. This attribute is only applicable when `duration_type` is `one_time` and when the [feature is enabled](https://www.chargebee.com/docs/reporting.html#dashboards_flexible-mrr-calculation) in Chargebee. Also, If the [site-level setting](https://www.chargebee.com/docs/reporting.html#chart_flexible-mrr-calculation) is to exclude one-time discounts from MRR calculations, this value is always returned `false`.
  - `apply_on` (required, enumerated string)
    The amount on the invoice to which the discount is applied.
    Possible enum values:
      - `invoice_amount`
        The discount is applied to the invoice `sub_total` .
      - `specific_item_price`
        The discount is applied to the `invoice.line_item.amount` that corresponds to the item price specified by `item_price_id` .
  - `item_price_id` (optional, string, max chars=100)
    The [id of the item price](/docs/api/subscriptions/subscription-object#subscription_items_item_price_id) in the subscription to which the discount is to be applied. Relevant only when `apply_on` = `specific_item_price`.
  - `created_at` (required, timestamp(UTC) in seconds)
    Timestamp indicating when this discount is created.
  - `updated_at` (optional, timestamp(UTC) in seconds)
  - `start_date` (optional, timestamp(UTC) in seconds)
    Specifies the start date for the discount. The period of the discount, as specified by the `start_date` and `end_date` determines the [ramp(s)](/docs/api/quoted_ramps) it will be part of.
  - `end_date` (optional, timestamp(UTC) in seconds)
    Specifies the end date for the discount. The period of the discount, as specified by the `start_date` and `end_date` determines the [ramp(s)](/docs/api/quoted_ramps) it will be part of.

- `item_tiers` (optional, list of item_tier)
  List of item tier.
  - `item_price_id` (required, string, max chars=100)
    The id of the item price to which this tier belongs.
  - `starting_unit` (required, integer, min=1)
    The lowest value in the quantity tier.
  - `ending_unit` (optional, integer)
    The highest value in the quantity tier.
  - `price` (required, in cents, default=0, min=0)
    The per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. The total cost for the item price when the `pricing_model` is `stairstep`. The value is in the minor unit of the currency.
  - `starting_unit_in_decimal` (optional, string, max chars=33)
    The decimal representation of the the lowest value of quantity in this tier. This is zero for the lowest tier. For all other tiers, it is the same as `ending_unit_in_decimal` of the next lower tier. Returned only when the pricing\_model is `tiered` , `volume` or `stairstep` and [multi-decimal pricing](/docs/api/getting-started) is enabled.
  - `ending_unit_in_decimal` (optional, string, max chars=33)
    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 `starting_unit_in_decimal` of the next higher tier. Returned only when the pricing\_model is `tiered` , `volume` or `stairstep` and [multi-decimal pricing](/docs/api/getting-started) is enabled.
  - `price_in_decimal` (optional, string, max chars=39)
    The decimal representation of the per-unit price for the tier when the `pricing_model` is `tiered` or `volume`. When the `pricing_model` is `stairstep` , it is the decimal representation of the total price for the item. The value is in major units of the currency. Returned when the plan is quantity-based and [multi-decimal pricing](/docs/api/getting-started) is enabled.
  - `ramp_tier_id` (optional, string, max chars=105)
    The index or identifier of the [ramp](/docs/api/ramps) to which this tier information belongs. This is a value from the `line_items[i].ramp_tier_id`. Since an item price can be part of multiple subscriptions ramps, this group ID specifies the ramp to which this tier information belongs.
  - `pricing_type` (optional, enumerated string)
    Pricing type for the tier.
    Possible enum values:
      - `per_unit`
        Indicates that the tier pricing is based on individual units. Customers are charged a fixed price per unit. For example, if the price per unit is $2 and the customer consumes 150 units, they will be charged $300 (150 × $2).
      - `flat_fee`
        Indicates that the tier pricing is a flat fee, applied to the entire tier regardless of the number of units consumed. For the **stairstep** pricing model, `pricing_type` will be set to `flat_fee` by default. For example, if the flat fee for a tier is $100, the customer pays $100 whether they consume 1 unit or the maximum number of units within that tier.
      - `package`
        Indicates that the tier pricing is based on a package of units. Customers are charged for each block or package of units. For example, if the package size is 100 units and the cost per block is $20, consuming 400 units will result in a charge of $80 (4 × $20).
  - `package_size` (optional, integer, min=1)
    Package size for the tier when pricing type is `package`. Specify the number of units that make up one package. For example, if 1000 API hits are grouped into a single package, set the package size to 1000.

- `coupon_applicability_mappings` (optional, list of coupon_applicability_mapping)
  - `coupon_id` (optional, string, max chars=50)
  - `applicable_item_price_ids` (optional, string, max chars=100)

