API Quick Start Guide

Note: The Blue Flag API can only be accessed using GraphQL. If you’re not familiar with GraphQL, we encourage you to visit graphql.org/learn to learn more before proceeding further.

With the Blue Flag NEVDIS API, you can search our Australian vehicles database and check their details. This guide will help you get started making basic requests.

NEVDIS search for Registration Status

In this example, we will walk through making a request to find the VIN and some basic vehicle attributes of the car.

Authentication

To make requests with out API, you will need to get an API Token from us. If you do not already have an api token, you can request an api token.

Building your query

Our GraphQL api allows you to pick and choose exactly the fields you would like. In this example, we are searching for a vehicle by using the number plate. We will use the nevdisPlateSearch_v2 resolver to do this. This resolver requires two arguments, plate and state.

Test Requests (free)

Your account will be charged for each request you make according to the pricing rate card we have provided you. Any requests for plates or VIN's containing 17 X's (XXXXXXXXXXXXXXXXX) are free of charge and will always return sample/dummy data.

query {
nevdisPlateSearch_v2(plate: "XXXXXXXXXXXXXXXXX", state: VIC) {
vin
plate {
number
state
}
make
model
blueflag_make
blueflag_model
engine_number
vehicle_type
body_type
colour
compliance_plate
year_of_manufacture
registration {
status
expiry_date
}
}
}

View all NEVDIS fields

Making your first request

To make a request, you must send a POST request to our API endpoint. The body of the request must be a valid JSON object containing query and variables (optional).

{
"query": "query {nevdisPlateSearch_v2(plate: \"XXXXXXXXXXXXXXXXX\", state: VIC) {\n vin\n plate {\n number\n state\n }\n make\n model\n blueflag_make\n blueflag_model\n engine_number\n vehicle_type\n body_type\n colour\n compliance_plate\n year_of_manufacture\n registration {\n status\n expiry_date\n }\n }\n }",
"variables": {}
}

Note: If you keep getting an error saying "Invalid JSON", it is most likely because your query string has not been escaped correctly. Most programming languages do have a good way to deal with this automatically for you. You can also use an online JSON validator to verify if your object string is constructed correctly.

When making a request, you must include the Authorization header with the value of JWT your-api-token. Please don't forget to include JWT at the start of the Authorization header.

curl -X POST \
"https://ubuxgyols2.execute-api.ap-southeast-2.amazonaws.com/prod/" \
-H "Authorization: JWT <your-api-token>" \
-d '
{
"query": "query {nevdisPlateSearch_v2(plate: \"XXXXXXXXXXXXXXXXX\", state: VIC) {\n vin\n plate {\n number\n state\n }\n make\n model\n blueflag_make\n blueflag_model\n engine_number\n vehicle_type\n body_type\n colour\n compliance_plate\n year_of_manufacture\n registration {\n status\n expiry_date\n }\n }\n }",
"variables": {}
}
'

Results

The response is in the standard GraphQL format. At the top level, there is a data property which will either have your results or there will be an errors property which will contain a list of error messages for you to review.

For successful queries, you will see a property with the resolver name nested inside data. In the case of this query, it is nevdisPlateSearch_v2. As you can see from the response, the shape of the data matches the shape of the query submitted.

Please note that the query response will always be an array of objects. In some states, it is possible for two vehicle to have the exact same number plate. In this case, we will return both vehicles to you.

{
"data": {
"nevdisPlateSearch_v2": [
{
"vin": "XXXXXXXXXXXXXXXXX",
"plate": {
"number": "XXXXXXXXXXXXXXXXX",
"state": "VIC"
},
"make": "HOLDEN",
"model": "COMMOD",
"blueflag_make": "Holden",
"blueflag_model": "Commodore",
"engine_number": "LWR121810307",
"vehicle_type": "CAR / SMALL PASSENGER VEHICLE",
"body_type": "CAR/SEDAN",
"colour": "BLUE",
"compliance_plate": "2017-06",
"year_of_manufacture": 2017,
"registration": {
"status": "REGISTERED",
"expiry_date": "2019-11-10"
}
}
]
}
}

Sample Queries

Factory VIN Check

query {
nevdisPlateSearch_v2(plate: "XXXXXXXXXXXXXXXXX", state: VIC) {
vin
plate {
number
state
}
factory {
make
model
series
variant
buildYear
MY
body
fuel
drive
cylinders
litres
transmission
seats
doors
}
}
}
{
"data": {
"nevdisPlateSearch_v2": [
{
"vin": "XXXXXXXXXXXXXXXXX",
"plate": {
"number": "XXXXXXXXXXXXXXXXX",
"state": "VIC"
},
"factory": {
"make": "Holden",
"model": "Commodore",
"series": "VF II",
"variant": "SV6",
"buildYear": "2017",
"MY": "2017",
"body": "Sedan",
"fuel": "Petrol - Unleaded ULP",
"drive": "Rear Wheel Drive",
"cylinders": "6",
"litres": "3.6",
"transmission": "Sports Automatic",
"seats": null,
"doors": null
}
}
]
}
}

Written-off Vehicle Check (WOVR)

query {
nevdisPlateSearch_v2(plate: "XXXXXXXXXXXXXXXXX", state: VIC) {
vin
plate {
number
state
}
wov {
type_code
jurisdiction
incident_recorded_date
incident_code
damage_codes
}
}
}
{
"data": {
"nevdisPlateSearch_v2": [
{
"vin": "XXXXXXXXXXXXXXXXX",
"plate": {
"number": "XXXXXXXXXXXXXXXXX",
"state": "VIC"
},
"wov": {
"type_code": "Collision",
"jurisdiction": "NSW",
"incident_recorded_date": "2017-12-11",
"incident_code": "Statutory Write-off",
"damage_codes": "I01AI02AI09FI17DI21DI38EI41E"
}
}
]
}
}

Stolen Vehicle Check

query {
nevdisPlateSearch_v2(plate: "XXXXXXXXXXXXXXXXX", state: VIC) {
vin
plate {
number
state
}
stolen {
type
jurisdiction
reported_date
summary
}
}
}
{
"data": {
"nevdisPlateSearch_v2": [
{
"vin": "XXXXXXXXXXXXXXXXX",
"plate": {
"number": "XXXXXXXXXXXXXXXXX",
"state": "VIC"
},
"stolen": [
{
"type": "VIN",
"jurisdiction": "POL",
"reported_date": "2018-02-13",
"summary": "POL JUR-P REF-SIT_TEST_18"
},
{
"type": "Plate",
"jurisdiction": "POL",
"reported_date": "2018-02-13",
"summary": "POL JUR-P REF-SIT_TEST_18"
},
{
"type": "Engine",
"jurisdiction": "POL",
"reported_date": "2018-02-13",
"summary": "POL JUR-P REF-SIT_TEST_18"
}
]
}
]
}
}