Create Queued Report

This endpoint makes a request in our database for the criteria passed in the parameters, and then returns a GUID that can be used to pull the finished report. You can specify the criteria for the report using an object titled "criteria". Report IDs will persist for 30 days.

What You Can Group & Filter By

Property

Group By (GroupBy)

Filter By (Parameters)

day, week, month, hour

Yes

No

brandId, campaignId, optionId, creativeId, adTypeId, siteId, zoneId, publisherAccountId, countryCode, metroCode, keyword, regionCode, city, modelName, brandName, osMajorVersion, osMinorVersion, browser, browserMajorVersion, browserMinorVersion, formFactor

Yes

Yes

👍

Information

When grouping/filtering by region, you must also group/filter by countryCode.

Important Troubleshooting Notes

  1. Reports that are grouped by Keyword AND Country or Metro AND include a longer than 31 day time span are too large to be queued.

  2. StartDate and EndDate are additional deprecated body params that use MM/DD/YYYY format. However, if you do not have your dates in ISO 8601 format, it's possible to use these params instead. StartDateISO overrides StartDate if different.

  3. If you choose the GroupBy optionId, your report will also be grouped by RateTypeId. This is to break out data on separate lines if your flight changed RateType during the time period.

  4. FlightId will be returned as OptionId in the report.

  5. Reports that GroupBy hour cannot use a time frame longer than 35 days from the present.

  6. You cannot queue a report that groups by or filters by both Keywords and Region or City.

  7. Grouping by any "device" dimensions (modelName, brandName, osMajorVersion, osMinorVersion, browser, browserMajorVersion, browserMinorVersion, formFactor) does not work for requests. In other words, it is limited to performance reports and is currently not supported for inventory reports.

  8. For device reporting to be accurate, the client's UA needs to be passed through to Kevel via the User-Agent header if the customer is proxying events through their server. Failure to do so might cause inconsistent attribution, resulting in e.g. clicks without impressions, as one is not attributed to the same device.

Report Creation Errors

All errors are wrapped in an {"Error"} object.

Error Code

JSON Response

Error Description

500

"Server Error"

Report queuing is unavailable. Check the status page for details. If none are available, contact Kevel support

403

"Invalid API key"

No API key in request, or the key does not belong to an account

400

"Missing required parameter: criteria"

No criteria object in the request

400

{"Validation errors": {"JSON parse error": <error-detail-string>}}

Invalid JSON passed in the request. Includes a string with the parsing error

400

{"Validation errors": {"End": "Start must precede end"}}

The Start Date is after the End Date

400

{"Validation errors": {"StartDate": "StartDate must not be specified when StartDateISO is."}}

Both StartDate and StartDateISO are supplied

400

{"Validation errors": {"EndDate": "EndDate must not be specified when EndDateISO is."}}

Both EndDate and EndDateISO are supplied

400

{"Validation errors":{"StartDate":{"reason":"Invalid date format: 'xxxxx' is malformed at 'xxxxx'. Dates should be formatted like MM/dd/yyyy, e.g. 12/31/2016"}

StartDate or EndDate are not formatted correctly

400

{"Validation errors":{"StartDateISO":{"reason":"Invalid date format: 'xxxxx' is malformed at 'xxxxx'. Dates should be formatted like yyyy-MM-dd'T'HH:mm:SS, e.g. 2016-12-31T00:00:00"}

StartDateISO or EndDateISO are not formatted correctly

400

{"Validation errors":{"GroupBy":{"reason":"GroupBy not an array"}}}

A parameter (such as GroupBy) uses the wrong data type

400

{"Validation errors":{"GroupBy":{"reason":"GroupBy contains some elements that are not strings.","elements":[1234,"campaignId"]}}}

One of the GroupBy elements uses the wrong data type

400

{"Validation errors":{"GroupBy":{"fields":["flightid"],"reason":"Invalid GroupBy fields. Valid values must be one of 'adtypeid', 'brandid', 'campaignid', 'countrycode', 'creativeid', 'day', 'keyword', 'metrocode', 'month', 'optionid', 'publisheraccountid', 'siteid', 'week', 'zoneid'."}}}

Invalid GroupBy element

400

{"Validation errors":{"Parameters":{"reason":"Parameters not an array.","value":1234}}}

Parameters is not an object

400

{"Validation errors":{"Parameters":[{"param":{},"reason":"parameter object must have one property"}]}}

Parameters must have at least one property

400

{"Validation errors":{"Parameters":[{"name":"foo","reason":"invalid parameter name"}]}}

Parameter property does not exist

400

{"Validation errors":{"Parameters":[{"parameter":"SiteId","bad-value":"foo","reason":"id parameter value must be a positive integer"}]}}

Parameter value must be an integer

400

{"Validation errors":{"Parameters":[{"parameter":"metroCode","bad-value":1000,"reason":"metroCode, countryCode, and keyword values must be strings"}]}}

Parameter value must be a string (in the case of metroCode, countryCode, and keyword)

400

{"Validation errors":{"ReportTooLarge":"A report grouping by Keyword and either Country or Metro cannot exceed a one month (31 day) span."}}}

Reports that are grouped by Keyword and Country/Metro AND include a longer than 31 day time span cannot be queued.

400

{"Validation errors":{"ReportTooLarge":"An hourly report can only be requested for dates within the last 35 days."}}

Reports that use the hourly date group can only be requested for a period within the past 35 days.

400

{"Error":{"Validation errors":{"TimeZone":"Time Zones are not supported on keyword reports."}}}

Reports cannot use both keywords and non-GMT (UTC) timezones.

Language
Authentication
Header