Product.addImages
Sends the instructions about the images, that has to be uploaded. No binary file is included, only the URL to the physical file is passed, so the consumer can download the file if needed.
Request
JSON example:
[
{
"api":1,
"method":"auth",
"params":{
"username":"...",
"password":"..."
},
"id":1
},
{
"api":1,
"method":"Product.addImages",
"params":{
"imageInfos":[
{
"productId":"33295",
"fileName":"https:\/\/sellercenter.net\/5\/3ad4b3bf04.jpg",
"imageNumber":"7"
},
{
"productId":"33295",
"fileName":"https:\/\/sellercenter.net\/a\/a436be5bd7.jpg",
"imageNumber":"6"
},
{
"productId":"33295",
"fileName":"https:\/\/sellercenter.net\/a\/a3f20e8a11.jpg",
"imageNumber":"5"
}
]
},
"id":1
}
]
Request fields:
Field name |
Type |
Value |
Description |
---|---|---|---|
method |
string |
"Product.addImages" |
Action method name |
productId |
string |
"987165487" |
Endpoint product Id |
fileName |
string |
"http://sellercenter.url/some-image.jpg" |
URL of the picture |
imageNumber |
string |
"1" |
Index of the image |
All the fields are required.
Response
Respectively to the request, returns the status of the image given to process. The order of results matches the order of images in the request.
JSON example:
[
{
"api":1,
"result":[
{
"id":402276278,
"url":"\/cms\/sellercenter\/sellercenter_placeholder.png",
"imageNumber":1
},
false,
{
"id":525453680,
"url":"\/cms\/sellercenter\/sellercenter_placeholder.png",
"imageNumber":1
},
],
"id":1
}
]
Response fields:
Field name |
Type |
Value |
Description |
---|---|---|---|
id |
integer |
402276278 |
Endpoint image ID |
url |
string |
"\/cms\/sellercenter\/sellercenter_placeholder.png" |
Image URL on the endpoint system |
imageNumber |
integer |
2 |
Index of the image |
If there was any error while saving image, corresponding key will be false instead of image info array.