To get live API access, your integration must pass certain tests. This will make sure that it meets our technical standards and best practices.
For each capability, the tests cover Essential and Enhanced functionalities. Your integration must pass at least one of the Essential functionality tests to get live access.
We recommend using the Enhanced functionalities to allow dealers to get the full benefits of the service.
We'll cover the tests for the following functionalities:
- Stock update notifications (Essential)
- Baseline stock (Essential)
- Stock charge times (Enhanced)
- Stock taxonomy features (Enhanced)
There are three ways we check that tests are successful:
- Demonstration - We will expect you to show us your code or your UI
- Call log validation - We will check your API calls to our service to make sure the call is made correctly
- Database check - We will check our database to see whether the correct attribute has been updated
Stock update notifications (Essential)
To keep your stock data up-to-date with Auto Trader, make sure you successfully update your stock data based on stock update notifications that are sent to you.
Hash authentication
To validate that the notification has come from Auto Trader, you will need to use our hash authentication, as covered in our API developer documentation.
Test | How we'll check it |
Implement hash authentication on your notification endpoint and return a successful response code (2XX) if the hash authentication matches | Call log validation |
Able to identify the notification type of STOCK_UPDATE to know to update stock with this notification | Demonstration |
Optional checks | |
Implement hash authentication on your notification endpoint and return a forbidden response code (403) if the hash authentication does not match |
Call log validation |
Stock created
You'll get a webhook when a stock record is created for a dealer that's on your integration. You should be able to handle this and create the stock in your system to match.
Test | How we'll check it |
Successfully able to create a stock item in your system when created in Auto Trader Portal | Demonstration |
Able to store these essential stock identifiers from the notification:
|
Demonstration |
Stock availability
You'll get a webhook when the availability of stock updates in Auto Trader. You should reflect any change to the availability of stock within your system.
This is important for dealers who use our Deal Builder service and will be getting reservations on Auto Trader (as well as reservations from other systems) so keeping this data up-to-date is crucial.
Test | How we'll check it |
If you are managing a dealer’s website, you are showing adverts with advertiserAdvert set to PUBLISHED, and not showing adverts where advertiserAdvert is set to NOT_PUBLISHED | Demonstration |
Successfully update the availability of stock in your system when a notification is sent with a reservation status, or lifecycleState of SOLD, WASTEBIN, or DELETED |
Demonstration |
Stock updates
Stock updates are split into different sections based on what you are implementing the Stock Sync capability for. We recommend storing and updating as much stock data as possible, but if you are only using a limited set of attributes from Auto Trader, then you may not need to update all of the below.
Vehicle data
Test | How we'll check it |
Successfully update vehicle data of stock in your system when vehicle data is updated on a stock item:
|
Demonstration |
Media
Test | How we'll check it |
Successfully update media of stock in your system when media is updated on a stock item:
|
Demonstration |
Advert data
Test | How we'll check it |
Successfully update advert data of stock in your system when advert data is updated on a stock item:
|
Demonstration |
Price data
Test | How we'll check it |
Successfully update the price of stock in your system when price data is updated on a stock item:
|
Demonstration |
Features
Test | How we'll check it |
Successfully update features of stock in your system when features are updated on a stock item:
|
Demonstration |
Baseline stock (Essential)
You should be able to call the Stock API to get the current stock in Auto Trader, then pull this into your system. This will mean you can use the stock update notifications to keep your stock up-to-date.
Test | How we'll check it |
Get stock for a single retailer using the advertiserId parameter | Call log validation |
Paginate through stock using page and pageSize parameters when total results are greater than the page size requested | Call log validation |
Store essential stock identifiers Auto Trader Stock ID and/or Auto Trader Search ID | Demonstration |
If you receive a 403 response code from the Stock API, you should not retry the call for this advertiser ID. You should log the error somewhere, with an action to contact Auto Trader if incorrect. | Demonstration |
Optional checks | |
Response refinement is used, setting attributes to false where not being used, e.g. features=false if not using the features attribute of the results |
Call log validation |
Stock taxonomy features (Enhanced)
If you want to get taxonomy feature data for a vehicle, you can make an API call to the stock features endpoint using the stock ID of the stock record you want to get this data for.
Test | How we'll check it |
Successfully able to get taxonomy feature data from the stock features endpoint for a given stock ID | Call log validation |
This endpoint is only successfully called once per stock item, and calls are not repeated on a schedule. Calls should only be repeated if the derivative ID or features change on the stock item. | Call log validation |
Stock charge times (Enhanced)
You can also get 'charge time' data for in-stock vehicles. Using the Stock ID of the stock record you want to get this data for, you can make an API call to the stock charge time endpoint to get this data.
Test | How we'll check it |
Successfully able to get 'charge time' data from the stock charge-times endpoint for a given stock ID | Call log validation |
Handle vehicles that are not electric or hybrid, either by only calling the endpoint for electric or hybrid vehicles or being able to handle a blank array being returned | Demonstration |
This endpoint is only successfully called once per stock item, and calls are not repeated on a schedule. Calls should only be repeated if the derivative ID changes on the stock item. | Call log validation |