contract_version, today 3.0.0. Within version 3, Range only adds to the format. It never removes a field, renames one, or changes what one means. A change that would break a client gets a new major version and a new path.
Adding to the format is not breaking, so your client must be ready for it. Follow the rules below and it keeps working as v3 grows.
The rules
1
Lists of values are open
Every list of values in a response can grow:
severity, data_state, status, outcome, provider, delegated, entity categories, error codes and the others. Accept a value you do not know. Never reject the response because of one. Treat an unknown value as “needs review”, not as clean.The API reference marks these lists with x-extensible-enum. If you generate a client from the OpenAPI file, make sure it does not turn them into closed enums that fail on a new value.2
Every field is always there
A field is never left out of a response. When a value is not given, the field is
null (for example score or sanctioned). severity is never null: "unknown" means no risk tier was given, which is not the same as none.3
Find results by id, not by position
Results point at each other by
id. Use routing.served_result_id and decision.result_ids to find a result in results[]. Do not assume the answer is results[0] or the last result, and do not assume how many results there are.4
A field's meaning never changes
Once published, a field keeps its meaning. A new rule arrives as a new field or a new value. For example,
decision.basis served means the decision is the verdict of the one result that answered. When Range also checks its own sanctions lists beside another provider’s answer, the decision uses a new value, served-with-range-lists, instead of changing what served means. A future way of combining several providers would get another new value.5
Provider data lives only in results
What a provider said is only in
results[]: its verdict, attribution, sanctions listings, exposures, signals and totals. The top level holds the address, your request, the routing and the decision.6
Recorded screens never change
A screen is recorded once, as it was served, and never edited. A correction, a completed pending answer, or a new screen of the same address is a new screen with its own
screen_id. previous_screen_id is reserved for linking a screen to one it replaces, and is always null today.7
Versions are per result
mapping_version on each result names the table Range used to map that provider’s answer into this format. taxonomy_version names the version of the category list used for entity.category. Either can change without a new contract_version.8
Prices are not part of the format
Credit prices can change.
credits_charged on each result and meta.credits_charged report what was actually charged. Read them instead of hard-coding a price. See Credits.What else to expect
- New fields. New fields can appear on any object. Ignore fields you do not use.
- Deprecated fields keep working.
screening_provideron the config endpoints is deprecated in favor ofprovider_order, and is still accepted and returned. - Warnings.
results[].warningsare fixed strings. Match them as whole strings, and expect new ones. - Error messages. Branch on the error
code, never onmessage. See Errors. - Several providers at once. A screen with several
providersreturns every answer inresults[]withdecision: null, because Range does not merge verdicts. A way to combine them may come later as an opt-in with its owndecision.basis; without it,decisionstaysnull. Code that readsdecisionmust handlenull.
Reading recorded screens
Get a Recorded Screen returns a body in the shape of thecontract_version it was served under. Read result.contract_version first, and parse by its major version. A future major version will not be read correctly by a client written for 3.x.