With the Stock Updates capability on Auto Trader Connect, you’ll be able to create and update a dealer's stock. This includes managing the advert’s advertising locations and lifecycle state using the Stock API. You will also be able to see the dealer’s contracted allowances using the Advertisers API.
Here’s a full list of the functionality:
- Stock create
- Stock update
- Updating stock
- Managing all advert destinations
- Managing the lifecycle state of the stock item
- Advert allowances
- View dealer’s advert allowances
Stock create
As part of this capability, you’ll need to create stock using Auto Trader’s Stock API.
To do this, you will send a POST request to the Stock API with dealer’s advertiser ID. The request will need to contain vehicle data. You can get all this data from our Vehicle Taxonomy capability.
You also need to include advert data in this request. For example, advert data can include:
- Description
- Attention grabber
- Price
If successful, the meta data in the response will have a Stock ID. You’ll need to store this against the stock item in your platform.
Check out examples of creating stock on the Stock API
Stock update
Updating stock
As part of this capability, you will need to update stock using Auto Trader’s Stock API.
To do this, you need to make a PATCH request to our Stock API. Include the Stock ID of the stock record you want to update and the Auto Trader Advertiser ID.
When updating a stock item, only send any data that has changed, not the full stock item. This will make it much easier to diagnose issues on a failed request or if there is an error.
When updating the list of images or features, send the complete list in the request. You cannot add or remove individual items from the list on their own.
You can also request an AI generated vehicle description for your stock item through the Co-Driver generated description capability.
This is generated through a POST request which can then be added to a stock item using a PATCH request, after you have confirmed you are happy with the description and made any potential changes to the language and tone.
Check out examples of updating stock via the Stock API
Managing advertising destinations
There are five advertising locations you will need to manage. You can set these to either PUBLISHED or NOT_PUBLISHED. When a stock item is first created, they will all be set to NOT_PUBLISHED.
The five locations are:
- autotraderAdvert - This is for publishing stock to be searchable on autotrader.co.uk
- advertiserAdvert - This is for publishing on the dealer’s website
- profileAdvert - This is for publishing on the Retailer Store page
- locatorAdvert - This is for publishing on a manufacturer’s used approved site
- exportAdvert - This identifies that the stock has been selected for a 3rd party CSV export
For the first four, you must allow the user to manage these in your system.
The fifth needs to be set to NOT_PUBLISHED when marking a vehicle as SOLD or DELETED.
When trying to publish stock to autotraderAdvert or profileAdvert, you might get CAPPED and REJECTED in the response. You need to display this back to the user of your system.
If a vehicle is CAPPED, the advert will not automatically switch to PUBLISHED when a slot becomes available. You need to send another request to set this to PUBLISHED.
Check out an example of managing advert locations
Managing the lifecycle state of the stock item
The lifecycle status of a stock item is linked to the advertising status. However, one does not control the other. Both will need updating to advertise and remove stock.
Lifecycle state | Meaning | Can be advertised | Can't be advertised |
---|---|---|---|
Due in | Vehicle that is not in the retailer’s location | ✔️ | |
Forecourt | Vehicle ready for sale | ✔️ | |
Sale in Progress | Vehicle is in the process of being sold | ✔️ | |
Sold |
Vehicle has been sold | ✔️ | |
Deleted | Use to delete the stock record | ✔️ | |
Wastebin | Vehicle needs to be removed by the retailer, but retailer wants to keep the stock in the system for a while. This status is also used by data feeds when a record is removed. | ✔️ |
Check out examples of managing lifecycle state
Advert allowances
As part of this capability, it’s important to know the dealer’s advertising allowance so you can make sure the dealer is using all of their available slots.
To do this, you will need to make a GET request to our Advertisers API using the dealer’s advertiser ID and the parameter of autotraderAdvertAllowances=true.
This will return the number of slots the dealer has for each of the different vehicle types on our website.
If a vehicle is CAPPED, due to reaching the allowance, it will not automatically switch to PUBLISHED if a slot becomes available. You need to send another update request to set this to PUBLISHED.
Check out examples of getting advert allowances
Error handling
When using the APIs above, you may get error response codes that you need to handle. This makes sure you have a smooth service for both you, as a partner, and your end user.