StabisoDocs

Reference data API

Decision tables

Deterministic rule tables (lease classification, reverse charge): fetch or evaluate.

Operation Summary
GET /v1/decision-tables List the decision tables
GET /v1/decision-tables/{table_id} Get a decision table
POST /v1/decision-tables/{table_id}/evaluate Evaluate a decision table

GET /v1/decision-tables

List the decision tables

The deterministic rule tables: VAT place of supply, lease classification, IFRS 16 exemptions, inventory cost formulas.

data lists full tables: typed inputs, outputs, ordered rules with their legal reference, and limitations. Fetch a table to run it yourself, or POST inputs to /{table_id}/evaluate to have the API run it. An unknown domain returns an empty list.

Authentication an API key, where the server requires one
Operation id list_tables_v1_decision_tables_get

Parameters

In Name Type Required Description
query domain string or null Only tables of this domain or its sub-domains, e.g. 'tax.indirect' or 'standards' (which includes 'standards.us_gaap'). Default: all.
query dataset_version string or null Pin the response to an archived dataset version (git SHA). Defaults to the current version. Also accepted as the X-Dataset-Version header. The version that answered is in meta.dataset_version; an archived version that does not exist gives 404.

Example request

curl "$DATAVNEXT_URL/v1/decision-tables" \
  -H "X-API-Key: $DATAVNEXT_KEY"

Responses

Status Meaning Body
200 OK Envelope_list_DecisionTable__
401 Missing or invalid API key. Error
404 Nothing found for the identifier, or the pinned dataset_version is not archived. Error
422 The request is invalid: {"detail": "…"} for a rule the service checks, or FastAPI's {"detail": [{"loc", "msg", "type"}]} for a malformed parameter or body. HTTPValidationError

Example response (shape)

{
  "data": [
    {
      "published_at": "2026-09-21",
      "updated_at": "2026-09-21",
      "sources": [
        null
      ],
      "id": "string",
      "name": "string",
      "description": "string",
      "domain": "string",
      "hit_policy": "first",
      "inputs": [
        null
      ],
      "outputs": [
        null
      ],
      "rules": [
        null
      ],
      "limitations": [
        "string"
      ]
    }
  ],
  "meta": {
    "dataset_version": "string",
    "as_of": "2026-09-21",
    "known_at": "2026-09-21",
    "sources": [
      {
        "authority": null,
        "url": null,
        "reference": null,
        "verified_at": null,
        "kind": null
      }
    ],
    "notes": [
      "string"
    ]
  }
}

GET /v1/decision-tables/{table_id}

Get a decision table

One decision table: inputs with their types and allowed values, outputs, and the ordered rules.

Rules are matched in order. The hit policy first stops at the first matching rule, collect returns every matching rule. A rule's when maps an input to a literal or to an operator map (in, not_in, ne, gt, gte, lt, lte); an input that is not listed matches anything. 404 for an unknown table id.

Authentication an API key, where the server requires one
Operation id get_table_v1_decision_tables__table_id__get

Parameters

In Name Type Required Description
path table_id string yes Decision table id, e.g. 'us_gaap.asc842.lessee_lease_classification' (see GET /v1/decision-tables).
query dataset_version string or null Pin the response to an archived dataset version (git SHA). Defaults to the current version. Also accepted as the X-Dataset-Version header. The version that answered is in meta.dataset_version; an archived version that does not exist gives 404.

Example request

curl "$DATAVNEXT_URL/v1/decision-tables/us_gaap.asc842.lessee_lease_classification" \
  -H "X-API-Key: $DATAVNEXT_KEY"

Responses

Status Meaning Body
200 OK Envelope_DecisionTable_
401 Missing or invalid API key. Error
404 Nothing found for the identifier, or the pinned dataset_version is not archived. Error
422 The request is invalid: {"detail": "…"} for a rule the service checks, or FastAPI's {"detail": [{"loc", "msg", "type"}]} for a malformed parameter or body. HTTPValidationError

Example response (shape)

{
  "data": {
    "published_at": "2026-09-21",
    "updated_at": "2026-09-21",
    "sources": [
      {
        "authority": null,
        "url": null,
        "reference": null,
        "verified_at": null,
        "kind": null
      }
    ],
    "id": "string",
    "name": "string",
    "description": "string",
    "domain": "string",
    "hit_policy": "first",
    "inputs": [
      {
        "name": null,
        "type": null,
        "description": null,
        "values": null,
        "required": null,
        "default": null
      }
    ],
    "outputs": [
      {
        "name": null,
        "description": null
      }
    ],
    "rules": [
      {
        "id": null,
        "when": null,
        "then": null,
        "reference": null,
        "note": null
      }
    ],
    "limitations": [
      "string"
    ]
  },
  "meta": {
    "dataset_version": "string",
    "as_of": "2026-09-21",
    "known_at": "2026-09-21",
    "sources": [
      {
        "authority": null,
        "url": null,
        "reference": null,
        "verified_at": null,
        "kind": null
      }
    ],
    "notes": [
      "string"
    ]
  }
}

POST /v1/decision-tables/{table_id}/evaluate

