Images
Product images are associated with SKUs.
To learn more, see this article about Best practices with catalog images. It may also be helpful to compress the images you use in your store.
Data Model
Field | Description | Required | Type | Default |
---|---|---|---|---|
Id | ID of SkuImage (SkuFileId ). This is the ID that is used to delete/update it. | No | Integer | AutoIncrement |
ArchiveId | Unique identifier of the Image file. | No | Integer | - |
SkuId | ID of SKU | Yes | Integer | null |
Name | Name of SKU’s file | No* | String | null |
IsMain | Set the image as the main image for the product. | No | Boolean (true/false) | null |
Label | Image label | No | String | false |
Url | External image URL | Yes | String | - |
API implementation
Register SKU image
To register an image to an SKU, it must be hosted on an external server and with read permission. Then you may use the Create SKU file API endpoint.
Example request
Body:
_10{_10 "IsMain": true,_10 "Label": "Main",_10 "Name": "Nike-Red-Janoski-1",_10 "Url": "https://m.media-amazon.com/images/I/610G2-sJx5L._AC_UX695_.jpg"_10}
Response:
_10{_10 "Id": 520,_10 "SkuId": 70,_10 "ArchiveId": 155467,_10 "IsMain": true,_10 "Label": "Main"_10}
Change SKU image
To change an existing SKU image that already existed, you can use the Update SKU file endpoint.
In order to update a SKU file the image needs to be uploaded again.
Example request
Body:
_10{_10 "IsMain": true,_10 "Label": "Main2",_10 "Name": "Nike-Red-Janoski-1",_10 "Url": "https://m.media-amazon.com/images/I/610G2-sJx5L._AC_UX695_.jpg"_10}
Response:
_10{_10 "Id": 520,_10 "SkuId": 70,_10 "ArchiveId": 155467,_10 "IsMain": true,_10 "Label": "Main2"_10}
Remove SKU Image
To remove an SKU image use the Delete SKU image by file ID API request. You will need the SkuFileId
.
Remove all SKU images
To delete all images of one specific SKU, use the Delete all SKU file API endpoint.