Saltar al contenido principal
GET
/
v1
/
reports
/
{id}
/
download
Download a Report
curl --request GET \
  --url https://smart-templates.sandbox.midaz.io/v1/reports/{id}/download \
  --header 'X-Organization-id: <x-organization-id>'
"HTTP/1.1 200 OK \nContent-Type: text/html \nContent-Disposition: attachment; filename=\"report.html\"\n\n<!DOCTYPE html>\n<html lang=\"en\">                    \n  <head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Report: Financial Report</title>\n  </head>\n  <body>\n     <h1>Report: Financial Report</h1>\n    <p>Organization: XYZ Company Ltd</p>\n    <p>Ledger: Main Ledger</p>\n    <p>Date:30/04/2025</p>\n    <table border=\"1\">\n      <thead>\n        <tr>\n          <th>AccountID</th>\n          <th>Alias</th>\n          <th>Balance</th>\n          <th>TransactionID</th>\n          <th>TransactionStatus</th>\n          <th>Amount</th>\n          <th>AssetCode</th>\n          <th>Route</th>\n          <th>ConcatAccountLedger</th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr>\n          <td>12345</td>\n          <td>Checking Account</td>\n          <td>150.00</td>\n          <td>TXN001</td>\n          <td>Approved</td>\n          <td>50.00</td>\n          <td>BRL</td>\n          <td>Reveneus</td>\n          <td>Checking Account - Main Ledger</td>\n        </tr>\n        <tr>\n          <td>67890</td>\n          <td>Savings</td>\n          <td>250.00</td>\n          <td>TXN002</td>\n          <td>Approved</td>\n          <td>100.00</td>\n          <td>BRL</td>\n          <td>Investments</td>\n          <td>Savings - Main Ledger</td>\n        </tr>\n      </tbody>\n    </table>\n    <h2>Summary</h2>\n    <p>Total Accounts: 2</p>\n    <p>Total Amount: 150.00</p>\n    <p>Ledger Summary: Main Ledger - XYZ Company Ltd</p>\n  </body>\n</html>\n"

Headers

Authorization
string

The authorization token. Important: This header is required if your environment has the Acces Manager plugin enabled.

X-Organization-id
string
required

The unique identifier of the Organization associated with the request.

Path Parameters

id
string
required

Unique identifier for the report that you want to check.

Response

The successful response containing the rendered report and two headers:

  • Content-Type (string): Indicates the format of the returned report

    • Possible values: text/html, text/xml, text/csv, text/plain
    • Example: text/html
  • Content-Disposition (string): Suggests how the client should handle the file

    • Example: attachment; filename="report.html"

Note: The response examples illustrate possible outputs. In practice, you will only receive one format at a time, matching the Content-Type returned.

The response is of type string.

I