This document is supplied to provide some additional information to the online documentation that exists when accessing the API in the browser.
There are the following ways to upload the image:
Please note, that the only supported format is .jpg
Images can be uploaded for different verticals (car, bike, industry) with a separate endpoint dedicated to each respective type.
When validation fails, an error response will be returned with an explanation.
The system supports authentications via headers. username and password headers should be provided in the request.
| Http Method | POST |
|---|---|
| Production URL | http://thirdpartydata-photoapi.carsalesnetwork.com.au/ |
| Resources |
/upload/{vertical}/{dealerIdentifier}/{stocknumber}/{country}/{order}/{filename} |
| Examples |
http://thirdpartydata-photoapi.carsalesnetwork.com.au/upload/car/b8e14a12-15c0-40ec-9c5e-5ffdd0170791/123456A/australia/1/firstimage http://thirdpartydata-photoapi.carsalesnetwork.com.au/upload/bike/b8e14a12-15c0-40ec-9c5e-5ffdd0170792/123456B/nz/3/thirdimage http://thirdpartydata-photoapi.carsalesnetwork.com.au/upload/boat/b8e14a12-15c0-40ec-9c5e-5ffdd0170793/123456C/newzealand/2/secondimage |
| Authentication | Required (in the header of the request) |
| Request Format | Multipart/form-data |
| Request Object | Image is uploaded to the body |
| Response Format | JSON |
| Response Object Success |
Success - 200 ok.
{
"Path": "https://imageserver/boat/dealer/19c797f470fc3881e0f8799be6a00ba0.jpg",
"PhotoSize": 69956,
"Created": "2017-08-02T00:00:00+10:00",
"PhotoItem": {
"DealerIdentifier": "d5647285-15a8-4d28-9ad4-9cc733freb99",
"StockNumber": "12345A",
"Photo": {
"PhotoUrl": null,
"Order": 1,
}
}
}
|
| Response Object Error | Error - error code. Error message body in JSON format in the case of malformated data. |
Please note that the same credentials can be used to submit stock items to different dealerships provided that they have been set up for this and the respective dealer id is used in the request.
| Http Method | POST |
|---|---|
| Production URL | http://thirdpartydata-photoapi.carsalesnetwork.com.au/ |
| Resources |
/{vertical}/uploadphoto/ |
| Examples |
http://thirdpartydata-photoapi.carsalesnetwork.com.au/car/uploadphoto/ http://thirdpartydata-photoapi.carsalesnetwork.com.au/bike/uploadphoto/ http://thirdpartydata-photoapi.carsalesnetwork.com.au/industry/uploadphoto/ |
| Authentication | Required (in the header of the request) |
| Request Format | JSON |
| Request Object |
{
"DealerIdentifier" : string,
"StockNumber": string,
"Country": string,
"Photo": {
"PhotoUrl": string,
"Order": int
}
}
Example:
{
"DealerIdentifier" : "d5647285-15a8-4d28-9ad4-9cc733freb99",
"StockNumber": "12345A",
"Country": "Australia",
"Photo": {
"PhotoUrl": "http://www.yourimagelocation.com.au/images/image.jpg",
"Order": 1,
}
}
|
| Response Format | JSON |
| Response Object Success |
Success - 200 ok.
{
"Path": "https://imageserver/boat/dealer/19c797f470fc3881e0f8799be6a00ba0.jpg",
"PhotoSize": 69956,
"Created": "2017-08-02T00:00:00+10:00",
"PhotoItem": {
"DealerIdentifier": "d5647285-15a8-4d28-9ad4-9cc733freb99",
"StockNumber": "12345A",
"Photo": {
"PhotoUrl": "http://www.yourimagelocation.com.au/images/image.jpg",
"Order": 1,
},
}
}
|
| Response Object Error | Error - error code. Error message body in JSON format in the case of malformated data. |
Please note that the same credentials can be used to submit stock items to different dealerships provided that they have been set up for this and the respective dealer id is used in the request.