/api/v1/stock/{stockCode}VEHICLES_WRITEAdd or update a vehicle
The first call with a stock code adds the vehicle (201); later calls update it (200). Stock codes are 1 to 64 letters, digits, dots, dashes or underscores.
curl -X PUT https://api.motorsync.co.uk/api/v1/stock/STK-10482 \
-H "Authorization: Bearer ms_test_..." \
-H "Content-Type: application/json" \
-d '{
"make": "BMW", "model": "3 Series", "variant": "320d M Sport",
"year": 2021, "registrationNumber": "AB21XYZ",
"price": 2399500, "mileage": 28450,
"fuelType": "DIESEL", "transmission": "AUTOMATIC", "bodyType": "SALOON",
"colour": "Black", "doors": 4, "seats": 5,
"imageUrls": ["https://yourdms.example.com/photos/STK-10482-1.jpg"]
}'{
"success": true,
"data": {
"stockCode": "STK-10482",
"outcome": "ADDED",
"vehicle": { "id": "0192f1c2-...", "make": "BMW", "model": "3 Series", "price": 2399500, "isActive": true, "soldAt": null, ... },
"problems": []
},
"message": "ADDED"
}