Data structures
Get Fields Schema
Retrieves the complete schema (field names, types, formats) for a specific data structure. Essential for understanding what fields are available before extracting data. Accepts the id of a data table, of a reporting table or of a quota.
GET
Get Fields Schema
Overview
This endpoint returns the complete field schema for a specific data structure. It tells you what fields are available, their types, formats, and constraints, so your integration can adapt to your data structure.Schema discovery is a V2 superpower. You no longer need to guess what
fields exist. The API tells you.
This endpoint accepts the id of a data table, of a reporting table or of a
quota. Reporting tables and quotas are read from your company’s live
environment only: a
table_id that belongs to a sandbox environment returns
404 Not Found, even if the id was copied from the Qobra app. Discover valid
ids with
GET /v2/data-structures.Understanding API key prefixes
Everyapi_key starts with a prefix that indicates its origin:
Why it matters:
standard.fields are consistent across all Qobra accountscustom.anddatatable.fields are specific to your account- Always use
api_key(notname) as your code identifier
Quota fields are fixed
A quota always exposes the samestandard. fields, whatever its configuration:
standard.period carries a frequency field — monthly, quarterly,
semesterly or annually — which tells you how long one period covers and how
to read the period strings the values endpoint returns. It is the only place the
frequency is stated.
Only standard.value changes, and it follows the type of the quota:
These keys are the same for every quota. They do not derive from the
column mapping of an integration, so a quota synchronized from your CRM
exposes exactly the same keys as a quota filled in Qobra. Read the values with
GET /v2/quotas/{quota_id}/values,
and write them with
POST /v2/quotas/{quota_id}/values,
which takes standard.user, standard.date and standard.value.Data table fields
A data table exposes its two identifiers, then onedatatable. field for each
field of the table, in the table’s order:
A link to a record of another table is an
object with the reference format:
its value is { "id": …, "name": … }, where id is the source id of the linked
record. Read the values with
GET /v2/data-tables/{data_table_id}/records.
Field types reference
Type: number
Used for: Numeric values (integers, decimals, percentages)
Formats:
"percentage": Decimal percentage (0.85 = 85%)"float": Floating point number
Type: string
Formats:
"enum": Limited set of allowed values"period": A quota period, whosefrequencyfield says how long it coversnull(no format): Free text
Type: object
Used for: Nested structures (currency amounts, user reference, record reference)
Includes: properties field describing nested structure
In extracted data:
Schema hash: detecting changes
Theschema_hash is a cryptographic fingerprint of your schema. It changes when a field is added, removed, or modified.
Store
schema_hash after each successful sync to detect schema drift in
production.Recommended workflow: Fetch fields at the start of each extraction,
compare
schema_hash to your stored value, and only remap fields when it
changes.Best practices
- Cache schema during session: Fetch schema once, reuse for the entire extraction.
-
Always use api_key: Never use
namefor field identification. It does not display when extracting data. - Monitor schema_hash: Store hash and compare on each run to detect changes.
- Validate before extraction: Check for required fields before long extractions.
Authorizations
Path Parameters
Response
Successfully retrieved the fields schema for the data structure. Returns an object with the schema hash and an array of fields.