Create async request for an analytics report using a template
POST {{baseUrl}}/ad_accounts/:ad_account_id/templates/:template_id/reports?start_date=<date>&end_date=<date>&granularity=DAY
This takes a template ID and an optional custom timeframe and constructs an asynchronous report based on the template. It returns a token that you can use to download the report when it is ready.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
start_date | string | Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 2.5 years back from today. | |
end_date | string | Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 2.5 years past start date. | |
granularity | string | TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"report_status":"EXPIRED","token":"\u003cstring\u003e","message":"\u003cstring\u003e"}