WaiveCar / Waivecar

Waivecar
https://waivecar.com
0 stars 0 forks source link

License Verification - What is considered Valid vs Invalid by insurance #148

Open mattgi opened 8 years ago

mattgi commented 8 years ago

What are the insurers requirements to allow a rental?

A license check (from onfido) will come back with a list of outcomes:

{
  "created_at": "2015-02-02T17:21:06Z",
  "href": "/v1/checks/713b6223-9369-47eb-8cce-d7f3b3391361/reports/99d4cd0f-6665-4425-bd8b-f2d19e890262",
  "id": "99d4cd0f-6665-4425-bd8b-f2d19e890262",
  "name": "driving_record",
  "result": "consider",
  "status": "complete",
  "breakdown": {
    "driving_license": {
      "result": "clear"
    },
    "driving_restrictions": {
      "result": "clear"
    },
    "driving_violations": {
      "result": "consider"
    },
    "driving_accidents": {
      "result": "consider"
    }
  },
  "properties": {
    "full_name": "Alfred Nagy",
    "license_number": "1234567",
    "license_state": "MA",
    "license_status": "valid",
    "license_type": "non-commercial",
    "license_class": "C",
    "issued_date": "2008-01-01",
    "expiration_date": "2018-01-01",
    "restrictions": [],
    "accidents": [
      {
        "accident_date": "2010-01-01",
        "description": "property damage",
        "city": "Cambridge",
        "county": "Boston",
        "state": "MA",
        "points": null,
        "vehicle_speed": null,
        "reinstatement_date": null,
        "action_taken": "police report filed",
        "ticket_number": null,
        "enforcing_agency": "Cambridge PD",
        "jurisdiction": null,
        "severity": null,
        "violation_number": null,
        "license_plate": "1A2B3C4D",
        "fine_amount": null,
        "state_code": null,
        "acd_code": null,
        "additional_info": null,
        "injury_accident": false,
        "fatality_accident": false,
        "fatality_count": 0,
        "injury_count": 0,
        "vehicles_involved_count": 1,
        "report_number": null,
        "policy_number": null
      }
    ],
    "violations": [
      {
        "type": "conviction",
        "issued_date": "2014-01-01",
        "conviction_date": "2014-01-01",
        "description": "speeding",
        "points": 0,
        "city": "Cambridge",
        "county": "Boston",
        "state": "MA",
        "ticket_number": "ABCD1234",
        "disposition": null,
        "category": null,
        "court_name": null,
        "acd_code": null,
        "docket": null,
        "additional_info": null
      }
    ]
  }
}

What constitutes a pass / fail. @zolihonig may need to ask insurer...

mattgi commented 8 years ago

relevant fields (appear to have consider or clear as potential values:

  "result": "consider",
  "breakdown": {
    "driving_license": {
      "result": "clear"
    },
    "driving_restrictions": {
      "result": "clear"
    },
    "driving_violations": {
      "result": "consider"
    },
    "driving_accidents": {
      "result": "consider"
    }
mattgi commented 8 years ago

Need to finalize this one: default stance will be if result === 'clear' then verified. else fail.

mattgi commented 8 years ago

flicking on to you Zoli as Roy may be tied with cars?

rryman3 commented 8 years ago

Let's say 4 points for the time being. I'll consult with Zurich and update. On Dec 7, 2015 3:59 AM, "Matt Ginty" notifications@github.com wrote:

flicking on to you Zoli as Roy may be tied with cars?

— Reply to this email directly or view it on GitHub https://github.com/clevertech/Waivecar/issues/148#issuecomment-162468546 .

zolihonig commented 8 years ago

@rryman3 please confirm based on our conversation today.

mattgi commented 8 years ago

@rryman3 I don't see a license point count.

I do see in each violation has a point deduction count though.. I assume you're thinking points remaining though, not points lost.

However, It appears that not all states (e.g. Oregon doesn't) use points to determine the status of a license or severity of an infringement so perhaps this is why most services provide the clear/consider result rather than a point count.

Not sure what you guys have discussed but should we just look at "driving_license": { "result": "clear" }, for now? I have also emailed onfido to ask for more documentation about what 'consider' actually means.

rryman3 commented 8 years ago

4 points or less we can approve, anything higher and we don't grant access. We would also need to block access if there was no record on file/no response received, they have an international drivers license, or their record lists any DUI, DWI, Vehicular manslaughter, or reckless driving charges (even if points weren't accessed). We should provide an email address for them if they want to appeal a decline.

mattgi commented 8 years ago

few things we can quickly check off:

So this caters for most of the requirements above.

Remaining Logic:

  1. check violations
    1. for each violation:
      1. if violation is 4 points or less, go to next violation.
      2. if violation is more than 4 points:
        1. if violation description includes DUI, DWI, Vehicular manslaughter, or reckless driving, return decline.
    2. return verified

Issues in doing this:

zolihonig commented 8 years ago

@mattgi if the API can't do it automatically, maybe we can manually have someone go into onfido, read the report and approve / deny.

mattgi commented 8 years ago

We store the report locally in our DB once it is available, so we can do this from within the website.

I think this is a good initial approach.. but it will introduce definite delay in license approvals for anyone with a violation with > 4 points. (seems reasonable)

kristopolous commented 8 years ago

@zolihonig This looks like an important issue, we should be doing this, I assume.

zolihonig commented 8 years ago

@kristopolous there is more work to be done here. Moe will catch you up on the conversations with onfido for their new sdk which utilizes facial recognition.