Risk profiles

A risk profile ties a client to one or more lines of business on a team. You can list and create risk profiles, then add drivers, vehicles, and notes. Profiles created through the API are saved as drafts.

There is no update or delete endpoint for the risk profile itself. Archive the client to archive related risk profiles.

The risk profile model

Properties

  • Name
    id
    Type
    integer
    Description

    Unique identifier for the risk profile.

  • Name
    description
    Type
    string
    Description

    Summary such as #9 - (DRAFT) Frank McCallister - HOME | AUTO.

  • Name
    team_id
    Type
    integer
    Description

    Team that owns the risk profile.

  • Name
    client_id
    Type
    integer
    Description

    Primary client.

  • Name
    co_client_id
    Type
    integer
    Description

    Co-client, when set.

  • Name
    requested_at
    Type
    date
    Description

    Requested date, YYYY-MM-DD.

  • Name
    needed_at
    Type
    date
    Description

    Needed-by date. Defaults to today when omitted on create.

  • Name
    notes
    Type
    string
    Description

    Notes on the risk profile.

  • Name
    send_to_virtual_assistant
    Type
    boolean
    Description

    Whether the profile is sent to the virtual assistant.

  • Name
    virtual_assistant_notes
    Type
    string
    Description

    Notes for the virtual assistant.

  • Name
    send_to_brokers
    Type
    boolean
    Description

    Whether the profile is sent to brokers.

  • Name
    target_premium_cents
    Type
    integer
    Description

    Target premium in cents.

  • Name
    target_premium_dollars
    Type
    number
    Description

    Target premium in dollars.

  • Name
    broker_notes
    Type
    string
    Description

    Notes for brokers.

  • Name
    is_copy
    Type
    boolean
    Description

    Whether this profile was copied from another.

  • Name
    type_of_business
    Type
    string
    Description

    new_business or renewal_rewrite.

  • Name
    return_user
    Type
    object
    Description

    User who should receive quotes: id, name, and email.

  • Name
    customer_service_representative
    Type
    object
    Description

    Customer service representative: id, name, and email.

  • Name
    producer
    Type
    object
    Description

    Producer: id, name, and email.

  • Name
    client
    Type
    object
    Description

    Primary client. See Clients.

  • Name
    co_client
    Type
    object
    Description

    Co-client, when loaded.

  • Name
    insurances
    Type
    array
    Description

    Insurance rows. Each row has insurance_type (home, auto, or umbrella) and form_data.

  • Name
    other_lead_source
    Type
    string
    Description

    Lead source copied from the client.

  • Name
    lead_source
    Type
    string
    Description

    AgencyZoom lead source from the client.

  • Name
    custom_questions
    Type
    object
    Description

    Custom question answers.

  • Name
    custom_forms_form_data
    Type
    object
    Description

    Form data captured from a custom quote form.

  • Name
    insurances_duplicated
    Type
    array
    Description

    Insurance types that were duplicated onto this profile.

  • Name
    va_email_content
    Type
    string
    Description

    Plain-text virtual assistant email, when the team has a template.

  • Name
    created_at
    Type
    timestamp
    Description

    When the risk profile was created. Lists are newest first.

  • Name
    updated_at
    Type
    timestamp
    Description

    When the risk profile was last updated.


GET/api/risk-profiles

List risk profiles

Returns up to 100 risk profiles, newest first. By default this includes drafts and non-drafts on every team the user belongs to.

Optional attributes

  • Name
    show
    Type
    string
    Description

    all (default), drafts, or non-drafts.

  • Name
    team_id
    Type
    integer
    Description

    Limit the list to one team. Omit it to include every team the user belongs to.

  • Name
    client_email
    Type
    string
    Description

    Exact email of the primary client.

  • Name
    insurances
    Type
    string
    Description

    One insurance type, or repeated values: home, auto, or umbrella. A profile matches when it has any of those types.

Request

