DRN Integrator & Developer Documentation

DRN Integrator & Developer Documentation

Did You Know?

Changing a Record's Status

Status and reason codes can be found above by requesting the available data types.

curl -X POST "https://drnsights.drndata.com/api-client/product/48/record/699604/status" -H "accept: /" -H "Authorization: Bearer {TOKEN HERE}" -H "Content-Type: application/json" -d "{\"status_id\":\"3\",\"reason_id\":7,\"other_reason\":\"API Testing\",\"closed_date\":\"2020-10-28 21:39:45\"}"

Loss Alerts APIs

Get the Current User

Example Request:

curl -X GET "https://drnsights.drndata.com/api-client/user" -H "accept: /" -H "Authorization: Bearer {TOKEN HERE}"

Example Response:

{
  "data": {
  "id": 154,
  "email": "10ae17fe-c10d-4d7b-a731-9641958d0aac@",
  "is_active": true,
  "first_name": "1217 TEST",
  "middle_name": null,
  "last_name": "Service Account",
  "full_name": "Service Account, 1217 TEST ",
  "name": "1217 TEST Service Account",
  "created_at": "2020-12-17T21:06:01+00:00",
  "mobile_phone": null,
  "office_phone": null,
  "timezone": "America/Chicago",
  "login_scope": 3
 }
}

Creating a Record Using a VIN

Records are created using a vin parameter. Here’s an example request:

curl -X POST "https://drnsights.drndata.com/api-client/product/48/record" -H "accept: /" -H "Authorization: Bearer {TOKEN HERE}" -H "Content-Type: application/json" -d "{\"vin
\":\"1111111111111111111\"}"

Example Response:

{"data":{"id":818101,"created_at":"2021-04-08T00:26:22+00:00"}}

Get a List of Records in Your Account

Example Request:

curl -X POST "https://drnsights.drndata.com/api-client/record" -H "accept: /" -H "Authorization: Bearer {TOKEN HERE}”

Example Response:

{
  "data": [
   {
   "id": 345045,
   "created_at": "2020-11-06T22:17:04+00:00"
   },
   {
   "id": 698916,
   "created_at": "2021-03-04T19:42:53+00:00"
   },
   {
   "id": 698917,
   "created_at": "2021-03-04T19:42:53+00:00"
   },
   { T R U N C A T E D }
   "path": "https://drnsights.drndata.com/api-client/record",
   "per_page": 15,
   "to": 15,
   "total": 1001
  }
}

Retrieving a Filtered Record

It may be useful to filter the record list from above using parameters as shown below.
By a single plate:
{“filter”:{ “vehicle_plate_number”:”ABC123″}}
By an array of plates:
{“filter”:{ “vehicle_plate_number”:[“ABC123”,”DEF456”]}}
By a single VIN:
{“filter”:{ “vehicle_vin:is”:”111111111111111111″}}
By an array of VINs:
{“filter”:{ “vehicle_vin:in”:[“11111111111111111”]}}
Note: quotes (“ “) are escaped using a backslash ( \ )

Example Filter Request:

curl -X POST "https://drnsights.drndata.com/api-client/record" -H "accept: /" -H "Authorization: Bearer {TOKEN HERE} " -H "Content-Type: application/json" -d "{\"filter\":{\"vehicle_vin:is\":\"{VIN HERE}\"}}"

Example Response:

{
"data":[
{
"Id":817966,
"created_at":"2021-04-07T22:19:37+00:00"
}
],
"Links":{
{ T R U N C A T E D }
}
}

Adding an Address to a Record

curl -X POST "https://drnsights.drndata.com/api-client/record/817966/address/create" -H "accept: /" -H "Authorization: Bearer {TOKEN HERE}" -H "Content-Type: application/json" -d "{\"street1\":\"123 Main\",\"street2\":\"Suite 678\",\"city\":\"Here\",\"state\":\"TX\",\"postal_code\":75074}"

Retrieving Loss Alert Information

You can utilize the Loss Alerts endpoint to pull most of the information available in the Loss Alerts product. The list and pagination will be similar to retrieving records from other products, and can be filtered using many of the filters in the “Retrieving a Filtered Record” section below.

Example Loss Alert portfolio request:

curl --request POST \
--url https://drnsights.drndata.com/api-client/loss-alerts/ \
--header 'Authorization: Bearer {TOKEN HERE}' \
--header 'Content-Type: application/json' \

Retreiving Collision Information

Collision is another loss type under Loss Alerts, displaying information about the body shop, city, state and zip where the vehicle is located. In some cases, you need to be able to retrieve Collision data that DRNsights Plus stores internally. This API also lets you add new Loss Alert records.

Example request:

{
	"filter": {
		"vehicle_vin:is": "JN11111111111111111"
	},
	"active_monitoring": false
}

Example response:

