Vehicle Search APIs

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}

Adding a Person to a Record

curl -X POST "https://drnsights.drndata.com/api-client/record/817966/person/create" -H "accept: /" -H "Authorization: Bearer {TOKEN HERE}" -H "Content-Type: application/json" -d "{\"first_name\":\"Brak\",\"last_name\":\"Spaceman\",\"is_primary\":\"True\"}"

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\"]}"

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
\":\"11111111111111111\"}"

Example response:

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

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\"}"

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
}
}

Get a List of Records in Your Account

Example Request:

-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.
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 }
}
}

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
}
}