MotorCheck Trade (UK) Customer API
This Postman collection demonstrates how to connect to a MotorCheck account and perform actions such as retrieving a MotorCheck, Specification or Condition Alert Report that has already been run or create a brand new one as required.
The API may be accessed via the following environments:
Production URL: https://trade-api.motorcheck.co.uk/
For Technical Support contact: techsupport@motorspecs.co.uk
For Sales contact: sales@motorcheck.co.uk
POSTOAuth Token
To connect to your MotorCheck account via API you'll first need to fetch an Authentication Token via an OAuth call. You can then use this token to make calls to your MotorCheck account and the services you have been activated for.
The Authentication Token will be provided in the API respnse along with an expiry of the token expressed in seconds. In the example below the token expires in 31622400 seconds (366 days) which is the default setting for all tokens. A new authentication token can be fetched at any time. Since the "Expiry" of the token can vary it is advisable not to hardcode the expiry but rather refresh it periodically before it expires.
You can create as many API accounts as you like on your MotorCheck account. Each one is given its own "client_id" and "client_secret" which you use in the OAUTH call. The payload below shows how to connect over this call and receive your Authentication token.
POSTIdentity Lookup
The MotorCheck Identity Service returns information such as Make, Model, Variant etc. for the VRM presented. The current mileage is an optional value that can be included if you intend subsequently retrieving a mileage linked valuation.
The data response is separated into three nodes;
- dvla
- mvris
- combined
1. dvla
The DVLA node returns data from the DVLA database.
It can be useful to note here how the DVLA use the 'Model' field to describe a combination of both the 'Model' and 'Variant' for the vehicle
whereas the mvris response (the next node) seperates these into two fields.
Tip - If you need information on when the vehicle was bought or sold you'll find it in the dvla secion under the 'keepers' node.
2. mvris
The MVRIS node returns data from the SMMT databsae. The SMMT data is updated every 24 hours so if your looking for a vehicle that was registered very recently you'll find it here.
3. combined
The combined node contains data from both of the above. It uses a combination of the dvla and mvris data to describe a vehilce by Make, Model and Version as well as included a standardised list of the more common features such as Transmission, Fuel, Body, etc.
Fields
The possible fields that can be sent in the body of the call.
Status Codes
The standard response codes that can be returned.
POSTHistory Report Search
Use the Report Search endpoint to find any MotorCheck History Reports your account has Previously Run against a specific VRM or across a specified Date Range.
The response will provide you with the reports unique ID(s) so that you can view them using the Report Show endpoint. If you'd like to keep your application in sync with all the reports that a user has carried out on MotorCheck you can do so by leaving the VRM field blank and using the "fromDate" and "toDate" ranges instead.
The VRM field is required if there is no "fromDate" or "toDate" set. If a "fromDate" or "toDate" is set it is not required.
If the "fromDate" is set the API response will return all reports created from that date.
If the "toDate" is set it will return reports created up to that date.
If both the "fromDate" and "toDate" is set then the API will return all reports created between those dates.
If all three are set then it shows reports created for that VRM between those dates.
If no report exists and your API account has the correct permissions, you can go ahead and generate a New Report using the Report Create endpoint.
POSTHistory Report Show
This endpoint requires a valid report_id which you'll find using the Report Search endpoint.
A successful call will return details of the major headings found on the history report, the location and user that created it and a variety of URLs from which you can download the full report and the printable PDF(s).
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.