# TaxSessionsPublicController_DownloadReturnPDF

Downloads the generated tax return PDF.

`GET /api/v1/TaxSessions/DownloadReturnPDF`

**API:** Excise Platform API
**Tag:** Tax Sessions
**API Version:** v1
**Base URL:** https://excise.avalara.com
**Accepts:** `application/pdf`
**Authentication:** Basic (username + license key)

Source: https://developer.avalara.com/products/excise/api/methods/Tax%20Sessions/TaxSessionsPublicController_DownloadReturnPDF/

## Description

Downloads the generated tax return PDF for the specified tax session. The return must have been
generated before a PDF is available. Multi-segment returns can be downloaded individually by
segment number or merged into a single PDF. The filename follows the pattern:
ReturnCode_Period_Sequence.pdf (or _Merged.pdf when merging, or _SegmentDesc.pdf for specific segments).

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `x-company-id` | integer | header | Yes | Company ID that owns the data. |
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API. For more information on the client header, see Client Headers. |
| `headerId` | integer | query | Yes | The header id of the specified tax session. |
| `sequence` | integer | query | No | The sequence (Default: highest sequence for the HeaderId). |
| `segment` | integer | query | No | The segment number to download (Default: 1). Multi-segment returns have separate PDFs per form section. |
| `mergeSegments` | boolean | query | No | If true, merges all segments into a single PDF download (Default: false). |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Returns the PDF file content as application/pdf. |  |
| 400 | The HeaderId/Sequence is invalid, the return has not been generated, or PDF is unavailable. |  |
| 401 | Authentication credentials are incorrect. |  |

## Example Request

```bash
curl -X GET "https://excise.avalara.com/api/v1/TaxSessions/DownloadReturnPDF" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```