GET
/api/risk-profiles
curl -G https://app.riskadvisor.insure/api/risk-profiles \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json" \
  -d show=non-drafts \
  -d [email protected] \
  --data-urlencode insurances[]=auto

Response

{
  "data": [
    {
      "id": 9,
      "description": "#9 - Frank McCallister - AUTO",
      "team_id": 3,
      "client_id": 42,
      "co_client_id": null,
      "type_of_business": "new_business",
      "return_user": {
        "id": 7,
        "name": "Kate McCallister",
        "email": "[email protected]"
      },
      "client": {
        "id": 42,
        "full_name": "Frank McCallister",
        "email": "[email protected]"
      },
      "insurances": [
        {
          "insurance_type": "auto",
          "form_data": {}
        }
      ]
    }
  ]
}

POST/api/risk-profiles

Create a risk profile

Creates a draft risk profile on the user's current team. client_id must already exist.

You can include nested insurances.home and insurances.auto objects. Those objects are stored as form data for the matching line. Drivers and vehicles can also be added later.

needed_at defaults to today. return_user_id defaults to the authenticated user. send_to_agency_zoom defaults to the team's AgencyZoom setting for that user.

Required attributes

  • Name
    insurance_type
    Type
    string
    Description

    home, auto, umbrella, or home_auto. home_auto creates home and auto insurance rows when both nested objects are present.

  • Name
    client_id
    Type
    integer
    Description

    Existing client id.

Optional attributes

  • Name
    co_client_id
    Type
    integer
    Description

    Existing co-client id.

  • Name
    return_user_id
    Type
    integer
    Description

    User who should receive quotes. Defaults to the authenticated user.

  • Name
    customer_service_rep_id
    Type
    integer
    Description

    Customer service representative user id.

  • Name
    producer_id
    Type
    integer
    Description

    Producer user id.

  • Name
    type_of_business
    Type
    string
    Description

    New Business or Renewal/Rewrite. Stored as new_business or renewal_rewrite.

  • Name
    requested_at
    Type
    date
    Description

    YYYY-MM-DD.

  • Name
    needed_at
    Type
    date
    Description

    YYYY-MM-DD. Defaults to today.

  • Name
    send_to_agency_zoom
    Type
    boolean
    Description

    Whether to send the profile to AgencyZoom.

  • Name
    insurances
    Type
    object
    Description

    Optional home and auto form-data objects.

Request

POST
/api/risk-profiles
curl https://app.riskadvisor.insure/api/risk-profiles \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"insurance_type":"auto","client_id":42,"type_of_business":"New Business"}'

Response

{
  "data": {
    "id": 9,
    "team_id": 3,
    "client_id": 42,
    "co_client_id": null,
    "type_of_business": "new_business",
    "description": "#9 - (DRAFT) Frank McCallister - AUTO"
  }
}

GET/api/risk-profiles/drivers

List drivers

Returns the drivers stored on the auto insurance of a risk profile. The response is a JSON array, not wrapped in data.

If the risk profile has no auto insurance, the API returns 404 and { "error": "No Auto Insurance for This RiskProfile" }.

Required attributes

  • Name
    risk_profile_id
    Type
    integer
    Description

    Risk profile id. The user must be allowed to update it.

Request

GET
/api/risk-profiles/drivers
curl -G https://app.riskadvisor.insure/api/risk-profiles/drivers \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json" \
  -d risk_profile_id=9

Response

[
  {
    "id": "6f1c0e4a-1d2b-4c3a-9e8f-112233445566",
    "first_name": "Frank",
    "last_name": "McCallister",
    "date_of_birth": "1980-01-15",
    "gender": "Male",
    "relationship": "Self",
    "rated": "Rated",
    "discounts": []
  }
]

POST/api/risk-profiles/drivers

Add a driver

Appends one driver to the auto insurance form data and returns that driver. The risk profile must already have auto insurance.

rated defaults to Rated. licensed_state defaults to the home or auto address state. date_of_birth must be ISO 8601 (1990-04-12T00:00:00+00:00) and is stored as YYYY-MM-DD.

