POST v1/Products/{productId}/Image

Post a image for given Product. Specify a valid image Id to update an existing product image. Set the image Id to 0 to create a new one. There can be only one product image with Sequence=0, this is the main prdouct image.

Request Information

Requires Authorization!

URI Parameters

NameDescriptionTypeAdditional information
productId

integer

Required.

Body Parameters

The image.

Image
NameDescriptionTypeAdditional information
Id

Gets or sets the identifier.

integer

Must be 0

Filename

Gets or sets the filename.

string

None.

Sequence

Gets or sets the sequence.

integer

None.

Base64Data

Gets or sets the base64 data.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Filename": "sample string 2",
  "Sequence": 3,
  "Base64Data": "sample string 4"
}

application/xml, text/xml

Sample:
<Image xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Id>1</Id>
  <Filename>sample string 2</Filename>
  <Sequence>3</Sequence>
  <Base64Data>sample string 4</Base64Data>
</Image>

Response Information

Resource Description

Returns the imageFileId.


integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int>1</int>