Reporting
Fetch Records Reporting
Extracts records from record reporting structures. Records represent the underlying data used in commission calculations—CRM deals, activities, and custom metrics. Use this endpoint for sales analytics, pipeline reports, commission audit trails and CRM data extraction. To read a data table, use /v2/data-tables//records.
GET
Fetch Records Reporting
Overview
This endpoint extracts records from record reporting structures. Records represent the underlying data used in commission calculations — CRM deals, activities, and custom metrics. Use this endpoint for:- Sales analytics and pipeline reports
- Commission audit trails (what deals contributed to commissions)
- CRM data extraction
Records = Details. This endpoint gives you the source data that flows
through Qobra’s calculations, not the final commission amounts.
To extract a data table as it was imported, before any calculation, use
fetch data table
records.
Only reporting tables from your company’s live environment are reachable.
A
table_id that belongs to a sandbox environment returns 404 Not Found,
even if the id was copied from the Qobra app while viewing a sandbox.Pagination
This endpoint uses ID-based pagination for consistent performance with large datasets.Basic pagination pattern
Filtering by modification date
Uselast_modified_after for incremental sync (only fetch new/updated records).
Selecting fields
The endpoint returns every field of the table by default. Passfields to receive only
the ones you need:
- The values are
api_keys, as listed byGET /v2/data-structures/{table_id}/fields, separated by commas. The keys above are examples: read yours from that endpoint. standard.idandstandard.source_idare always returned, whether you list them or not.- A record keeps the table’s order of fields, not the order of your list. Spaces around a key and duplicate keys are ignored.
next_urlkeeps your selection. If you build the next URL yourself fromnext_start_id, passfieldsagain.- Without
fields, nothing changes: every field is returned.
Why select fields
A page holds one value per field and per record, so fewer fields make faster and lighter pages. On a table of 186 fields, keeping 50 divides the server time of a page by about three and its compressed size by about four. For a full extraction of a wide table, list only the fields your warehouse uses.Unknown keys
A key the fields endpoint does not list returns400, naming every unknown
key:
fields, read the fields endpoint again and update your
list. A list left empty (fields=) returns 400 too.
How many fields fit in the URL
The server accepts request lines of up to 4,094 bytes. The rest of the URL (the path,start_id, limit and the date filters) takes about 300 bytes.
That leaves about 3,790 bytes for the value of fields. Count start_id
from your first call: next_url adds it to every next page. Each key costs its
length plus 3 bytes, the size of a comma once encoded (%2C).
Plan on about 70 fields with typical keys, and work it out for yours when they
are long.
Performance & best practices
-
Use ID-based pagination: Always use
next_urlfor large datasets. -
Incremental sync: Use
last_modified_afterfor efficiency. -
Use a limit of 2000: Optimal balance between network overhead and response time.
Authorizations
Path Parameters
Query Parameters
Comma-separated api_keys of the fields to return, as listed by /v2/data-structures/{table_id}/fields (e.g. datatable.amount,datatable.close_date). standard.id and standard.source_id are always returned. When omitted, every field is returned. A key the fields endpoint does not list returns 400.