Run an inline report definition synchronously
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/report/reports/run \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"dataset": "<string>",
"select": [
{
"field": "<string>",
"as": "<string>",
"distinct": false,
"tagName": "<string>",
"tagGroup": "<string>"
}
],
"filters": {
"and": "<array>",
"or": "<array>",
"not": null,
"field": "<string>",
"value": "<unknown>"
},
"groupBy": [
"<string>"
],
"orderBy": [
{
"field": "<string>",
"direction": "asc"
}
],
"limit": 123
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/report/reports/run"
payload = {
"dataset": "<string>",
"select": [
{
"field": "<string>",
"as": "<string>",
"distinct": False,
"tagName": "<string>",
"tagGroup": "<string>"
}
],
"filters": {
"and": "<array>",
"or": "<array>",
"not": None,
"field": "<string>",
"value": "<unknown>"
},
"groupBy": ["<string>"],
"orderBy": [
{
"field": "<string>",
"direction": "asc"
}
],
"limit": 123
}
headers = {
"X-Auth-Token": "<api-key>",
"X-Org-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Auth-Token': '<api-key>',
'X-Org-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
dataset: '<string>',
select: [
{
field: '<string>',
as: '<string>',
distinct: false,
tagName: '<string>',
tagGroup: '<string>'
}
],
filters: {
and: '<array>',
or: '<array>',
not: null,
field: '<string>',
value: '<unknown>'
},
groupBy: ['<string>'],
orderBy: [{field: '<string>', direction: 'asc'}],
limit: 123
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/report/reports/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.flowpayroll.ai/v1/report/reports/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset' => '<string>',
'select' => [
[
'field' => '<string>',
'as' => '<string>',
'distinct' => false,
'tagName' => '<string>',
'tagGroup' => '<string>'
]
],
'filters' => [
'and' => '<array>',
'or' => '<array>',
'not' => null,
'field' => '<string>',
'value' => '<unknown>'
],
'groupBy' => [
'<string>'
],
'orderBy' => [
[
'field' => '<string>',
'direction' => 'asc'
]
],
'limit' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>",
"X-Org-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.flowpayroll.ai/v1/report/reports/run"
payload := strings.NewReader("{\n \"dataset\": \"<string>\",\n \"select\": [\n {\n \"field\": \"<string>\",\n \"as\": \"<string>\",\n \"distinct\": false,\n \"tagName\": \"<string>\",\n \"tagGroup\": \"<string>\"\n }\n ],\n \"filters\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": null,\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"groupBy\": [\n \"<string>\"\n ],\n \"orderBy\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"asc\"\n }\n ],\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("X-Org-Id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.flowpayroll.ai/v1/report/reports/run")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataset\": \"<string>\",\n \"select\": [\n {\n \"field\": \"<string>\",\n \"as\": \"<string>\",\n \"distinct\": false,\n \"tagName\": \"<string>\",\n \"tagGroup\": \"<string>\"\n }\n ],\n \"filters\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": null,\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"groupBy\": [\n \"<string>\"\n ],\n \"orderBy\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"asc\"\n }\n ],\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/report/reports/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<api-key>'
request["X-Org-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset\": \"<string>\",\n \"select\": [\n {\n \"field\": \"<string>\",\n \"as\": \"<string>\",\n \"distinct\": false,\n \"tagName\": \"<string>\",\n \"tagGroup\": \"<string>\"\n }\n ],\n \"filters\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": null,\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"groupBy\": [\n \"<string>\"\n ],\n \"orderBy\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"asc\"\n }\n ],\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"columns": [
{
"name": "<string>",
"type": "<string>"
}
],
"rows": [
[
"<unknown>"
]
],
"rowCount": 123,
"truncated": true,
"statusScope": "<string>",
"executionMs": 123
}{
"error": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
FlowPayroll JWT (raw token, no Bearer prefix)
Organisation to scope the request to. Required when the principal can access more than one organisation; optional for single-organisation principals (the authorizer resolves it automatically).
Body
The report-definition document — one contract drives sync runs, exports, saved definitions and schedules. See docs/API.md for the full rules.
A dataset name from GET /datasets
1 - 50 elementsShow child attributes
Show child attributes
Filter tree node: exactly one of and/or/not (branch, depth ≤ 3) or field+op (leaf). value is type-checked against the field.
Show child attributes
Show child attributes
Required iff any select entry aggregates; every plain select entry must appear here, referenced by field name or alias
Show child attributes
Show child attributes
Clamped to 10,000 (sync) / 5,000,000 (export)
Response
Report result set (row cap 10,000 — truncated flag set when hit)
Show child attributes
Show child attributes
Cell value; decimals arrive as strings
true → the sync row cap was hit; use an export
Which payslip statuses applied: FINAL (implicit default) | PREVIEW | ALL
Was this page helpful?
curl --request POST \
--url https://api.sandbox.flowpayroll.ai/v1/report/reports/run \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--header 'X-Org-Id: <api-key>' \
--data '
{
"dataset": "<string>",
"select": [
{
"field": "<string>",
"as": "<string>",
"distinct": false,
"tagName": "<string>",
"tagGroup": "<string>"
}
],
"filters": {
"and": "<array>",
"or": "<array>",
"not": null,
"field": "<string>",
"value": "<unknown>"
},
"groupBy": [
"<string>"
],
"orderBy": [
{
"field": "<string>",
"direction": "asc"
}
],
"limit": 123
}
'import requests
url = "https://api.sandbox.flowpayroll.ai/v1/report/reports/run"
payload = {
"dataset": "<string>",
"select": [
{
"field": "<string>",
"as": "<string>",
"distinct": False,
"tagName": "<string>",
"tagGroup": "<string>"
}
],
"filters": {
"and": "<array>",
"or": "<array>",
"not": None,
"field": "<string>",
"value": "<unknown>"
},
"groupBy": ["<string>"],
"orderBy": [
{
"field": "<string>",
"direction": "asc"
}
],
"limit": 123
}
headers = {
"X-Auth-Token": "<api-key>",
"X-Org-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Auth-Token': '<api-key>',
'X-Org-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
dataset: '<string>',
select: [
{
field: '<string>',
as: '<string>',
distinct: false,
tagName: '<string>',
tagGroup: '<string>'
}
],
filters: {
and: '<array>',
or: '<array>',
not: null,
field: '<string>',
value: '<unknown>'
},
groupBy: ['<string>'],
orderBy: [{field: '<string>', direction: 'asc'}],
limit: 123
})
};
fetch('https://api.sandbox.flowpayroll.ai/v1/report/reports/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.flowpayroll.ai/v1/report/reports/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataset' => '<string>',
'select' => [
[
'field' => '<string>',
'as' => '<string>',
'distinct' => false,
'tagName' => '<string>',
'tagGroup' => '<string>'
]
],
'filters' => [
'and' => '<array>',
'or' => '<array>',
'not' => null,
'field' => '<string>',
'value' => '<unknown>'
],
'groupBy' => [
'<string>'
],
'orderBy' => [
[
'field' => '<string>',
'direction' => 'asc'
]
],
'limit' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>",
"X-Org-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.flowpayroll.ai/v1/report/reports/run"
payload := strings.NewReader("{\n \"dataset\": \"<string>\",\n \"select\": [\n {\n \"field\": \"<string>\",\n \"as\": \"<string>\",\n \"distinct\": false,\n \"tagName\": \"<string>\",\n \"tagGroup\": \"<string>\"\n }\n ],\n \"filters\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": null,\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"groupBy\": [\n \"<string>\"\n ],\n \"orderBy\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"asc\"\n }\n ],\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("X-Org-Id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.flowpayroll.ai/v1/report/reports/run")
.header("X-Auth-Token", "<api-key>")
.header("X-Org-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataset\": \"<string>\",\n \"select\": [\n {\n \"field\": \"<string>\",\n \"as\": \"<string>\",\n \"distinct\": false,\n \"tagName\": \"<string>\",\n \"tagGroup\": \"<string>\"\n }\n ],\n \"filters\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": null,\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"groupBy\": [\n \"<string>\"\n ],\n \"orderBy\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"asc\"\n }\n ],\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.flowpayroll.ai/v1/report/reports/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<api-key>'
request["X-Org-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset\": \"<string>\",\n \"select\": [\n {\n \"field\": \"<string>\",\n \"as\": \"<string>\",\n \"distinct\": false,\n \"tagName\": \"<string>\",\n \"tagGroup\": \"<string>\"\n }\n ],\n \"filters\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": null,\n \"field\": \"<string>\",\n \"value\": \"<unknown>\"\n },\n \"groupBy\": [\n \"<string>\"\n ],\n \"orderBy\": [\n {\n \"field\": \"<string>\",\n \"direction\": \"asc\"\n }\n ],\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"columns": [
{
"name": "<string>",
"type": "<string>"
}
],
"rows": [
[
"<unknown>"
]
],
"rowCount": 123,
"truncated": true,
"statusScope": "<string>",
"executionMs": 123
}{
"error": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}