---
title: "aid_insight_service_generate_report"
method: POST
path: "/accounts/{aid}/insight/generate-report"
tags: ["generate-insight-report"]
---

# aid_insight_service_generate_report

`POST /accounts/{aid}/insight/generate-report`

Create a report from the report params, this bypasses the normal schedule
report setup and triggers report generation instantly

The "from" and "to" parameters needs to be populated with values matching
the provided schedule

NB! For internal use only!

**scopes**:
- admin:insight
- write:insight

## Path parameters

- `aid` string, ^[PT]{1}\d{8}$, required

## Request body

- union
  - InsightCheckoutTransactionsReportParams
    - `dataType` 'checkout/transactions', required — Service (source) and type of data used to create the report
    - `name` string, required — Custom name of the report. Will be shown in report listing and in the report filename
    - `emails` string[] — Emails will receive auto-generated report (or link to report if the report is to large)
    - `from` string, date-time, required — The start of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `to` string, date-time, required — The end of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `schedule` 'monthly' | 'weekly' | 'daily', required — Schedule for the report, how often will the report be generated
    - `language` 'no' | 'en', required — Report Language
    - `reportFilters` InsightTransactionReportFilter[] — List of filters used to filter the data for the report. Similar to SQL WHERE-clause. i.e, WHERE filter=value
      - `filter` 'store_id' | 'payout_destination_id', required — The property the data will be filtered on
      - `value` string, required — The value used to filter the data on
    - `contentType` 'application/pdf' | 'text/csv' — Content type for the report
  - InsightOrdersOrderOperationsReportParams
    - `dataType` 'orders/orderoperations', required — Service (source) and type of data used to create the report
    - `name` string, required — Custom name of the report. Will be shown in report listing and in the report filename
    - `emails` string[] — Emails will receive auto-generated report (or link to report if the report is to large)
    - `from` string, date-time, required — The start of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `to` string, date-time, required — The end of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `schedule` 'weekly' | 'twice-a-month' | 'daily', required — Schedule for the report, how often will the report be generated
    - `language` 'no' | 'en', required — Report Language
    - `reportFilters` InsightOrderReportFilter[] — List of filters used to filter the data for the report. Similar to SQL WHERE-clause. i.e, WHERE filter=value
      - `filter` 'operation_payout_destination' — The "field/column" the data will be filtered on
      - `value` string — The value the records must contain for the provided filter (field/column)
    - `contentType` 'text/csv' — Content type for the report
  - InsightWalletsTransactionsReportParams
    - `dataType` 'wallets/transactions', required — Service (source) and type of data used to create the report
    - `name` string, required — Custom name of the report. Will be shown in report listing and in the report filename
    - `emails` string[] — Emails will receive auto-generated report (or link to report if the report is to large)
    - `from` string, date-time, required — The start of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `to` string, date-time, required — The end of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `schedule` 'monthly' | 'weekly' | 'daily', required — Schedule for the report, how often will the report be generated
    - `language` 'no' | 'en', required — Report Language
    - `contentType` 'application/pdf' | 'text/csv' — Content type for the report

## Response `200`

Insight report params used to generate report

- union
  - InsightCheckoutTransactionsReportParams
    - `dataType` 'checkout/transactions', required — Service (source) and type of data used to create the report
    - `name` string, required — Custom name of the report. Will be shown in report listing and in the report filename
    - `emails` string[] — Emails will receive auto-generated report (or link to report if the report is to large)
    - `from` string, date-time, required — The start of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `to` string, date-time, required — The end of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `schedule` 'monthly' | 'weekly' | 'daily', required — Schedule for the report, how often will the report be generated
    - `language` 'no' | 'en', required — Report Language
    - `reportFilters` InsightTransactionReportFilter[] — List of filters used to filter the data for the report. Similar to SQL WHERE-clause. i.e, WHERE filter=value
      - `filter` 'store_id' | 'payout_destination_id', required — The property the data will be filtered on
      - `value` string, required — The value used to filter the data on
    - `contentType` 'application/pdf' | 'text/csv' — Content type for the report
  - InsightOrdersOrderOperationsReportParams
    - `dataType` 'orders/orderoperations', required — Service (source) and type of data used to create the report
    - `name` string, required — Custom name of the report. Will be shown in report listing and in the report filename
    - `emails` string[] — Emails will receive auto-generated report (or link to report if the report is to large)
    - `from` string, date-time, required — The start of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `to` string, date-time, required — The end of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `schedule` 'weekly' | 'twice-a-month' | 'daily', required — Schedule for the report, how often will the report be generated
    - `language` 'no' | 'en', required — Report Language
    - `reportFilters` InsightOrderReportFilter[] — List of filters used to filter the data for the report. Similar to SQL WHERE-clause. i.e, WHERE filter=value
      - `filter` 'operation_payout_destination' — The "field/column" the data will be filtered on
      - `value` string — The value the records must contain for the provided filter (field/column)
    - `contentType` 'text/csv' — Content type for the report
  - InsightWalletsTransactionsReportParams
    - `dataType` 'wallets/transactions', required — Service (source) and type of data used to create the report
    - `name` string, required — Custom name of the report. Will be shown in report listing and in the report filename
    - `emails` string[] — Emails will receive auto-generated report (or link to report if the report is to large)
    - `from` string, date-time, required — The start of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `to` string, date-time, required — The end of the data interval, must adhere to ISO 8601 dateformat (YYYY-MM-DD)
    - `schedule` 'monthly' | 'weekly' | 'daily', required — Schedule for the report, how often will the report be generated
    - `language` 'no' | 'en', required — Report Language
    - `contentType` 'application/pdf' | 'text/csv' — Content type for the report

## Other responses

- `400` — Bad / Invalid request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Unexpected Error

---

[API](https://skmtc.net/dintero/apis/account-management-api.md) · [All operations](https://skmtc.net/dintero/apis/account-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dintero/account-management-api/revisions/9b83a4199008/schema)
