Skip to main content
The Reporter product supports multiple output formats, so you can generate exactly the file type you need, whether it’s HTML, XML, CSV, PDF or plain text. On this section, you’ll find practical examples of how to structure your .tpl files for each format. These examples are a great starting point to help you design templates that fit your use case, follow formatting rules, and get parsed correctly during generation.
The file content must follow the output format you need (HTML, XML, CSV, PDF or TXT), but make sure to save it with a .tpl extension. This is required for the template to work properly.

Tip for rendering a transaction receipt


To generate a transaction receipt using Reporter, you can send a request like this to the Create a Report endpoint:
{
  "templateId": "0196f99c-4d3e-73bc-b5d3-2a5bb1efbee4",
  "ledgerId": [
    "0196d97e-587e-76d8-a458-9d2517ed9aba"
  ],
  "filters": {
    "midaz_transaction": {
      "transaction": {
        "id": ["0196d983-a2c2-7d5a-a5b7-029fe0dcb710"]
      }
    }
  }
}

What does this filter do?

The filters field lets you limit the data used when rendering the template. In this case, you’re telling the system to use only the transaction with the ID 0196d983-a2c2-7d5a-a5b7-029fe0dcb710. That means your receipt will include just that one transaction — and the operations linked to it — keeping the output clean and focused.

What happens next?

Once the request is sent:
  • The API returns a reportId.
  • You can use this ID to check the status of the report.
  • When it’s ready, the report will be available for download.

Why it matters

This approach gives you clarity and control. Each receipt is generated in isolation, using the filters and templates you define.