Required attributes

  • Name
    risk_profile_id
    Type
    integer
    Description

    Risk profile id.

Optional attributes

  • Name
    first_name
    Type
    string
    Description

    First name.

  • Name
    middle_name
    Type
    string
    Description

    Middle name.

  • Name
    last_name
    Type
    string
    Description

    Last name.

  • Name
    date_of_birth
    Type
    string
    Description

    ISO 8601 date-time. Stored as YYYY-MM-DD.

  • Name
    occupation
    Type
    string
    Description

    Occupation.

  • Name
    gender
    Type
    string
    Description

    Male or Female.

  • Name
    relationship
    Type
    string
    Description

    Self, Spouse, Child, Domestic Partner, Parent, Relative, Employee, or Other.

  • Name
    education
    Type
    string
    Description

    High School, Some College, Associates, Bachelor, Masters, Doctorate, or Medical.

  • Name
    marital_status
    Type
    string
    Description

    Single, Engaged, Married, Domestic Partner, Separated, Divorced, or Widowed.

  • Name
    license_status
    Type
    string
    Description

    Valid, Permit, Expired, Suspended, Cancelled, Not Licensed, or Permanently Revoked.

  • Name
    license_number
    Type
    string
    Description

    License number.

  • Name
    licensed_state
    Type
    string
    Description

    Two-letter state, or Canada, Mexico, or International.

  • Name
    licensed_age
    Type
    string
    Description

    16, 17, 18, 19, 20, or 21+.

  • Name
    rated
    Type
    string
    Description

    Rated, Excluded, Non Rated, or Never Licensed. Defaults to Rated.

  • Name
    sr22_nullable
    Type
    boolean
    Description

    Whether an SR-22 applies.

  • Name
    is_delivery_driver
    Type
    boolean
    Description

    Whether the driver delivers for work.

  • Name
    is_app_driver
    Type
    boolean
    Description

    Whether the driver drives for an app.

  • Name
    discounts
    Type
    array
    Description

    Any of Good Student, Driver Training, and Away At School.

Request

POST
/api/risk-profiles/drivers
curl https://app.riskadvisor.insure/api/risk-profiles/drivers \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"risk_profile_id":9,"first_name":"Frank","last_name":"McCallister","gender":"Male","relationship":"Self","date_of_birth":"1980-01-15T00:00:00+00:00"}'

Response

{
  "id": "6f1c0e4a-1d2b-4c3a-9e8f-112233445566",
  "first_name": "Frank",
  "last_name": "McCallister",
  "date_of_birth": "1980-01-15",
  "gender": "Male",
  "relationship": "Self",
  "rated": "Rated",
  "discounts": []
}

GET/api/risk-profiles/vehicles

List vehicles

Returns the vehicles stored on the auto insurance of a risk profile, as a JSON array.

If the risk profile has no auto insurance, the API returns 404 and { "error": "No Auto Insurance for This RiskProfile" }.

Required attributes

  • Name
    risk_profile_id
    Type
    integer
    Description

    Risk profile id. The user must be allowed to update it.

Request

GET
/api/risk-profiles/vehicles
curl -G https://app.riskadvisor.insure/api/risk-profiles/vehicles \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json" \
  -d risk_profile_id=9

Response

[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "driver_id": "6f1c0e4a-1d2b-4c3a-9e8f-112233445566",
    "year": "2020",
    "make": "Honda",
    "model": "Civic",
    "vin": null,
    "usage": "Pleasure",
    "garaged_state": "TX",
    "annual_miles": 12000
  }
]

POST/api/risk-profiles/vehicles

Add a vehicle

Appends one vehicle to the auto insurance form data and returns that vehicle. The risk profile must already have auto insurance.

When vin is sent, year, make, and model are cleared so the VIN lookup can fill them. When one_way_miles is sent without usage, usage becomes To/From Work. purchased_at must be ISO 8601 and is stored as YYYY-MM-DD.

