v1

latestOpenAPI 3.1.02026-07-2616636641.7 KB

Create Queued Report

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

post/v1/report/queue

Request body

StartDateISOstring required

The start date of the report in ISO 8601 format. Format: YYYY-MM-DDTHH:MM:SS, such as: '2016-06-01T00:00:00'

EndDateISOstring required

The end date of the report in ISO 8601 format. Format: YYYY-MM-DDTHH:MM:SS, such as: '2016-06-01T00:00:00'

GroupBystring[] required

Object containing list of strings. One is required: day, week, month, or empty array (for total). You can also optionally break down by additional parameters listed here. Such as "GroupBy": ["day","campaignId"].

TimeZonestring

Generates the report for a specific timezone from the list of valid timezone strings. Default is GMT (UTC). Ex. "TimeZone": "America/New_York"

CsvReportVisibilitystring

Specify whether the report will be publicly available via CSV download link. Allowed options: ("none", "public"), defaults to "none" for Queued Reports, "public" for Scheduled Reports. This is useful if you intend to run a Queued Report and then embed the (report_run_csv_url in /v2/reportruns) into an email / Self-Serve without authentication. (e.g. curl -XGET https://api.kevel.co/v2/report/download/a87ece06-28cd-4267-9314-e830af7eaa12/public?filename=foobar)

CsvColumnsstring[]

List of CSV columns to export in the generated CSV. If undefined or empty, all columns are exported.

ExcludeCsvColumnsstring[]

List of CSV columns to exclude from the exported CSV.

ReportDateFormat'us' | 'iso8601'

Date format to display in the "Date" column of the Report CSV, possible values: "us", "iso8601"

FlatRateAccrualMethod'startdateaccrual' | 'norevenueaccrual'

Strategy to use to when considering revenue from flat rate flights. If undefined, the network default is used.

  • startdateaccrual: Assign the revenue to the timeslice at the flight's start date
  • norevenueaccrual: Ignore the revenue from flat rate flights.

Response

200

Idstring

Example response

{
  "Id": "a87ece06-28cd-4267-9314-e830af7eaa12"
}