# Download Report

## POST /download-report

> Returns base64 encoded file content depending on the export format (xlsx, csv).

```json
{"openapi":"3.0.0","info":{"title":"Reporting-Studio","version":"1.0.0"},"servers":[{"url":"https://api.reporting-studio.ads.sportradar.com","description":"Reporting Studio production"},{"url":"https://api.reporting-studio.staging.ads-dev.sportradar.com","description":"Reporting Studio staging"},{"url":"https://api.reporting-studio.dev.ads-dev.sportradar.com","description":"Reporting Studio development"},{"url":"http://localhost:3000/dev","description":"Local environment"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DownloadReportRequest":{"type":"object","properties":{"split_by":{"type":"array","items":{"$ref":"#/components/schemas/Dimension"}},"start_date":{"type":"string","format":"date","description":"example: 2017-07-21"},"end_date":{"type":"string","format":"date","description":"example: 2017-07-21"},"include_mappings":{"type":"number","enum":[0,1],"description":"0 - by default if one split_by field\n\n 1 - by default if more than one split_by field"},"timezone":{"type":"number"},"filters":{"type":"array","items":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/Dimension"},"case_insensitive":{"type":"number","description":"1 - case-insensitive\n\n 0 - case-sensitive\n\nDefault is 0"},"search_mappings":{"type":"number","description":"defines whether search should be performed in mappings.\n\n 0 - search should be performed in key field values only\n\n 1 - search should be performed in both key field values and their\n\n mappings 2 - search should be performed in key field mappings only.\n\n The default value is 0"},"value":{"type":"array","items":{"type":"string"}},"match":{"type":"string","enum":["equals","not equals","contains","not contains","beginswith","endswith"]}},"required":["name","value","match"]}},"data_filters":{"type":"array","items":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/Metric"},"value":{"type":"string"},"match":{"type":"string","enum":["<",">","<=",">="]}},"required":["name","value","match"]}},"filter_template":{"type":"string","description":"A string template defining priorities for filters specified in the filters POST argument. Can contain the following elements:\n\n opening/closing parentheses\n\n OR/AND operators\n\n x character as placeholder for filters\n\n Example: x OR (x AND x)."},"data_filter_template":{"type":"string","description":"A string template defining priorities for filters specified in the data_filters POST argument. Can contain the following elements:\n\n opening/closing parentheses\n\n OR/AND operators\n\n x character as placeholder for filters\n\n Example: x OR (x AND x)."},"order_by":{"type":"array","items":{"type":"object","properties":{"name":{"oneOf":[{"$ref":"#/components/schemas/Dimension"},{"$ref":"#/components/schemas/Metric"}]},"direction":{"type":"string","enum":["asc","desc"]},"mapping":{"type":"number","description":"defines whether to sort by key field ID or by key field mapping.\n\n Possible values:\n\n 0 - sort by key field ID\n\n 1 - sort by key field mapping)\n\n Default value is 0"}},"required":["name","direction"]}},"data_fields":{"type":"array","items":{"$ref":"#/components/schemas/Metric"}},"export_format":{"type":"string","enum":["xlsx","csv"]},"include_total":{"type":"number","enum":[0,1],"description":"defines whether total values are included.\n\n Possible values:\n\n 0 - total values are not included\n\n 1 - total values are included\n\n Default value is 0"}},"required":["split_by","start_date","end_date","export_format"]},"Dimension":{"type":"string","enum":["demand.advertiser_id","demand.campaign_id","demand.line_item_id","demand.holding_id","supply.page_domain","user.geo.country","user.geo.country_region","user.geo.city","demand.creative_id","demand.creative_size","supply.seller_network","user.agent.browser.name","user.agent.os.name","user.agent.device.type","supply.app_name","supply.app_id","inventory_type","demand.alternative_currency","granularity_year","granularity_quarter","granularity_month","granularity_week","granularity_day","granularity_hour","conversion_id","supply.content_type","is_fingerprinted_conv","demand.is_dco","mmp","supply.video_plcmt","supply.video_instream_position","supply.video_playback_methods","supply.video_player_skippable"],"description":"| Key                              | Description                    |\n|-----------------------------------|-------------------------------|\n| demand.advertiser_id              | Advertiser                    |\n| demand.campaign_id                | Campaign                      |\n| demand.line_item_id               | Line Item                     |\n| demand.holding_id                 | Holding                       |\n| supply.page_domain                | Page Domain                   |\n| user.geo.country                  | Country                       |\n| user.geo.country_region           | Region                        |\n| user.geo.city                     | City                          |\n| demand.creative_id                | Creative                      |\n| demand.creative_size              | Creative Size                 |\n| supply.seller_network             | SSP                           |\n| user.agent.browser.name           | Browser                       |\n| user.agent.os.name                | OS                            |\n| user.agent.device.type            | Device Type                   |\n| supply.app_name                   | App Name                      |\n| supply.app_id                     | App ID                        |\n| inventory_type                    | Inventory Type                |\n| demand.alternative_currency       | Alternative Currency          |\n| granularity_year                  | Year                          |\n| granularity_quarter               | Quarter                       |\n| granularity_month                 | Month                         |\n| granularity_week                  | Week                          |\n| granularity_day                   | Day                           |\n| granularity_hour                  | Hour                          |\n| conversion_id                     | Conversion                    |\n| supply.content_type               | Content Type                  |\n| is_fingerprinted_conv             | Fingerprint Conversion Flag   |\n| demand.is_dco                     | DCO Flag                      |\n| mmp                               | MMP                           |\n| supply.video_plcmt                | Video Placement               |\n| supply.video_instream_position    | Video In Stream Position      |\n| supply.video_playback_methods     | Video Playback Methods        |\n| supply.video_player_skippable     | Video Player Skippable        |\n"},"Metric":{"type":"string","enum":["payout.actual_adv_usd","payout.actual_adv_alternative_currency","imps","clicks","ctr","adv_ecpm","adv_ecpm_alt_currency","custom_column_20793","custom_column_20789","custom_column_20121","custom_column_25985","custom_column_44771","custom_column_58119","custom_column_20123","custom_column_25987","pixel.type.ftd","pixel.type.reg_started","pixel.type.reg_finished","pixel.type.ros","pixel.type.login","pixel.type.deposit","pixel.type.event","pixel.type.bet_placed","pixel.type.install","pixel.type.other","custom_column_25823","audience","calculated_puuid","bids","nobids","vast_starts","vast_25","vast_50","vast_7","vast_completes","pcc_amount","pvc_amount","custom_column_38427","custom_column_56314","custom_column_56318","custom_column_56368","custom_column_56446","custom_column_56447","custom_column_56448","custom_column_56449","custom_column_56450","custom_column_56451","custom_column_56452","custom_column_56453","custom_column_68919","custom_column_78339","adv_ecpc","pub_ecpc","viewable_imps","measurable_imps"],"description":"| Metric                              | Description                        |\n|--------------------------------------|------------------------------------|\n| payout.actual_adv_usd                | Media Spend (USD)                  |\n| payout.actual_adv_alternative_currency | Media Spend (Local)              |\n| imps                                | Impressions                        |\n| clicks                              | Clicks                             |\n| ctr                                 | CTR (%)                            |\n| adv_ecpm                            | eCPM (USD)                         |\n| adv_ecpm_alt_currency               | eCPM (Local)                       |\n| custom_column_20793                  | eCPA Deposit (USD)                |\n| custom_column_20789                  | eCPA Deposit (Local)              |\n| custom_column_20121                  | eCPA FTD (USD)                    |\n| custom_column_25985                  | eCPA FTD (Local)                  |\n| custom_column_44771                  | eCPA Reg started (USD)            |\n| custom_column_58119                  | eCPA Reg started (Local)          |\n| custom_column_20123                  | eCPA Reg finished (USD)           |\n| custom_column_25987                  | eCPA Reg finished (Local)         |\n| pixel.type.ftd                      | FTDs                               |\n| pixel.type.reg_started              | Reg started                        |\n| pixel.type.reg_finished             | Reg finished                       |\n| pixel.type.ros                      | Page Views                         |\n| pixel.type.login                    | Logins                             |\n| pixel.type.deposit                  | Deposits                           |\n| pixel.type.event                    | Matches                            |\n| pixel.type.bet_placed               | Conversion Amount Bet placed       |\n| pixel.type.install                  | App Installs                       |\n| pixel.type.other                    | Other Conversions                  |\n| custom_column_25823                  | Viewability (%)                   |\n| audience                            | Unique User (Cookie-based)         |\n| calculated_puuid                    | Unique User (Cookie-less)          |\n| bids                                | Bids                               |\n| nobids                              | Nobids                             |\n| vast_starts                         | Vast Start                         |\n| vast_25                             | Vast Viewed (25%)                  |\n| vast_50                             | Vast Viewed (50%)                  |\n| vast_75                             | Vast Viewed (75%)                  |\n| vast_completes                      | Vast Complete View                 |\n| pcc_amount                          | Post Click Conversions             |\n| pvc_amount                          | Post View Conversions              |\n| custom_column_38427                  | Third Party FTD                   |\n| custom_column_56314                  | Third Party Reg Start              |\n| custom_column_56318                  | Third Party Reg Finish             |\n| custom_column_56368                  | Third Party Bet Placed             |\n| custom_column_56446                  | eCPA (Third Party FTD) (Local)    |\n| custom_column_56447                  | eCPA (Third Party FTD) (USD)      |\n| custom_column_56448                  | eCPA (Third Party Reg Fin) (Local)|\n| custom_column_56449                  | eCPA (Third Party Reg Fin) (USD)  |\n| custom_column_56450                  | eCPA (Third Party Reg Start) (Local)|\n| custom_column_56451                  | eCPA (Third Party Reg Start) (USD)|\n| custom_column_56452                  | eCPA (Third Party Bet Placed) (Local)|\n| custom_column_56453                  | eCPA (Third Party Bet Placed) (USD)|\n| custom_column_68919                  | Frequency                         |\n| custom_column_78339                  | Reach                             |\n| adv_ecpc                            | eCPC (USD)                         |\n| custom_column_23353                  | eCPC (Local)                      |\n| win_rate                            | Win Rate (%)                       |\n| viewable_imps                       | Viewable Impressions               |\n| measurable_imps                     | Measurable Impressions             |\n"},"DownloadReportResponse":{"type":"string","description":"Base64 encoded file content."}}},"paths":{"/download-report":{"post":{"tags":["download-report"],"summary":"Returns base64 encoded file content depending on the export format (xlsx, csv).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadReportRequest"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/DownloadReportResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/ads/ad-s-marketing-cloud-api/reporting-studio-api/download-report.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
