Fetch statement reporting data
curl --request GET \
--url https://api.qobra.co/v1/reporting \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.qobra.co/v1/reporting"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.qobra.co/v1/reporting', 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.qobra.co/v1/reporting",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.qobra.co/v1/reporting"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qobra.co/v1/reporting")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qobra.co/v1/reporting")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 4570,
"data": [
{
"id": "6545110915808dbcc34531ef",
"date": "2023-11-30",
"plan": "Great plan",
"user": {
"id": "5537a5b05d6e4824940e9e1bb9a5ebb8",
"email": "john-doe@company.com",
"name": "John Doe",
"role": "Sales Rep",
"currency": "EUR",
"calculation_currency": "USD",
"country": "France",
"code": "AO32ND56",
"...": "..."
},
"payment": 0,
"payment_currency": "USD",
"target": null,
"target_currency": "EUR",
"target_achievement": null,
"on_target_earning": null,
"on_target_earning_currency": "EUR",
"achievement": null,
"achievement_currency": "EUR",
"<custom-metric-1-api-key>": 10000,
"<custom-metric-1-api-key>_currency": "EUR",
"<custom-dimension-1-api-key>": [
"group_1",
"group_2"
]
},
{
"id": "6545110915808dbcc34531ee",
"date": "2023-11-30",
"plan": "Manual payments",
"user": {
"id": "5537a5b05d6e4824940e9e1bb9a5ebb8",
"email": "john-doe@company.com",
"name": "John Doe",
"role": "Sales Rep",
"currency": "EUR",
"calculation_currency": "USD",
"country": "France",
"code": "AO32ND56",
"...": "..."
},
"payment": 0,
"payment_currency": "USD",
"target": null,
"target_currency": "EUR",
"target_achievement": null,
"on_target_earning": null,
"on_target_earning_currency": "EUR",
"achievement": null,
"achievement_currency": "EUR",
"<custom-metric-1-api-key>": 10000,
"<custom-metric-1-api-key>_currency": "EUR",
"<custom-dimension-1-api-key>": [
"group_1",
"group_2"
]
},
"..."
],
"next": "https://api.qobra.co/v1/reporting?limit=2000&offset=2000"
}Reporting
Fetch statement reporting data
deprecated
Retrieves statement reporting data. A statement report holds your compensation’s data, consolidated around metrics on a statement level.
GET
/
v1
/
reporting
Fetch statement reporting data
curl --request GET \
--url https://api.qobra.co/v1/reporting \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.qobra.co/v1/reporting"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.qobra.co/v1/reporting', 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.qobra.co/v1/reporting",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.qobra.co/v1/reporting"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qobra.co/v1/reporting")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qobra.co/v1/reporting")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 4570,
"data": [
{
"id": "6545110915808dbcc34531ef",
"date": "2023-11-30",
"plan": "Great plan",
"user": {
"id": "5537a5b05d6e4824940e9e1bb9a5ebb8",
"email": "john-doe@company.com",
"name": "John Doe",
"role": "Sales Rep",
"currency": "EUR",
"calculation_currency": "USD",
"country": "France",
"code": "AO32ND56",
"...": "..."
},
"payment": 0,
"payment_currency": "USD",
"target": null,
"target_currency": "EUR",
"target_achievement": null,
"on_target_earning": null,
"on_target_earning_currency": "EUR",
"achievement": null,
"achievement_currency": "EUR",
"<custom-metric-1-api-key>": 10000,
"<custom-metric-1-api-key>_currency": "EUR",
"<custom-dimension-1-api-key>": [
"group_1",
"group_2"
]
},
{
"id": "6545110915808dbcc34531ee",
"date": "2023-11-30",
"plan": "Manual payments",
"user": {
"id": "5537a5b05d6e4824940e9e1bb9a5ebb8",
"email": "john-doe@company.com",
"name": "John Doe",
"role": "Sales Rep",
"currency": "EUR",
"calculation_currency": "USD",
"country": "France",
"code": "AO32ND56",
"...": "..."
},
"payment": 0,
"payment_currency": "USD",
"target": null,
"target_currency": "EUR",
"target_achievement": null,
"on_target_earning": null,
"on_target_earning_currency": "EUR",
"achievement": null,
"achievement_currency": "EUR",
"<custom-metric-1-api-key>": 10000,
"<custom-metric-1-api-key>_currency": "EUR",
"<custom-dimension-1-api-key>": [
"group_1",
"group_2"
]
},
"..."
],
"next": "https://api.qobra.co/v1/reporting?limit=2000&offset=2000"
}This endpoint is deprecated. Use the v2 endpoint instead. See v2
documentation
Pagination
This endpoint is paginated using parameters offset and limit The “next” key in the response allow you to easily follow pagination to get the next batch of usersVariable api keys
This endpoint is based on dynamic fields. This mean that all annotations that look like<variable-key>, will have to or will be replaced by their
actual API keys.Authorizations
Query Parameters
Optional (minimum:0 - maximum:9223372036854775807)
Required range:
0 <= x <= 9223372036854776000Optional (minimum:0 - maximum:2000): if set to 0 return total count only
Required range:
0 <= x <= 2000Was this page helpful?
⌘I