{
  "data": [
   {
     "id": null,
     "monitoring_status": 0,
     "component_id": 5,
     "record": {
       "id": 5,
       "record_groups": {
        {
         "id": 4,
         "name": "LossAlert",
         "record_status": {
           "id": 3,
           "name": "Closed"
        },
        "status": 1,
        "reference": ""
     }
    ],
    "created_at": "2023-10-17T02:06:00.000000Z"
   },
   "vehicle": {
     "is_primary": true,
     "vin": "JN111111111111111",
     "year": null,
     "make": null,
     "model": null, 
     "plate": {
       "number": null,
       "state": null
     }
   },
   "vehicle_loss_alert": {
     "id": null,
     "la_resolution_id": null,
     "event_name": null,
     "event_date": null,
     "event_state": null,
     "is_resolved": false,
     "agency": {
       "name": null,
       "address": null,
       "city": null,
       "state": null,
       "zip": null,
       "phone": null
     }
      },
        "properties": [
          {
            "data": {
              "Reference": "239407110",
              "CreateDate": "2023-07-24 23:59:58",
              "RepairFacility": "PAINT DOCTOR NORTH",
              "RepairCity": null,
              "RepairState": null,
              "RepairZip": "79416",
              "IsInsurance": "1",
              "InsuranceCompany": "ACTION CLAIMS SERVICE INC.",
              "VehicleMake": "CHEV",
              "VehicleModel": "Silverado 1500 LTZ Crew Cab 143.5 WB 4WD",
              "VehicleYear": "2017",
              "VehicleType": "P",
              "VehicleModelNumber": null,
              "VehicleBodyStyle": null,
              "VehicleEngineCode": null,
              "VehicleMileage": null,
              "VehicleProductionDate": null,
              "VehicleMoldingCode": null,
              "VehicleTrimCode": null,
              "VehicleTrimColor": null,
              "Parts": [
                {
                  "PartNumber": "23227177",
                  "InterchangeNumber": "",
                  "Description": "Belt molding chrome",
                  "Quantity": "1",
                  "Type": "NEW",
                  "Category": "OE",
                  "Price": "173.2"
                }
              ]
            },
            "type": "Collision",
            "updated_at": "2023-08-23T18:51:31.000000Z"
          },
          {
            "data": {
              "Reference": "239407041",
              "CreateDate": "2023-07-24 23:58:36",
              "RepairFacility": "PAINT DOCTOR NORTH",
              "RepairCity": null,
              "RepairState": null,
              "RepairZip": "79416",
              "IsInsurance": "1",
              "InsuranceCompany": "ACTION CLAIMS SERVICE INC.",
              "VehicleMake": "CHEV",
              "VehicleModel": "Silverado 1500 LTZ Crew Cab 143.5 WB 4WD",
              "VehicleYear": "2017",
              "VehicleType": "P",
              "VehicleModelNumber": null,
              "VehicleBodyStyle": null,
              "VehicleEngineCode": null,
              "VehicleMileage": null,
              "VehicleProductionDate": null,
              "VehicleMoldingCode": null,
              "VehicleTrimCode": null,
              "VehicleTrimColor": null,
              "Parts": [
                {
                  "PartNumber": "84025009",
                  "InterchangeNumber": "",
                  "Description": "Belt molding double & crew cab chrome",
                  "Quantity": "1",
                  "Type": "NEW",
                  "Category": "OE",
                  "Price": "87.85"
                }
              ]
            },
            "type": "Collision",
            "updated_at": "2023-08-23T18:51:31.000000Z"
          },
          {   

Appending Additional Data

You can utilize the appends parameter to add Vehicle information, Addresses, People, Record Metrics, and Address Metrics to the filtered record. For format reproduction, all appends are shown. However, they can be utilized individually or in any combination.

curl -X POST "https://drnsights.drndata.com/api-client/record/817966" -H "accept: /" -H "Authorization: Bearer {TOKEN HERE}" -H "Content-Type: application/json" -d "{\"filter\":{\"vehicle_vin:is\":\"11111111111111111\"},\"appends\":[\"record.addresses\",\"record.people\",\"record.vehicles\",\"record.metrics\",\"address.metrics.address_score\"]}"

External Services

In some cases, you may want to be notified of events as they happen instead of checking for them on a specified cadence. In these cases, we can push events to an external webhook setup on the client side. Whitelisting DRN’s production IP and providing the webhook URI is all that is required on the client side to receive notifications. We can test the connection with a sample payload, and continue with live events if everything looks good. We currently have this setup for live scans and loss alerts, and a sample payload of each can be found below:

Live scan payload:

{
 "scan": 12345,
 "event_id": "B0992552-72A5-1234-5678-87D7E904CDE7",
 "longitude": "-77.036517",
 "latitude": "38.897138",
 "scan_date": "2022-07-14T23:02:14-05:00",
 "vehicle": {
 "vin": "11111111111111111"
},
"record": {
"id": 12345
}
}

Loss alert payload:

{
"type": “Impound”,
“LastEventDate”: “2023-01-01”,
“DateOfEntry”: “2022-12-16”,
"vehicle": {
"vin": "11111111111111111",
“LicensePlate”: “ABC123”,
“LicensePlateState”: “TX”
},
“Agency”: {
“Name”: “Gotham Impounds”,
“MainPhone”: “+1 (888) 123-4567”
},
"record": {
"id": 12345
}
}