# DownloadReport

Returns a pre-signed download URL for a report

`GET /reports/{reportId}/$download`

**API:** Avalara E-Invoicing API
**Tag:** Reports
**API Version:** 1.6
**Base URL:** https://api.sbx.avalara.com/einvoicing
**Authentication:** Bearer token

Source: https://developer.avalara.com/products/e-invoicing/api/v1.6/methods/Reports/DownloadReport/

## Description

Returns a pre-signed URL to download the report file when it is available. If the report has not yet been generated, a 404 (not found) is returned.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `avalara-version` | string | header | Yes | Header that specifies the API version to use (for example "1.6"). |
| `X-Avalara-Client` | string | header | No | Optional header for a client identifier string used for diagnostics (for example "Fingerprint"). |
| `X-Correlation-ID` | string | header | No | Optional correlation identifier provided by the caller to trace the call (for example "f3f0d19a-01a1-4748-8a58-f000d0424f43"). |
| `reportId` |  | path | Yes | The unique ID for this report as returned in a GET /reports response. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Returns a pre-signed URL to download the report. | `ReportDownloadResponse` |
| 401 | Unauthorized. |  |
| 403 | Forbidden. | `ForbiddenError` |
| 404 | Report not found or not yet available for download. | `NotFoundError` |

### 200 Response: `ReportDownloadResponse`

Returns a pre-signed URL to download the report file.

| Property | Type | Required | Description |
|---|---|---|---|
| `reportId` | string | No | The unique identifier of the report. Example: `ef96f5c1-2626-4efe-897d-b5d93fb8424b`. |
| `downloadUrl` | string | No | A pre-signed URL to download the report file. This URL is time-limited. Example: `https://storage.example.com/reports/ef96f5c1-2626-4efe-897d-b5d93fb8424b?signature=xyz`. |

## Example Request

```bash
curl -X GET "https://api.sbx.avalara.com/einvoicing/reports/{reportId}/$download" \
  -H "Authorization: Basic <credentials>" \
  -H "Accept: application/json"
```