# Quote line groups

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


The line items of a quote are grouped by charge event. Each of these groups is called a quote line group. A quote would have at least one quote line group. Let's look at an example.

Consider the following:

-   A monthly plan A for $500 per month.
-   A non-recurring addon B for $50. Now consider a quote that is created for 3 billing cycles of the plan with the addon applied immediately. This quote would be associated with a list of quote line groups: one for each charge event as shown below:

#### Quote Line group 1[](#quote-line-group-1)

**Plan A:** $500

**Addon B:** $50

**Total:** $550

#### Quote Line group 2[](#quote-line-group-2)

**Plan A:** $500

**Total:** $500

#### Quote Line group 3[](#quote-line-group-3)

**Plan A:** $500

**Total:** $500

## Sample Quote line group

```json
{
  "id": "qlg___dev__XpbSss5Rp3qHPdF",
  "sub_total": 67,
  "total": 67,
  "credits_applied": 0,
  "amount_paid": 0,
  "amount_due": 67,
  "charge_event": "subscription_change",
  "object": "quote_line_group",
  "line_items": [
    {
      "id": "__dev__XpbSss5Rp3qHPeG",
      "date_from": 1580385923,
      "date_to": 1582199436,
      "unit_amount": 67,
      "quantity": 1,
      "amount": 67,
      "pricing_model": "per_unit",
      "is_taxed": false,
      "tax_amount": 0,
      "object": "line_item",
      "customer_id": "active_direct",
      "description": "SMS Credits - Prorated Charges",
      "entity_type": "addon",
      "entity_id": "sms-credits",
      "discount_amount": 0,
      "item_level_discount_amount": 0
    }
  ],
  "line_item_discounts": [],
  "taxes": [],
  "line_item_taxes": []
}
```

## Quote line groups attributes

## Input Parameters

- `version` (optional, integer, default=1)
  Version of the quote line group.

- `id` (optional, string, max chars=40)
  Uniquely identifies a quote line group.

- `sub_total` (required, in cents, min=0)
  Subtotal in cents.

- `total` (optional, in cents, default=0, min=0)
  Total in cents.

- `credits_applied` (optional, in cents, default=0, min=0)
  Credits (in cents) applied to this quote line group.

- `amount_paid` (optional, in cents, default=0, min=0)
  Existing outstanding payments (in cents) if any, applied to this quote line group.

- `amount_due` (optional, in cents, default=0, min=0)
  Amount due in cents

- `charge_event` (optional, enumerated string)
  Describes the time in the subscription lifecycle when the charge is to occur.
  Possible enum values:
    - `immediate`
      Immediate
    - `subscription_creation`
      Subscription Creation
    - `trial_start`
      Trial Start
    - `subscription_change`
      Subscription Change
    - `subscription_renewal`
      Subscription Renewal
    - `subscription_cancel`
      Subscription Cancel

- `billing_cycle_number` (optional, integer)
  The serial number of the billing cycle of which the quote line group is a part.

- `discounts` (optional, list of discount)
  The list of discounts applied to this quote line group.
  - `amount` (required, in cents, min=0)
    The amount deducted. The format of this value depends on the [kind of currency](/docs/api/currencies) .
  - `description` (optional, string, max chars=250)
    Description for this deduction.
  - `line_item_id` (optional, string, max chars=40)
    The unique id of the line item that this deduction is for. Is required when `discounts[entity_type]` is `item_level_coupon` or `document_level_coupon` .
  - `entity_type` (required, enumerated string)
    The type of deduction and the amount to which it is applied.
    Possible enum values:
      - `item_level_coupon`
        The deduction is due to a coupon applied to line item. The coupon `id` is passed as `entity_id` .
      - `document_level_coupon`
        The deduction is due to a coupon applied to the invoice `sub_total`. The coupon id is passed as `entity_id` .
      - `promotional_credits`
        The deduction is due to a [promotional credit](/docs/api/promotional_credits) applied to the invoice.
      - `prorated_credits`
        The deduction is due to a legacy adjustment credit applied to the invoice. The `entity_id` is `null` in this case. The legacy credits feature is superseded by `[adjustment_credit_notes](/docs/api/invoices/invoice-object#adjustment_credit_notes)` .
      - `item_level_discount`
        The deduction is due to a [discount](/docs/api/discounts) applied to a line item of the invoice. The discount `id` is available as the `entity_id`.
      - `document_level_discount`
        The deduction is due to a [discount](/docs/api/discounts) applied to the invoice `sub_total`. The discount `id` is available as the `entity_id`.
  - `discount_type` (optional, enumerated string)
    The type of discount that is applied to the line item. Relevant only when `discounts[entity_type]` is one of `item_level_discount` , `item_level_coupon` , `document_level_discount` , or `document_level_coupon`
    Possible enum values:
      - `fixed_amount`
        when amount is applied as discount
      - `percentage`
        when percentage is applied as discount
  - `entity_id` (optional, string, max chars=100)
    When the deduction is due to a `coupon` or a `[discount](/docs/api/discounts)` , then this is the `id` of the coupon or discount.
  - `coupon_set_code` (optional, string, max chars=50)
    The [coupon code](/docs/api/coupon_codes/coupon_code-object#code) , if applicable, used to provide the discount. The [coupon.id](/docs/api/coupons/coupon-object#id) is available in `entity_id` .

- `taxes` (optional, list of tax)
  The list of taxes applied to this quote line group.
  - `name` (required, string, max chars=100)
    The name of the tax applied. E.g. GST.
  - `amount` (required, in cents, min=0)
    The tax amount.
  - `description` (optional, string, max chars=250)
    Description of the tax item.

