> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Reporter quick start

> Upload a minimal template, generate your first report, and verify the downloaded output.

Use this quick start to generate one report and confirm that your Reporter installation works end to end. For a recurring production workflow, see [Using Reporter](/en/reporter/using-reporter).

For complete request and response schemas, use the [Reporter API quick start](/en/reference/reporter/reporter-developer-quick-start) and the linked API reference pages.

## Goal

***

You will:

1. Create a minimal `.tpl` template.
2. Upload it as an HTML template.
3. Generate a report without data filters.
4. Track the report until processing ends.
5. Download and verify the finished file.

## Prerequisites

***

You need:

* A running Reporter instance
* An authentication token, if Access Manager is enabled
* `curl`

Set the values used in the examples:

```bash theme={null}
export REPORTER_URL="https://reporter.example.com"
export TOKEN="your-access-token"
```

## Create a minimal template

***

Create `first-report.tpl` with static HTML content:

```html theme={null}
<!doctype html>
<html>
  <body>
    <h1>My first Reporter output</h1>
  </body>
</html>
```

Reporter templates always use the `.tpl` extension. The template content must match the selected output format. Reporter supports HTML, CSV, XML, PDF, and TXT outputs. For PDF output, write the template in HTML and set `outputFormat=PDF`.

For templates that read data, see [Template formats](/en/reporter/template-examples).

## Upload the template

***

Upload the file with the three required multipart fields: `template`, `outputFormat`, and `description`.

```bash theme={null}
curl --fail-with-body -X POST "$REPORTER_URL/v1/templates" \
  -H "Authorization: Bearer $TOKEN" \
  -F "template=@first-report.tpl" \
  -F "outputFormat=HTML" \
  -F "description=First Reporter output"
```

Save the returned template `id` as `TEMPLATE_ID`:

```bash theme={null}
export TEMPLATE_ID="returned-template-id"
```

See [Upload template](/en/reference/reporter/upload-template) for the complete operation contract.

## Generate the report

***

Create a report with the required `templateId` and `filters` fields. Use an empty object when you do not need filters.

```bash theme={null}
curl --fail-with-body -X POST "$REPORTER_URL/v1/reports" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"templateId\":\"$TEMPLATE_ID\",\"filters\":{}}"
```

Save the returned report `id` as `REPORT_ID`:

```bash theme={null}
export REPORT_ID="returned-report-id"
```

See [Create report](/en/reference/reporter/create-report) for filter syntax and the complete operation contract.

## Track processing

***

Check the report until it leaves `Processing`:

```bash theme={null}
curl --fail-with-body \
  -H "Authorization: Bearer $TOKEN" \
  "$REPORTER_URL/v1/reports/$REPORT_ID"
```

The active lifecycle is:

```text theme={null}
Processing -> Finished | Partial | Error
```

| Status       | Meaning                                       | What to do                                              |
| ------------ | --------------------------------------------- | ------------------------------------------------------- |
| `Processing` | Reporter is generating the output.            | Check again later.                                      |
| `Finished`   | Generation completed successfully.            | Download the report.                                    |
| `Partial`    | Generation completed with incomplete results. | Inspect the report details and application logs.        |
| `Error`      | Generation failed.                            | Inspect the error and application logs before retrying. |

See [Check report status](/en/reference/reporter/check-report-status) for the response schema.

## Download and verify the output

***

Download only when the report status is `Finished`:

```bash theme={null}
curl --fail-with-body \
  -H "Authorization: Bearer $TOKEN" \
  "$REPORTER_URL/v1/reports/$REPORT_ID/download" \
  -o first-report.html
```

Confirm that the file is not empty and contains the expected heading:

```bash theme={null}
test -s first-report.html
grep -F "My first Reporter output" first-report.html
```

See [Download report](/en/reference/reporter/download-report) for response headers and error details.

## Troubleshooting

***

| Problem                             | Check                                                                                                         |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| Template upload is rejected         | Include the `.tpl` file, `outputFormat`, and `description`; confirm that the file content matches the format. |
| Report creation is rejected         | Send both `templateId` and `filters`; use `{}` when no filter applies.                                        |
| Report remains in `Processing`      | Check Reporter worker and queue health, then inspect application logs.                                        |
| Report ends in `Partial` or `Error` | Inspect the report details, referenced data sources, and application logs before retrying.                    |
| Download is rejected                | Confirm that the report exists and has status `Finished`.                                                     |

## Next steps

***

* Follow [Using Reporter](/en/reporter/using-reporter) to design a reusable, recurring workflow.
* Learn how to reference configured data in [Template formats](/en/reporter/template-examples).
* Review the specialized guidance in [BACEN templates](/en/reporter/reporter-bacen-templates) before working with regulatory report structures.
* Use the [Reporter API quick start](/en/reference/reporter/reporter-developer-quick-start) for complete API examples.
