Report
A single report.
More info: see the get operation and the reports endpoint.
Fields
Field | Description |
---|---|
id
int
(required) |
Unique ID Example value:123 |
name
mlstring
(required) |
Name of the report Example value:"Financial overview" |
content
|
The actual report definition, see reports for more information. Example value:[ [ { "columns": [ { "caption": "Id", "width": "80px" }, { "caption": "Naam" } ], "query": "select id,namenl as name from ev.event", "type": "table" } ] ] |
defaultformat
string
(required) |
Reports can be generated as pdf or excel file. This field defines the default format. Possible values are ‘pdf’ or ‘excel’ Example value:"pdf" |
description
mlstring
(required) |
Description of the report Example value:"A financial overview per month for the last 12 months" |
emailbcc
string
(required) |
List of email recipients that should receive the report in bcc, separated by ; Example value:"info@mycompany.be;management@mycompany.be" |
emailcc
string
(required) |
List of email recipients that should receive the report in cc, separated by ; Example value:"info@mycompany.be;management@mycompany.be" |
emailrecipients
string
(required) |
List of email recipients that should receive the report, separated by ; Example value:"info@mycompany.be;management@mycompany.be" |
emailschedule
bool
(required) |
Indicates if this report is scheduled to be sent by mail at a certain interval |
emailscheduledayofmonth
int
(required) |
Day of the month the report will be sent. Example value:1 |
emailscheduledayofweek
int
(required) |
Day of the week the report will be sent. 1 = monday -> 7 = sunday Example value:7 |
emailschedulehourofday
int
(required) |
Hour of the day the report will be sent Example value:8 |
emailschedulequery
string
(required) |
Report will only be sent if the given query returns at least one result. Example value:"select * from op.basket where createdts > CURRENT_TIMESTAMP - INTERVAL '1 DAY'" |
options
ReportOptions
(required) |
Key-value array of options. Can contain: pdfpagesize, excelpagewidth, excelscaling, usesystemfont Example value:{ "pdfpagesize": "A4" } |
reporttypeid
int
(required) |
The report type defines the UI and parameters that are used when generating the report Example value:1 |
subtitles
string[]
(required) |
A list of subtitles for the report Example value:[ "Subtitle 1", "Subtitle 2" ] |
translations
map<string, string>
(required) |
A map of language codes to gettext .po files. Example value:{ "en": "...", "nl": "..." } |
usagetypeid
int
(required) |
Indicates where the report is being used. Possible values: 17001 (Sales), 17002 (External sales), 17003 (Hidden) Example value:17001 |
createdts
timestamp
(required) |
Created timestamp Example value:"2014-09-26 15:24:36" |
lastupdatets
timestamp
(required) |
Last updated timestamp Example value:"2014-09-26 15:24:36" |
Example
1{
2 "id": 123,
3 "name": "Financial overview",
4 "content": [
5 [
6 {
7 "columns": [
8 {
9 "caption": "Id",
10 "width": "80px"
11 },
12 {
13 "caption": "Naam"
14 }
15 ],
16 "query": "select id,namenl as name from ev.event",
17 "type": "table"
18 }
19 ]
20 ],
21 "defaultformat": "pdf",
22 "description": "A financial overview per month for the last 12 months",
23 "emailbcc": "info@mycompany.be;management@mycompany.be",
24 "emailcc": "info@mycompany.be;management@mycompany.be",
25 "emailrecipients": "info@mycompany.be;management@mycompany.be",
26 "emailschedule": false,
27 "emailscheduledayofmonth": 1,
28 "emailscheduledayofweek": 7,
29 "emailschedulehourofday": 8,
30 "emailschedulequery": "select * from op.basket where createdts > CURRENT_TIMESTAMP - INTERVAL '1 DAY'",
31 "options": {
32 "pdfpagesize": "A4"
33 },
34 "reporttypeid": 1,
35 "subtitles": [
36 "Subtitle 1",
37 "Subtitle 2"
38 ],
39 "translations": {
40 "en": "...",
41 "nl": "..."
42 },
43 "usagetypeid": 17001,
44 "createdts": "2014-09-26 15:24:36",
45 "lastupdatets": "2014-09-26 15:24:36"
46}