curl --request POST \
--url https://api.example.com/v1/risk-score/ppa-garaging \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"policy_holder_id": "<string>",
"vehicles": [
{
"vehicle_id": "<string>",
"garaging_location": {
"latitude": 36.890333,
"longitude": -95.967285
},
"body_type": "passenger-car"
}
],
"version": "v2",
"effective_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.example.com/v1/risk-score/ppa-garaging"
payload = {
"policy_holder_id": "<string>",
"vehicles": [
{
"vehicle_id": "<string>",
"garaging_location": {
"latitude": 36.890333,
"longitude": -95.967285
},
"body_type": "passenger-car"
}
],
"version": "v2",
"effective_date": "2023-11-07T05:31:56Z"
}
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({
policy_holder_id: '<string>',
vehicles: [
{
vehicle_id: '<string>',
garaging_location: {latitude: 36.890333, longitude: -95.967285},
body_type: 'passenger-car'
}
],
version: 'v2',
effective_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.example.com/v1/risk-score/ppa-garaging', 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.example.com/v1/risk-score/ppa-garaging",
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([
'policy_holder_id' => '<string>',
'vehicles' => [
[
'vehicle_id' => '<string>',
'garaging_location' => [
'latitude' => 36.890333,
'longitude' => -95.967285
],
'body_type' => 'passenger-car'
]
],
'version' => 'v2',
'effective_date' => '2023-11-07T05:31:56Z'
]),
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.example.com/v1/risk-score/ppa-garaging"
payload := strings.NewReader("{\n \"policy_holder_id\": \"<string>\",\n \"vehicles\": [\n {\n \"vehicle_id\": \"<string>\",\n \"garaging_location\": {\n \"latitude\": 36.890333,\n \"longitude\": -95.967285\n },\n \"body_type\": \"passenger-car\"\n }\n ],\n \"version\": \"v2\",\n \"effective_date\": \"2023-11-07T05:31:56Z\"\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.example.com/v1/risk-score/ppa-garaging")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy_holder_id\": \"<string>\",\n \"vehicles\": [\n {\n \"vehicle_id\": \"<string>\",\n \"garaging_location\": {\n \"latitude\": 36.890333,\n \"longitude\": -95.967285\n },\n \"body_type\": \"passenger-car\"\n }\n ],\n \"version\": \"v2\",\n \"effective_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/risk-score/ppa-garaging")
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 \"policy_holder_id\": \"<string>\",\n \"vehicles\": [\n {\n \"vehicle_id\": \"<string>\",\n \"garaging_location\": {\n \"latitude\": 36.890333,\n \"longitude\": -95.967285\n },\n \"body_type\": \"passenger-car\"\n }\n ],\n \"version\": \"v2\",\n \"effective_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"policy_holder_id": "<string>",
"vehicle_risk_scores": [
{
"vehicle_id": "<string>",
"vehicle_risk_score": 0.5,
"metadata": {
"effective_date": "2023-11-07T05:31:56Z",
"garaging_location": {
"latitude": 123,
"longitude": 123,
"geocoding_confidence": "high"
},
"coverage": [
{
"years": [
123
]
}
]
}
}
],
"errors": [
{
"vehicle_id": "<string>",
"effective_date": "2020-01-01T00:00:00",
"error_reason": "<string>",
"usstate": "OH"
}
],
"job_type": "ppa-garaging-risk-score",
"version": "v2"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Calculate Risk Score
curl --request POST \
--url https://api.example.com/v1/risk-score/ppa-garaging \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"policy_holder_id": "<string>",
"vehicles": [
{
"vehicle_id": "<string>",
"garaging_location": {
"latitude": 36.890333,
"longitude": -95.967285
},
"body_type": "passenger-car"
}
],
"version": "v2",
"effective_date": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.example.com/v1/risk-score/ppa-garaging"
payload = {
"policy_holder_id": "<string>",
"vehicles": [
{
"vehicle_id": "<string>",
"garaging_location": {
"latitude": 36.890333,
"longitude": -95.967285
},
"body_type": "passenger-car"
}
],
"version": "v2",
"effective_date": "2023-11-07T05:31:56Z"
}
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({
policy_holder_id: '<string>',
vehicles: [
{
vehicle_id: '<string>',
garaging_location: {latitude: 36.890333, longitude: -95.967285},
body_type: 'passenger-car'
}
],
version: 'v2',
effective_date: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.example.com/v1/risk-score/ppa-garaging', 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.example.com/v1/risk-score/ppa-garaging",
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([
'policy_holder_id' => '<string>',
'vehicles' => [
[
'vehicle_id' => '<string>',
'garaging_location' => [
'latitude' => 36.890333,
'longitude' => -95.967285
],
'body_type' => 'passenger-car'
]
],
'version' => 'v2',
'effective_date' => '2023-11-07T05:31:56Z'
]),
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.example.com/v1/risk-score/ppa-garaging"
payload := strings.NewReader("{\n \"policy_holder_id\": \"<string>\",\n \"vehicles\": [\n {\n \"vehicle_id\": \"<string>\",\n \"garaging_location\": {\n \"latitude\": 36.890333,\n \"longitude\": -95.967285\n },\n \"body_type\": \"passenger-car\"\n }\n ],\n \"version\": \"v2\",\n \"effective_date\": \"2023-11-07T05:31:56Z\"\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.example.com/v1/risk-score/ppa-garaging")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"policy_holder_id\": \"<string>\",\n \"vehicles\": [\n {\n \"vehicle_id\": \"<string>\",\n \"garaging_location\": {\n \"latitude\": 36.890333,\n \"longitude\": -95.967285\n },\n \"body_type\": \"passenger-car\"\n }\n ],\n \"version\": \"v2\",\n \"effective_date\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/risk-score/ppa-garaging")
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 \"policy_holder_id\": \"<string>\",\n \"vehicles\": [\n {\n \"vehicle_id\": \"<string>\",\n \"garaging_location\": {\n \"latitude\": 36.890333,\n \"longitude\": -95.967285\n },\n \"body_type\": \"passenger-car\"\n }\n ],\n \"version\": \"v2\",\n \"effective_date\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"policy_holder_id": "<string>",
"vehicle_risk_scores": [
{
"vehicle_id": "<string>",
"vehicle_risk_score": 0.5,
"metadata": {
"effective_date": "2023-11-07T05:31:56Z",
"garaging_location": {
"latitude": 123,
"longitude": 123,
"geocoding_confidence": "high"
},
"coverage": [
{
"years": [
123
]
}
]
}
}
],
"errors": [
{
"vehicle_id": "<string>",
"effective_date": "2020-01-01T00:00:00",
"error_reason": "<string>",
"usstate": "OH"
}
],
"job_type": "ppa-garaging-risk-score",
"version": "v2"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Unique identifier for the policyholder.
"policy-holder-123"
List of vehicles with their garaging locations. Max 50 vehicles per request.
1 - 50 elementsShow child attributes
Show child attributes
Version of the risk scoring model used.
v1, v2 Start date of the policy. Defaults to the current date and time unless overridden, typically for backtesting. Will not pull in data after this date.
Response
Successful Response
Unique identifier for the policyholder.
"policy-holder-123"
Risk scores for each vehicle based on their garaging locations.
Show child attributes
Show child attributes
Any vehicles that could not be scored.
Show child attributes
Show child attributes
null
Type of job that was run.
"ppa-garaging-risk-score""ppa-garaging-risk-score"
Version of the risk scoring model used.
v1, v2 "v1"
"v2"

