Reference data API
Shared schemas
Schemas used by more than one area, and the error bodies.
Schemas
DecisionRule
| Field |
Type |
Required |
Description |
id |
string |
yes |
Unique id of the rule within the table. |
when |
object |
|
Conditions on the inputs: an input name mapped to a literal or an operator map (in, not_in, ne, gt, gte, lt, lte). Every condition must hold; an empty object always matches. |
then |
object |
yes |
The outputs when the rule matches: an output name mapped to its value. |
reference |
string or null |
|
Where the rule comes from, e.g. a policy clause; optional. |
note |
string or null |
|
A remark on the rule; optional. |
Error
The body of a 401, 404 or 422 raised on purpose.
| Field |
Type |
Required |
Description |
detail |
string |
yes |
What went wrong, in a sentence. |
code |
string |
|
Names the error when a caller may word it itself: tax_category_needed (several rates or kinds of exemption match; details has country, date and choices, the categories of each), tax_rate_type_missing (rate_type, country, date) or tax_category_unknown (category, country, date, categories). |
details |
object |
|
The values code names. |
HTTPValidationError
| Field |
Type |
Required |
Description |
dataset_version |
string |
yes |
|
as_of |
string (date) or null |
|
|
known_at |
string (date) or null |
|
|
sources |
array of Source |
|
|
notes |
array of string |
|
|
Source
| Field |
Type |
Required |
Description |
authority |
string |
yes |
Publisher, e.g. 'European Commission', 'IRS'. |
url |
string (uri) |
yes |
Address of the source, an http or https URL. (min length 1) |
reference |
string or null |
|
Legal or paragraph reference, e.g. 'UStG §12', 'IAS 16.31'. |
verified_at |
string (date) or null |
|
Date a maintainer last checked the value against the source. |
kind |
"official" | "secondary" |
|
'official' = publisher of the law or data; 'secondary' = professional summary used where the official page could not be checked. (default "official") |
ValidationError
| Field |
Type |
Required |
Description |
loc |
array of string | integer |
yes |
|
msg |
string |
yes |
|
type |
string |
yes |
|
input |
any |
|
|
ctx |
object |
|
|