Update by ID
Updates are supported via PATCH
requests. You can either PATCH
the full document or just the fields that you wish to
change. Using a blank string or a null value will try and set the field value to blank or null respectively.
Not changing a field can only be done by not sending it in the patch request.
Certain fields returned in a stock response are readonly and cannot be changed.
Body Required
PATCH
/v1/stock/{stockId}
curl \
-X PATCH https://api.dealerauction.co.uk/v1/stock/{stockId} \
-H "Content-Type: application/json" \
-d '{"vehicle":{"keys":2}}'
Request example
{
"vehicle": {
"keys": 2
}
}
Response examples (200)
{
"id": "a10ab562-c0cd-4072-88eb-4115811f5aa1",
"listingId": "cf17d47a-3ba5-452d-a18f-f03225aa6c27",
"createdDate": "2023-04-19T11:07:18.883Z",
"updatedDate": "2023-04-19T11:07:18.883Z",
"publicReference": 202304198054016,
"metadata": {
"externalStockId": "string",
"externalVendorId": "string"
},
"lifecycleState": "FORECOURT",
"customerId": 123456,
"vehicle": {
"vrm": "AB17ABC",
"category": "Car",
"mileage": 51234,
"yearOfManufacture": 2018,
"dateOfRegistration": "2018-06-01",
"ownershipCondition": "NEW",
"vin": "AAAAA81KLJU982170",
"make": "Citroen",
"model": "Saxo",
"derivative": 1.5,
"derivativeId": "4965f54cdaea4226acde95e0d99b1acf",
"trim": "SX",
"bodyType": "Hatchback",
"fuelType": "Petrol",
"transmissionType": "Manual",
"driveTrain": "Front Wheel Drive",
"doors": 3,
"keys": 2,
"insuranceGroup": 10,
"insuranceSecurityCode": "U",
"v5CertificationSupplied": true,
"colour": "Blue",
"engineNumber": "FY6H0409181",
"cylinders": 2,
"engineSize": {
"unit": "LITRE",
"value": 1200
},
"motExpiry": "2017-01-01",
"serviceHistory": "FULL_SERVICE_HISTORY",
"plate": 17,
"previousOwners": 2,
"exDemo": false,
"stolen": false,
"imported": false,
"exported": false,
"scrapped": false,
"writeoffCategory": "C"
},
"advert": {
"state": "ACTIVE",
"createdDate": "2023-04-19T11:07:18.883Z",
"updatedDate": "2023-04-19T11:07:18.883Z",
"auction": {
"type": "BID",
"lotId": 12,
"startingPrice": {
"value": 1500,
"currency": "GBP"
},
"reservePrice": {
"value": 1500,
"currency": "GBP"
},
"askingPrice": {
"value": 1500,
"currency": "GBP"
},
"buyNowPrice": {
"value": 1500,
"currency": "GBP"
},
"startDate": "2023-04-19T11:07:18.883Z",
"endDate": "2023-04-21T11:07:18.883Z"
},
"startDate": "2023-04-19T11:07:18.883Z",
"endDate": "2023-04-23T11:07:18.883Z",
"attentionGrabber": "This is a really great car",
"description": "Some information about a car.\n\nAnd some more information with a line break.",
"tradeVatStatus": "MARGINAL",
"externalUrl": "https://some-url.com/a-page"
},
"features": [
{
"description": "DAB Radio",
"standard": false,
"category": "electronics"
}
],
"conditionReportUrl": "https://your-domain.com/condition-report.pdf",
"condition": {
"externalConditionGrade": "1",
"surecheckGrade": "BRONZE",
"damageItems": [
{
"zone": "WINDSCREEN",
"damageType": "BROKEN"
}
]
},
"videoUrl": "https://www.youtube.com/watch?v=yIQd2Ya0Ziw&ab_channel=Calm",
"images": [
{
"url": "https://howtodrawforkids.com/wp-content/uploads/2022/01/9-cartoon-car-drawing-tutorial.jpg",
"platformUrl": "https://howtodrawforkids.com/wp-content/uploads/2022/01/9-cartoon-car-drawing-tutorial.jpg",
"uploaded": true,
"tags": [
"string"
]
}
],
"capTaxonomy": {
"id": "string",
"code": "string",
"make": "string",
"model": "string",
"variant": "string",
"derivative": "string"
},
"availableUntil": "2025-05-04T09:42:00+00:00",
"requestedNetwork": "string",
"advertiser": {
"address": {
"address1": "Line1",
"address2": "Line2",
"town": "Manchester",
"county": "Manchester",
"postcode": "A Postcode",
"country": "United Kingdom",
"latLong": {
"latitude": 51.518562,
"longitude": -0.143826
}
},
"contact": {
"email": "test.user@example.com",
"title": "Mr",
"firstName": "Test",
"lastName": "User",
"mobileNumber": "07222222222",
"landlineNumber": "01611111111"
}
},
"additionalData": {
"mechanical_fails_start": true,
"mechanical_bad_gearbox": true,
"mechanical_unusual_noise": true,
"mechanical_veers": true,
"mechanical_warning_light": true,
"mechanical_exhaust_smoke": true,
"mechanical_leaks": true,
"mechanical_note": "string",
"electrical_aircon_not_cold": true,
"electrical_dashboard_not_working": true,
"electrical_speakers_not_working": true,
"electrical_satnav_not_working": true,
"electrical_note": "string",
"odour_smoke": true,
"odour_pet": true,
"odour_damp": true,
"odour_note": "string",
"bodywork_repairs": true,
"bodywork_repairs_note": "string",
"bodywork_issues": true,
"bodywork_issues_note": "string",
"vehicle_modifications": true,
"vehicle_modifications_note": "string",
"c2b_top_nav_journey": true
}
}
Response examples (400)
{
"errorCode": "INVALID_STOCK_ITEM",
"errorMessage": "An error message",
"errors": [
{
"message": "An error has occurred",
"key": "string"
}
]
}
Response examples (403)
{
"errorCode": "SERVER_ERROR",
"errorMessage": "An unexpected error has occurred"
}
Response examples (404)
{
"errorCode": "SERVER_ERROR",
"errorMessage": "An unexpected error has occurred"
}
Response examples (409)
{
"errorCode": "STOCK_ALREADY_EXISTS",
"vrm": "AB17ABC"
}
Response examples (502)
{
"errorCode": "SERVER_ERROR",
"errorMessage": "An unexpected error has occurred"
}