1. Home
  2. Knowledge Base
  3. REST API
  4. Product Services
  5. Add Product Image for Single Product

Add Product Image for Single Product

Overview

Endpoint is used for adding product image.

In order to do that, you must:

  • Be authenticated user

For information on how you can authenticate, see: Authentication

As soon as you do authentication and receive a valid token, it needs to be send in the next call to the API.

Endpoint

Example for such endpoint for TT server is

https://tt.api.sellercloud.com/rest/api/ProductImage

For your server endpoint will be:

https://{your_server_id}.api.sellercloud.com/rest/api/ProductImage

Request

  • Method Type: HttpPost
  • Authorization: Use Bearer Token + token received from token authentication
  • Header info: Content-Type: application/json
  • Body data:
    ParameterData TypeDescriptionIs Required
    ProductIDstringID of existing product.Yes
    ContentstringBase 64 encoded array of bytes.Yes
    FileNamestringName of the file.No
    CaptionstringCaption.No
    PropertiesobjectContains various properties regarding the imageNo

    Image Properties
    “IsDefault”: Applys this image as the default product image (Note: if this is the first image you upload for a product, it will be set to default regardless of if the property is true or false)
    “IsMainDescriptionImage”: On certain channels, such as Magento, the description image is assigned to show full size on the product details of a webpage. However, when publishing items to eBay, this full-size image is placed in the HTML product description template.
    “IsSupplementImage”: Images that are neither gallery images nor description images fall under the category of supplemental images. They can be displayed in the product’s extended image gallery. You can have up to 10.
    “IsSwatchImage”:Swatch Images are used by channels to display variations of different colors, fabrics, and other types of product dimensions. Normally, channels that work with Swatch Images accept 1 swatch image per product’s variation.

Request Example

Response

  • If server error appears, then response will be with status code 500 => Internal Server Error
  • If image is added successful, response will be status code 200 => Ok and response will be ID of the newly added image.

Demo in C#

Was this article helpful?

Next
Delete Product Image