Evaluate a decision table

Run a decision table on the given inputs and return the matched rule.

data.matches lists the rules that matched, in table order: one with hit policy first, all with collect, none if no rule applies. Each match has the rule's outputs (for example the lease classification), its legal reference and a note. data.inputs echoes the inputs as they were interpreted, and meta.notes repeats the table's limitations. Refuses with 404 for an unknown table and with 422 for an unknown input name, a missing required input, or a value that does not fit the input's type or allowed values.

Authentication an API key, where the server requires one
Operation id evaluate_table_v1_decision_tables__table_id__evaluate_post

Parameters

In Name Type Required Description
path table_id string yes Decision table id, e.g. 'us_gaap.asc842.lessee_lease_classification' (see GET /v1/decision-tables).
query dataset_version string or null Pin the response to an archived dataset version (git SHA). Defaults to the current version. Also accepted as the X-Dataset-Version header. The version that answered is in meta.dataset_version; an archived version that does not exist gives 404.

Request body

application/json (required): object

Example request

curl -X POST "$DATAVNEXT_URL/v1/decision-tables/us_gaap.asc842.lessee_lease_classification/evaluate" \
  -H "X-API-Key: $DATAVNEXT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "transfers_ownership": false,
  "purchase_option_reasonably_certain": false,
  "lease_term_percent_of_economic_life": 80,
  "commences_near_end_of_economic_life": false,
  "pv_payments_percent_of_fair_value": 70,
  "specialized_no_alternative_use": false
}'

Responses

Status Meaning Body
200 OK Envelope_Evaluation_
401 Missing or invalid API key. Error
404 Nothing found for the identifier, or the pinned dataset_version is not archived. Error
422 The request is invalid: {"detail": "…"} for a rule the service checks, or FastAPI's {"detail": [{"loc", "msg", "type"}]} for a malformed parameter or body. HTTPValidationError

Example response (shape)

{
  "data": {
    "table_id": "us_gaap.asc842.lessee_lease_classification",
    "hit_policy": "first",
    "inputs": {
      "transfers_ownership": false,
      "purchase_option_reasonably_certain": false,
      "lease_term_percent_of_economic_life": "80",
      "commences_near_end_of_economic_life": false,
      "pv_payments_percent_of_fair_value": "70",
      "specialized_no_alternative_use": false
    },
    "matches": [
      {
        "rule_id": "major_part_of_economic_life",
        "outputs": {
          "classification": "finance",
          "criterion": "lease_term"
        },
        "reference": "ASC 842-10-25-2(c), 842-10-55-2(a)-(b)"
      }
    ]
  },
  "meta": {
    "dataset_version": "3f2a9c1b7d4e",
    "sources": [
      {
        "authority": "FASB",
        "url": "https://asc.fasb.org/842/showallinonepage",
        "reference": "ASC 842-10-25-2",
        "verified_at": "2026-09-29",
        "kind": "official"
      }
    ],
    "notes": [
      "Short-term lease election (ASC 842-20-25-2) is not evaluated.",
      "Paraphrased criteria; consult the Codification for the authoritative text."
    ]
  }
}

Schemas

DecisionInput

Field Type Required Description
name string yes Name of the input, as rules refer to it.
type "boolean" | "enum" | "number" | "string" yes string, boolean, number or enum.
description string or null What the input means; optional.
values array of string or null Allowed values for enum inputs.
required boolean Whether callers must supply the input; default true. (default true)
default decimal string or null Value used when an optional input is not supplied.

DecisionOutput

Field Type Required Description
name string yes Name of the output, as rules yield it.
description string or null What the output means; optional.

DecisionTable

Field Type Required Description
published_at string (date) or null When this record entered the dataset.
updated_at string (date) or null When its content last changed after publication.
sources array of Source yes Where the rules come from (at least one), e.g. the authority's page. (min items 1)
id string yes Identifier of the table.
name string yes Human-readable name.
description string yes What the table decides, in a sentence or two.
domain string yes e.g. 'tax.indirect', 'standards.us_gaap'.
hit_policy "collect" | "first" first: the first rule whose conditions all match decides. collect: every matching rule is returned. (default "first")
inputs array of DecisionInput yes The inputs rules can test.
outputs array of DecisionOutput yes What a rule yields.
rules array of DecisionRule yes The rules, tried in order; an input a rule leaves out matches anything. (min items 1)
limitations array of string Known gaps of the table, as sentences; may be empty.

Envelope_DecisionTable_

Field Type Required Description
data DecisionTable yes
meta Meta yes

Envelope_Evaluation_

Field Type Required Description
data Evaluation yes
meta Meta yes

Envelope_list_DecisionTable__

Field Type Required Description
data array of DecisionTable yes
meta Meta yes

Evaluation

Field Type Required Description
table_id string yes
hit_policy string yes
inputs object yes
matches array of RuleMatch yes

RuleMatch

Field Type Required Description
rule_id string yes
outputs object yes
reference string or null
note string or null
Stabiso, the Enterprise System of Record · generated from the code and its guides · release 6f03a5e846b3