Click [here for more info on Scheduled Reports](https://dev.kevel.co/docs/scheduled-reporting).

**Troubleshooting Notes**

1. All times are in GMT
2. If you schedule a fixed date report, you _must_ use a custom start and end date. `ToDate` time frames are not supported.

### Report Parameters

- **Name**  
  `string`  
  required  
  A friendly name for the report

- **LoginID**  
  `int32`  
  required  
  The `LoginId` for the user who should receive the report. This is the ID that's returned in the [User Management API](https://dev.adzerk.com/v1.0/reference/log-in-endpoints) endpoints. You can pull a list [here](https://dev.kevel.com/reference/list-logins)

- **KickoffDate**  
  `string`  
  required  
  The date to begin generating the report. We will use this date and the `RecurrenceType` to determine when the report should recur. Will accept a valid ISO 8601 date string.

- **SchedulingWindow**  
  `int32`  
  required  
  The timeframe in which the report should be delivered. All times are in GMT. Key `0 = Midnight to 6:00AM`, `1 = Between 6:00AM and Noon`, `2 = Between Noon and 6:00PM (18:00)`, `3 = Between 6:00PM (18:00) and Midnight`

- **RecurrenceType**  
  `int32`  
  required  
  How often the report should be delivered. We will use the `RecurrenceType` to adjust the `StartDate` and `EndDate` from the criteria object with each recurring report. Key: `0 = no recurrence`, `1 = daily`, `2 = weekly`, `3 = monthly`

- **Criteria**  
  `object`  
  required  
  Object. Use same body params from [Queued Reports](https://dev.adzerk.com/v1.0/reference/queued-reports). You'll effectively be placing the Queued Report fields into this object.

### Criteria Object

- **Emails**  
  `array of strings`  
  The [external email addresses](https://dev.adzerk.com/docs/scheduled-reporting#section-adding-additional-emails-to-report) to email with the completed report. Each email address is a string, like `"Emails":["1@2.com", "3@4.com"]`

- **ShowEvents**  
  `boolean`  
  Defaults to false  
  Display events (conversions, custom events, etc.). Default is `false`

- **ShowClickBucketing**  
  `boolean`  
  Defaults to false  
  Display clicks sorted by click bucketing. Default is `false`

- **ShowRevenue**  
  `boolean`  
  Defaults to false  
  Display revenue. Default is `false`

- **ShowConversions**  
  `boolean`  
  Defaults to false  
  Display conversions. Default is `false`

- **fixedDate**  
  `boolean`  
  Defaults to false  
  Prevents the time frame of the report from incrementing with each send. Default is `false`

### Example Request

```bash
curl -H 'X-Adzerk-ApiKey:<API-KEY>' -H "Content-Type:application/json" https://api.kevel.co/v1/report/schedule -X POST --data-binary '{"Name": "Test", "LoginId": 12345, "KickoffDate": "2018-11-30", "SchedulingWindow": 1, "RecurrenceType": 1, "Criteria": {"StartDate": "2017-11-28", "EndDate": "2017-11-28", "Parameters":[],"GroupBy": ["day"]}}'
```

### Sample Response

```json
{
  "Id": 1234,
  "Name": "Daily Report for Nike",
  "Criteria": {
    "StartDate": "2017-01-01T00:00:00",
    "EndDate": "2017-01-31T00:00:00",
    "Parameters": [
      {
        "siteId": 123456
      }
    ],
    "GroupBy": [
      "day"
    ],
    "Top30countries": false,
    "ReportDateFormat": "iso8601",
    "Exclude3rdParty": false,
    "IsTotal": false
  },
  "LoginId": 12345,
  "KickoffDate": "2017-01-01T00:00:00",
  "SchedulingWindow": 1,
  "RecurrenceType": 1,
  "IsDeleted": false
}
```

Updated 10 months ago.
