List Data Structures
curl --request GET \
--url https://api.qobra.co/v2/data-structures \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.qobra.co/v2/data-structures"
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/v2/data-structures', 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/v2/data-structures",
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/v2/data-structures"
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/v2/data-structures")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qobra.co/v2/data-structures")
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{
"data": [
{
"id": "507f1f77bcf86cd799439011",
"name": "Commission Statements",
"type": "statement_reporting",
"total_records": 12450,
"links": {
"fields": "https://api.qobra.co/v2/data-structures/507f1f77bcf86cd799439011/fields",
"records": "https://api.qobra.co/v2/reporting/507f1f77bcf86cd799439011/statements"
}
},
{
"id": "507f1f77bcf86cd799439012",
"name": "Opportunities (Record Reporting)",
"type": "record_reporting",
"total_records": 45230,
"links": {
"fields": "https://api.qobra.co/v2/data-structures/507f1f77bcf86cd799439012/fields",
"records": "https://api.qobra.co/v2/reporting/507f1f77bcf86cd799439012/records"
}
}
]
}{
"message": "You're trying to access resource you're not authorized to.",
"type": "UnauthorizedError"
}Discovery
List Data Structures
Retrieves all available data structures (statement reporting and record reporting) accessible through the API. Use this endpoint to discover what data you can extract.
GET
/
v2
/
data-structures
List Data Structures
curl --request GET \
--url https://api.qobra.co/v2/data-structures \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.qobra.co/v2/data-structures"
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/v2/data-structures', 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/v2/data-structures",
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/v2/data-structures"
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/v2/data-structures")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qobra.co/v2/data-structures")
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{
"data": [
{
"id": "507f1f77bcf86cd799439011",
"name": "Commission Statements",
"type": "statement_reporting",
"total_records": 12450,
"links": {
"fields": "https://api.qobra.co/v2/data-structures/507f1f77bcf86cd799439011/fields",
"records": "https://api.qobra.co/v2/reporting/507f1f77bcf86cd799439011/statements"
}
},
{
"id": "507f1f77bcf86cd799439012",
"name": "Opportunities (Record Reporting)",
"type": "record_reporting",
"total_records": 45230,
"links": {
"fields": "https://api.qobra.co/v2/data-structures/507f1f77bcf86cd799439012/fields",
"records": "https://api.qobra.co/v2/reporting/507f1f77bcf86cd799439012/records"
}
}
]
}{
"message": "You're trying to access resource you're not authorized to.",
"type": "UnauthorizedError"
}Overview
This endpoint returns all data structures (tables) available in your Qobra account. It’s the entry point for the V2 API — use it to discover what data you can extract.This is always your first call. It tells you what data structures exist and where to find their schemas and records.
Only reporting tables from your company’s live environment are returned.
Reporting tables that exist in a sandbox environment are not listed and their
ids cannot be used with the other V2 endpoints. See the
introduction for
details.
Understanding Data Structure Types
Thetype field indicates what kind of data the structure contains:
statement_reporting
statement_reporting
What it is: A statement report summarizes commission data at statement level.Typical use: payroll integration, high-level payout analysis per user, sales performance trackingRecord endpoint:
/v2/reporting/{id}/statementsContains fields like:- Statement user
- Statement date
- Payment
- Statement status (paid, pending, validated)
record_reporting
record_reporting
What it is: A record report summarizes commission data at transaction level (e.g. CRM opportunity level)Typical use: Commission analysis per opportunity, cost of sales and deal margin monitoring Record endpoint:
/v2/reporting/{id}/recordsContains fields like:- Deal/opportunity information
- Account details
- Close dates and amounts
- Commission amounts
Authorizations
Your Qobra API key. Generate it from Settings > API Keys in Qobra.
Response
Returns a list of all available data structures (statement reporting and record reporting) accessible through the API.
List of available data structures
Show child attributes
Show child attributes
Was this page helpful?