payments.lessor marks the vehicle as leased. payments.lienholder marks it as financed.

Required attributes

  • Name
    risk_profile_id
    Type
    integer
    Description

    Risk profile id.

Optional attributes

  • Name
    driver_id
    Type
    string
    Description

    UUID of a driver already on this risk profile.

  • Name
    vin
    Type
    string
    Description

    Vehicle identification number. When present, year, make, and model are not stored from this request.

  • Name
    year
    Type
    string
    Description

    Model year.

  • Name
    make
    Type
    string
    Description

    Make.

  • Name
    model
    Type
    string
    Description

    Model.

  • Name
    purchased_at
    Type
    string
    Description

    ISO 8601 date-time. Stored as YYYY-MM-DD.

  • Name
    garaged_state
    Type
    string
    Description

    Two-letter state where the vehicle is garaged. Defaults to the home or auto address state.

  • Name
    usage
    Type
    string
    Description

    Business, Farming, Pleasure, To/From Work, or To/From School.

  • Name
    annual_miles
    Type
    integer
    Description

    Miles driven per year.

  • Name
    one_way_miles
    Type
    integer
    Description

    One-way commute miles.

  • Name
    payments.lessor
    Type
    string
    Description

    Lessor name. Sets the vehicle as leased.

  • Name
    payments.lienholder
    Type
    string
    Description

    Lienholder name. Sets the vehicle as financed.

  • Name
    coverage.comprehensive_deductible
    Type
    string
    Description

    Comprehensive deductible, such as $500 or No Coverage.

  • Name
    coverage.full_glass
    Type
    boolean
    Description

    Whether full glass coverage is included.

  • Name
    coverage.collision_deductible
    Type
    string
    Description

    Collision deductible, such as $500 or No Coverage.

  • Name
    coverage.towing_coverage_amount
    Type
    string
    Description

    Towing amount, such as $50 or No Coverage.

  • Name
    coverage.car_rental_coverage_amount
    Type
    string
    Description

    Rental amount, such as $30/day or No Coverage.

  • Name
    coverage.stated_amount_coverage
    Type
    boolean
    Description

    Whether stated-amount coverage applies.

  • Name
    coverage.stated_amount
    Type
    integer
    Description

    Stated amount.

  • Name
    coverage.waiver_collision_damage
    Type
    boolean
    Description

    Whether collision damage is waived.

  • Name
    coverage.ma_waive_collision_ded
    Type
    boolean
    Description

    Massachusetts waive-collision-deductible flag.

  • Name
    coverage.ma_limited_collision_ded
    Type
    string
    Description

    Massachusetts limited collision deductible: No Coverage, FC/0 Ded, 300, 500, 1000, or 2000.

Request

POST
/api/risk-profiles/vehicles
curl https://app.riskadvisor.insure/api/risk-profiles/vehicles \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"risk_profile_id":9,"year":"2020","make":"Honda","model":"Civic","usage":"Pleasure","annual_miles":12000}'

Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "year": "2020",
  "make": "Honda",
  "model": "Civic",
  "usage": "Pleasure",
  "annual_miles": 12000,
  "payments": {
    "lease_vehicle": false,
    "finance_vehicle": false
  }
}

POST/api/risk-profiles/notes

Add notes

Appends notes to the risk profile. Existing notes are kept. Each addition is prefixed with Notes added via Zapier.

The response is the risk profile model, not the risk profile resource. Read id and notes from it.

Required attributes

  • Name
    risk_profile_id
    Type
    integer
    Description

    Risk profile id. The user must be allowed to update it.

  • Name
    notes
    Type
    string
    Description

    Text to append.

Request

POST
/api/risk-profiles/notes
curl https://app.riskadvisor.insure/api/risk-profiles/notes \
  -H "Authorization: Bearer {token}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"risk_profile_id":9,"notes":"Customer wants a quote this week."}'

Response

{
  "id": 9,
  "notes": "Notes added via Zapier\nCustomer wants a quote this week."
}