# Retrieve a quote as PDF

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


[Idempotency Supported](/docs/api/idempotency)

Retrieves the quote as a PDF. The returned URL is secure, allows download and expires in 60 minutes.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/quotes/6/pdf \
     -X POST  \
     -u {site_api_key}:
```

#### .NET

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

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = Quote.Pdf("6").Request();

Download download = result.Download;
```

#### 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.Pdf("6", nil).Request()
    if err != nil {
        fmt.Println(err)
    } else {
        Download := res.Download
    }
}
```

#### 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.QuotePdfRequest{}
  res, err := client.Quote.Pdf("6", req)
      if err != nil {
        fmt.Println(err)
    } else {
        Download := res.Download
    }
}
```

#### Java

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

public class Sample {

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

        Download download = result.download();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.download.Download;
import com.chargebee.v4.models.quote.params.QuotePdfParams;
import com.chargebee.v4.models.quote.responses.QuotePdfResponse;

public class QuotePdf {

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

        QuotePdfResponse response = client.quotes().pdf("6");

        Download download = response.getDownload();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

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

try {
    const result = await chargebee.quote.pdf("6");

    console.log(result);
    const download = result.download;
} 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()->pdf("6");
$download = $result->download;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.Quote.pdf("6")
download = response.download
```

#### Ruby

```ruby
require 'chargebee'

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

result = ChargeBee::Quote.pdf("6")

download = result.download
```

## Sample Response

```json
{
  "download": {
    "download_url": "https://cb-local-downloads.s3.amazonaws.com/yourapp/quote/__test__8aszcSOcl6k02B.pdf?response-content-disposition=attachment%3Bfilename%3Dyourapp%2Fquote%2F__test__8aszcSOcl6k02B.pdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20210210T141516Z&X-Amz-SignedHeaders=host&X-Amz-Expires=599&X-Amz-Credential=AKIAJI4SN7ONHAOGLOGA%2F20210210%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=d7b1382e1dbe9de4cd1f900abb7df9596ebb54d936083da898ca3931ba91de5e",
    "object": "download",
    "valid_till": 1612967116
  }
}
```

## URL Format

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

## Input Parameters

- `consolidated_view` (optional, boolean, default=false)
  When true, the quote PDF has summary of all charges on the quote. When false, the quote PDF has a detailed view of charges grouped by charge event. This parameter does not affect one-time quotes.

- `disposition_type` (optional, enumerated string, default=attachment)
  Determines the pdf should be rendered as inline or attachment in the browser.
  Possible enum values:
    - `attachment`
      PDF is rendered as attachment in the browser
    - `inline`
      PDF is rendered as inline in the browser

## Returns

- `download` (Download object)
  Resource object representing download
