MotorCheck users can access their account over our REST API which returns data in a JSON format using OAUTH for authentication purposes.

Listed below are details of each API call but you can also view the sample calls as we've published them on Postman here.

Endpoints for interacting with reports on the MotorCheck Trade website. 

The API consists of four endpoints as follows.

1. OAUTH Token

Authorise a system to access your MotorCheck account using this endpoint https://trade-api.motorcheck.co.uk/api/v1/oauth/token. You'll need to pass across a client ID and secret which you'll generate from your MotorCheck account (contact us using the chat widget below for this). This returns a token which is used to authenticate the three API calls below.

Here's how the OAUTH call is constructed;

Headers

{
{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}
}

Sample Body

{
"grant_type": "client_credentials",
"client_id": "__your client id__",
"client_secret": "__your client secret__",
"scope": "report-search report-show report-create"
}

Sample Response

{
"token_type": "Bearer",
"expires_in": 31536000,
"access_token": "bearer_token_string"
}

Please note that all endpoints require an Authorization header with the "Bearer {token}" value as received from the oauth/tokenendpoint above.

2. Report Search

Finds all reports with a given VRM and provides the report's unique ID in order to query the report details. If no report exists and your API account has the correct permissions, you can generate a new report using the /report/create endpoint.

https://trade.motorcheck.co.uk/api/v1/report/search

Headers

[
{"key":"Accept","value":"application/json"},
{"key":"Content-Type","value":"application/json"}
{"key":"Authorization","value":"Bearer bearer_token_string"},
]

Sample Body

{
"vrm": "__enter VRM here__"
}

Sample Response

"data": [

{
"report_id": "__unique report id__",
"vrm": "__VRM__",
"created_at": "2017-01-01 00:00:00"

},
{

"report_id": "__unique report id__",
"vrm": "__VRM__",
"created_at": "2017-01-01 00:00:00"

}


3. Report Show

Requires a valid report_id to be found from the report/search endpoint.

This endpoint returns details of the issues found on the report, the location and user that created the report, and a variety of URLs from which you can download the report.

Please note the the URLs provided may have an expiry time as shown in the response 'url_expiry'. If null the URLs have no expiry associated.

https://trade.motorcheck.co.uk/api/v1/report/show

Headers

[
{"key":"Accept","value":"application/json"},
{"key":"Content-Type","value":"application/json"}
{"key":"Authorization","value":"Bearer bearer_token_string"},
]

Sample Body

{
"report_id": "__unique report id__"
}

Sample Response

"data": {

"id": "__unique report id__",
"vrm": "__VRM__",
"location": "__a location name__",
"user": "__a user name__",
"created_at": "2017-01-01 00:00:00,
"issues": {
"finance": {"flag": false,
"message": "No finance agreement recorded"
},
"mileage": {"flag": false,
"message": "No mileage discrepancies"
},
"atRisk": {
"flag": false,
"message": "No issues recorded."
},
"writeOff": {
"flag": false,
"message": "No write-off recorded"
},
"scrapped": {
"flag": false,
"message": "Not scrapped, no VIC recorded"
},
"stolen": {
"flag": false,
"message": "No stolen record"
},
"keepers": {
"flag": false,
"message": "No issues recorded"
},
"plateChange": {
"flag": false,
"message": "No issues recorded"
},
"colourChanges": {
"flag": true,
"message": "Previous colour change"},
},
"motHistory": {
"flag": false,
"message": "No issues recorded"
},
"taxAndSorn": {
"message": "No issues recorded"
},
"originAndUse": {
"flag": false,
"message": "No issues recorded"
}
},

"url": "https://trade.motorcheck.co.uk/report-show/long_obfuscated_string","pdf": ""pdf": "https://trade.motorcheck.co.uk/report-download/long_obfuscated_string",
"silent_sales_pdf": "https://trade.motorcheck.co.uk/report-download/long_obfuscated_string",
"certificate_pdf": null

},

"meta": {
"links_expire_at": "2017-02-01 00:00:00"

}


4. Report Create

Generates a new report for the given VRM.

If the report is successfully generated the provided response is the same as the report/show endpoint.

https://trade.motorcheck.co.uk/api/v1/report/search

Headers

[
{"key":"Accept","value":"application/json"},
{"key":"Content-Type","value":"application/json"}
{"key":"Authorization","value":"Bearer bearer_token_string"},
]

Sample Body

{
"vrm": "__enter VRM here__"
"method": "tradeCheck",
"currentMiles": 10000
}

Sample Response

"data": {

"id": "__unique report id__",
"vrm": "__VRM__",
"location": "__a location name__",
"user": "__a user name__",
"created_at": "2017-01-01 00:00:00,
"issues": {
"finance": {"flag": false,
"message": "No finance agreement recorded"
},
"mileage": {"flag": false,
"message": "No mileage discrepancies"
},
"atRisk": {
"flag": false,
"message": "No issues recorded."
},
"writeOff": {
"flag": false,
"message": "No write-off recorded"
},
"scrapped": {
"flag": false,
"message": "Not scrapped, no VIC recorded"
},
"stolen": {
"flag": false,
"message": "No stolen record"
},
"keepers": {
"flag": false,
"message": "No issues recorded"
},
"plateChange": {
"flag": false,
"message": "No issues recorded"
},
"colourChanges": {
"flag": true,
"message": "Previous colour change"},
},
"motHistory": {
"flag": false,
"message": "No issues recorded"
},
"taxAndSorn": {
"message": "No issues recorded"
},
"originAndUse": {
"flag": false,
"message": "No issues recorded"
}
},

"url": "https://trade.motorcheck.co.uk/report-show/long_obfuscated_string","pdf": ""pdf": "https://trade.motorcheck.co.uk/report-download/long_obfuscated_string",
"silent_sales_pdf": "https://trade.motorcheck.co.uk/report-download/long_obfuscated_string",
"certificate_pdf": null

},

"meta": {
"links_expire_at": "2017-02-01 00:00:00"

}

Did this answer your question?