raters:run, and your
organization needs access to run the program. Get a rating program
explains access and subscriptions.
1. Find a program
List rating programs and filter by state:programs has an id, its carrier, product and states, and access.canRun. Use a
program whose access.canRun is true. Then
list its versions and choose a version.
To find the program that rates a product in a state on a date, use
List which rating program versions rate a product in a state.
2. Read the input schema
Each version has its own input. The input is the program’s root record, such asPolicy, with its
related records (drivers, vehicles) nested inside it. Programs from different carriers ask for
different fields, so read the schema of the version you rate:
inputSchema and outputSchema as JSON Schema. Each field holds its type, its allowed
values, and its range. You or your tooling can build and check a request from inputSchema alone.
3. Rate
Rate a submission with the policy ininputs.
This example uses Effective’s synthetic effective.example-ca-ppa program:
200 response holds the outputs in result, in the shape of outputSchema, and the exact engine
that rated them:
result are JSON numbers with 64-bit float precision, about 15 significant digits. Keep programId, version and bundleId with each result:
together they identify the engine that rated it. The request changes nothing, so you can repeat it.
Errors
Every error has a stablecode and an error message. Rating errors also explain the cause:
In
violations, path locates the field in your input, value repeats what you sent, and
constraint is the rule it failed. violationsTruncated is true when there were more violations
than the response lists.
Rate a book in Python
To rate many policies, or the same book across several programs, use Relativities. It downloads each program and rates locally on the same native engine:Program.rate maps one shared book onto each carrier’s own input, so one book rates against every
program. See Rate a book with a program.