curl --request POST \
--url https://api.vectorshift.ai/v1/object-model/figures/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"context": {
"records": {
"filter": {
"conditions": [
{
"field": "stage",
"op": "eq",
"value": "diligence"
},
{
"field": "size",
"op": "gt",
"value": 5000000
}
],
"op": "all"
},
"type_id": "deal"
},
"verified_only": true
},
"definition_ids": [
"invested_capital"
],
"group_by_attribute": "sector"
}
'import requests
url = "https://api.vectorshift.ai/v1/object-model/figures/query"
payload = {
"context": {
"records": {
"filter": {
"conditions": [
{
"field": "stage",
"op": "eq",
"value": "diligence"
},
{
"field": "size",
"op": "gt",
"value": 5000000
}
],
"op": "all"
},
"type_id": "deal"
},
"verified_only": True
},
"definition_ids": ["invested_capital"],
"group_by_attribute": "sector"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
context: {
records: {
filter: {
conditions: [
{field: 'stage', op: 'eq', value: 'diligence'},
{field: 'size', op: 'gt', value: 5000000}
],
op: 'all'
},
type_id: 'deal'
},
verified_only: true
},
definition_ids: ['invested_capital'],
group_by_attribute: 'sector'
})
};
fetch('https://api.vectorshift.ai/v1/object-model/figures/query', 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.vectorshift.ai/v1/object-model/figures/query",
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([
'context' => [
'records' => [
'filter' => [
'conditions' => [
[
'field' => 'stage',
'op' => 'eq',
'value' => 'diligence'
],
[
'field' => 'size',
'op' => 'gt',
'value' => 5000000
]
],
'op' => 'all'
],
'type_id' => 'deal'
],
'verified_only' => true
],
'definition_ids' => [
'invested_capital'
],
'group_by_attribute' => 'sector'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.vectorshift.ai/v1/object-model/figures/query"
payload := strings.NewReader("{\n \"context\": {\n \"records\": {\n \"filter\": {\n \"conditions\": [\n {\n \"field\": \"stage\",\n \"op\": \"eq\",\n \"value\": \"diligence\"\n },\n {\n \"field\": \"size\",\n \"op\": \"gt\",\n \"value\": 5000000\n }\n ],\n \"op\": \"all\"\n },\n \"type_id\": \"deal\"\n },\n \"verified_only\": true\n },\n \"definition_ids\": [\n \"invested_capital\"\n ],\n \"group_by_attribute\": \"sector\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.vectorshift.ai/v1/object-model/figures/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"context\": {\n \"records\": {\n \"filter\": {\n \"conditions\": [\n {\n \"field\": \"stage\",\n \"op\": \"eq\",\n \"value\": \"diligence\"\n },\n {\n \"field\": \"size\",\n \"op\": \"gt\",\n \"value\": 5000000\n }\n ],\n \"op\": \"all\"\n },\n \"type_id\": \"deal\"\n },\n \"verified_only\": true\n },\n \"definition_ids\": [\n \"invested_capital\"\n ],\n \"group_by_attribute\": \"sector\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vectorshift.ai/v1/object-model/figures/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {\n \"records\": {\n \"filter\": {\n \"conditions\": [\n {\n \"field\": \"stage\",\n \"op\": \"eq\",\n \"value\": \"diligence\"\n },\n {\n \"field\": \"size\",\n \"op\": \"gt\",\n \"value\": 5000000\n }\n ],\n \"op\": \"all\"\n },\n \"type_id\": \"deal\"\n },\n \"verified_only\": true\n },\n \"definition_ids\": [\n \"invested_capital\"\n ],\n \"group_by_attribute\": \"sector\"\n}"
response = http.request(request)
puts response.read_body{
"attribute_sources": [
{
"attribute": "<string>",
"entity_id": "<string>",
"source": {
"kind": "<string>",
"verified": true
}
}
],
"buckets": [
{
"attribute_value": "<string>",
"is_other": true,
"subject_count": "<string>"
}
],
"excluded_group_keys": [
"<string>"
],
"exclusion_role_totals": [
{
"figures": [
{
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
}
],
"group_keys": [
"<string>"
],
"role": "EXCLUSION_ROLE_UNSPECIFIED"
}
],
"exclusions": [
{
"effect": {
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
},
"group_keys": [
"<string>"
],
"role": "EXCLUSION_ROLE_UNSPECIFIED",
"subject_id": "<string>",
"top_count": 123,
"without": {
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
}
}
],
"facts": [
{
"asserted_at": "2023-11-07T05:31:56Z",
"asserted_by": "<string>",
"asserted_by_label": "<string>",
"axis_values": {},
"derived": true,
"fact_id": "<string>",
"note": "<string>",
"quantity_id": "<string>",
"retracted": true,
"seq": "<string>",
"source_channel": "<string>",
"source_kind": "<string>",
"subject_id": "<string>",
"subject_label": "<string>",
"superseded_count": 123,
"valid_from": "2023-11-07T05:31:56Z",
"valid_to": "2023-11-07T05:31:56Z",
"value": 123,
"verified": true,
"world_id": "<string>"
}
],
"figures": [
{
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
}
],
"matched_records": "<string>",
"narrowed_to_reader": true,
"per_quantity": [
{
"quantity_id": "<string>",
"returned": "<string>",
"total": "<string>",
"truncated": true
}
],
"revisions": [
{
"record_revision": "<string>",
"recorded_at": "2023-11-07T05:31:56Z",
"recorded_by": "<string>",
"recorded_by_label": "<string>",
"source_channel": "<string>",
"value_json": "<string>"
}
],
"snapshot_id": "<string>",
"total_dates": "<string>",
"total_facts": "<string>",
"total_figures": "<string>",
"what_ifs": [
{
"delta": {
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
},
"detail": "<string>",
"effect": {
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
},
"label": "<string>"
}
]
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}Query figures
Computed values over a record selection (context.records) or named subjects: for the whole selection, per record (each_subject), by an attribute (group_by_attribute) or by period.
Not taken on this route yet, until how they combine is published: rank_by, limit, compare, subject_reduce, groups, at_fact_dates (400 unsupported_parameter). At most one of group_by_attribute, each_subject (400 conflicting_parameters).
Subjects chosen by a record selection (context.records) need object_model:records:read as well as this route’s scope: selecting records and counting the matches is record access. A selection does not combine with attribute_history or attribute_sources, which read the records they name (422 scope_conflict).
curl --request POST \
--url https://api.vectorshift.ai/v1/object-model/figures/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"context": {
"records": {
"filter": {
"conditions": [
{
"field": "stage",
"op": "eq",
"value": "diligence"
},
{
"field": "size",
"op": "gt",
"value": 5000000
}
],
"op": "all"
},
"type_id": "deal"
},
"verified_only": true
},
"definition_ids": [
"invested_capital"
],
"group_by_attribute": "sector"
}
'import requests
url = "https://api.vectorshift.ai/v1/object-model/figures/query"
payload = {
"context": {
"records": {
"filter": {
"conditions": [
{
"field": "stage",
"op": "eq",
"value": "diligence"
},
{
"field": "size",
"op": "gt",
"value": 5000000
}
],
"op": "all"
},
"type_id": "deal"
},
"verified_only": True
},
"definition_ids": ["invested_capital"],
"group_by_attribute": "sector"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
context: {
records: {
filter: {
conditions: [
{field: 'stage', op: 'eq', value: 'diligence'},
{field: 'size', op: 'gt', value: 5000000}
],
op: 'all'
},
type_id: 'deal'
},
verified_only: true
},
definition_ids: ['invested_capital'],
group_by_attribute: 'sector'
})
};
fetch('https://api.vectorshift.ai/v1/object-model/figures/query', 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.vectorshift.ai/v1/object-model/figures/query",
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([
'context' => [
'records' => [
'filter' => [
'conditions' => [
[
'field' => 'stage',
'op' => 'eq',
'value' => 'diligence'
],
[
'field' => 'size',
'op' => 'gt',
'value' => 5000000
]
],
'op' => 'all'
],
'type_id' => 'deal'
],
'verified_only' => true
],
'definition_ids' => [
'invested_capital'
],
'group_by_attribute' => 'sector'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.vectorshift.ai/v1/object-model/figures/query"
payload := strings.NewReader("{\n \"context\": {\n \"records\": {\n \"filter\": {\n \"conditions\": [\n {\n \"field\": \"stage\",\n \"op\": \"eq\",\n \"value\": \"diligence\"\n },\n {\n \"field\": \"size\",\n \"op\": \"gt\",\n \"value\": 5000000\n }\n ],\n \"op\": \"all\"\n },\n \"type_id\": \"deal\"\n },\n \"verified_only\": true\n },\n \"definition_ids\": [\n \"invested_capital\"\n ],\n \"group_by_attribute\": \"sector\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.vectorshift.ai/v1/object-model/figures/query")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"context\": {\n \"records\": {\n \"filter\": {\n \"conditions\": [\n {\n \"field\": \"stage\",\n \"op\": \"eq\",\n \"value\": \"diligence\"\n },\n {\n \"field\": \"size\",\n \"op\": \"gt\",\n \"value\": 5000000\n }\n ],\n \"op\": \"all\"\n },\n \"type_id\": \"deal\"\n },\n \"verified_only\": true\n },\n \"definition_ids\": [\n \"invested_capital\"\n ],\n \"group_by_attribute\": \"sector\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vectorshift.ai/v1/object-model/figures/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {\n \"records\": {\n \"filter\": {\n \"conditions\": [\n {\n \"field\": \"stage\",\n \"op\": \"eq\",\n \"value\": \"diligence\"\n },\n {\n \"field\": \"size\",\n \"op\": \"gt\",\n \"value\": 5000000\n }\n ],\n \"op\": \"all\"\n },\n \"type_id\": \"deal\"\n },\n \"verified_only\": true\n },\n \"definition_ids\": [\n \"invested_capital\"\n ],\n \"group_by_attribute\": \"sector\"\n}"
response = http.request(request)
puts response.read_body{
"attribute_sources": [
{
"attribute": "<string>",
"entity_id": "<string>",
"source": {
"kind": "<string>",
"verified": true
}
}
],
"buckets": [
{
"attribute_value": "<string>",
"is_other": true,
"subject_count": "<string>"
}
],
"excluded_group_keys": [
"<string>"
],
"exclusion_role_totals": [
{
"figures": [
{
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
}
],
"group_keys": [
"<string>"
],
"role": "EXCLUSION_ROLE_UNSPECIFIED"
}
],
"exclusions": [
{
"effect": {
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
},
"group_keys": [
"<string>"
],
"role": "EXCLUSION_ROLE_UNSPECIFIED",
"subject_id": "<string>",
"top_count": 123,
"without": {
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
}
}
],
"facts": [
{
"asserted_at": "2023-11-07T05:31:56Z",
"asserted_by": "<string>",
"asserted_by_label": "<string>",
"axis_values": {},
"derived": true,
"fact_id": "<string>",
"note": "<string>",
"quantity_id": "<string>",
"retracted": true,
"seq": "<string>",
"source_channel": "<string>",
"source_kind": "<string>",
"subject_id": "<string>",
"subject_label": "<string>",
"superseded_count": 123,
"valid_from": "2023-11-07T05:31:56Z",
"valid_to": "2023-11-07T05:31:56Z",
"value": 123,
"verified": true,
"world_id": "<string>"
}
],
"figures": [
{
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
}
],
"matched_records": "<string>",
"narrowed_to_reader": true,
"per_quantity": [
{
"quantity_id": "<string>",
"returned": "<string>",
"total": "<string>",
"truncated": true
}
],
"revisions": [
{
"record_revision": "<string>",
"recorded_at": "2023-11-07T05:31:56Z",
"recorded_by": "<string>",
"recorded_by_label": "<string>",
"source_channel": "<string>",
"value_json": "<string>"
}
],
"snapshot_id": "<string>",
"total_dates": "<string>",
"total_facts": "<string>",
"total_figures": "<string>",
"what_ifs": [
{
"delta": {
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
},
"detail": "<string>",
"effect": {
"as_of": "2023-11-07T05:31:56Z",
"as_of_earliest": "2023-11-07T05:31:56Z",
"at": "2023-11-07T05:31:56Z",
"basis": 123,
"change": 123,
"change_ratio": 123,
"coverage": {
"included": "<string>",
"subject_type_id": "<string>",
"total": "<string>"
},
"definition_id": "<string>",
"derived": true,
"error": "<string>",
"group_key": "<string>",
"index_key": "<string>",
"measure_kind": "<string>",
"not_applicable": "<string>",
"not_computable": "<string>",
"share": 123,
"source": {
"kind": "<string>",
"verified": true
},
"subject_id": "<string>",
"unit": "<string>",
"value": 123
},
"label": "<string>"
}
]
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}{
"code": "<string>",
"error": "<string>",
"status": "failed",
"details": {},
"path": "<string>",
"request_id": "<string>",
"result": {}
}Authorizations
An API key issued with object_model scopes: Authorization: Bearer sk_…. The scopes: object_model:records:read, object_model:records:write, object_model:facts:read, object_model:facts:write, object_model:model:read, object_model:model:configure, object_model:actions:run, object_model:changes:read. An operation's security lists the scopes it needs; several entries mean any one of them will do. A person field (ref(user), ref_list(user)) holds a user id: look people up by email or id with GET /v1/users, outside this API, with a key that also has users:read.
Body
What POST /figures/query takes. Not taken on this route yet, until how they combine is published: rank_by, limit, compare, subject_reduce, groups, at_fact_dates (400 unsupported_parameter). At most one of group_by_attribute, each_subject (400 conflicting_parameters).
One figure per period: year, quarter, month or day (calendar, UTC), or fiscal_year or fiscal_quarter (following the schema's fiscal_year_end_month). Each figure's at is its period's start. The periods span the window when it has both bounds, and otherwise the dates of the facts read. Leave it out, or send "", not to split by period: each figure then covers the whole window.
, year, fiscal_year, quarter, fiscal_quarter, month, day Response
Answered.
