# List quote line groups

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


[Eventually Consistent](/docs/api/read-consistency)

This API retrieves all the quote line groups and lineitems for a quote.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/quotes/7/quote_line_groups \
     -u {site_api_key}:
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
ListResult result = Quote.QuoteLineGroupsForQuote("7").Request();

foreach (var listItem in result.List){
  QuoteLineGroup quoteLineGroup = listItem.QuoteLineGroup;
}
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    quoteAction "github.com/chargebee/chargebee-go/v3/actions/quote"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := quoteAction.QuoteLineGroupsForQuote("7", nil).ListRequest()
    if err != nil {
        fmt.Println(err)
    } else {
        for idx := 0; idx < len(res.List); idx++ {
            QuoteLineGroup := res.List[idx].QuoteLineGroup
        }
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.QuoteQuoteLineGroupsForQuoteRequest{}
  res, err := client.Quote.QuoteLineGroupsForQuote("7", req)
      if err != nil {
        fmt.Println(err)
    } else {
        for idx := 0; idx < len(res.List); idx++ {
            QuoteLineGroup := res.List[idx].QuoteLineGroup
        }
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;
import java.util.List;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        ListResult result = Quote.quoteLineGroupsForQuote("7").request();

        for (ListResult.Entry entry : result) {
            QuoteLineGroup quoteLineGroup = entry.quoteLineGroup();
        }
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.quote.params.QuoteLineGroupsForQuoteParams;
import com.chargebee.v4.models.quote.responses.QuoteLineGroupsForQuoteResponse;
import com.chargebee.v4.models.quoteLineGroup.QuoteLineGroup;
import java.util.List;

public class QuoteLineGroupsForQuote {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        QuoteLineGroupsForQuoteResponse response = client.quotes().quoteLineGroupsForQuote("7");
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.quote.quoteLineGroupsForQuote("7");
    result.list.forEach((entry) => {
        console.log(entry);
        const quoteLineGroup = entry.quote_line_group;
    });
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->quote()->quoteLineGroupsForQuote("7");
foreach($result->list as $entry) {
    $quoteLineGroup = $entry->quote_line_group;
}
```

#### Python

```python
from chargebee import Chargebee, Filters

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
entries = cb_client.Quote.quote_line_groups_for_quote("7")
for entry in entries.list:
    quote_line_group = entry.quote_line_group
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

list = ChargeBee::Quote.quote_line_groups_for_quote("7")

list.each do |entry|
  quote_line_group = entry.quote_line_group
end
```

## Sample Response

```json
{
  "list": [
    {
      "quote_line_group": {
        "amount_due": 4500,
        "amount_paid": 0,
        "charge_event": "immediate",
        "credits_applied": 0,
        "id": "qlg___test__8aszcSOcl7oQ2N",
        "line_item_discounts": {},
        "line_item_taxes": {},
        "line_items": [
          {
            "amount": 4000,
            "customer_id": "__test__8aszcSOcl7j12D",
            "date_from": 1517494516,
            "date_to": 1517494516,
            "description": "Encryption Charge USD Monthly",
            "discount_amount": 0,
            "entity_id": "encryption-charge-USD",
            "entity_type": "charge_item_price",
            "id": "__test__8aszcSOcl7oR2O",
            "is_taxed": false,
            "item_level_discount_amount": 0,
            "object": "line_item",
            "pricing_model": "flat_fee",
            "quantity": 1,
            "tax_amount": 0,
            "unit_amount": 4000
          },
          {..}
        ],
        "object": "quote_line_group",
        "sub_total": 4500,
        "taxes": {},
        "total": 4500,
        "version": 1
      }
    },
    {..}
  ]
}
```

## URL Format

**GET** https://[site].chargebee.com/api/v2/quotes/{quote-id}/quote_line_groups

## Input Parameters

- `limit` (optional, integer, default=10, min=1, max=100)
  The number of resources to be returned.

- `offset` (optional, string, max chars=1000)
  Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set `offset` to the value of `next_offset` obtained in the previous iteration of the API call.

## Returns

- `next_offset` (optional, string, max chars=1000)
  This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.

- `quote_line_group` (Quote line group object)
  Resource object representing quote\_line\_group
