Upload Product Image

Upload an image to a product, by supplying either a URL or the base64-encoded string of the image’s data.

REST

Request

https://api.neoncrm.com/neonws/services/api/store/uploadProductImage?userSessionId=[session id]&productId=78&imageType=jpg&imageUrl=(your image URL)

Response

{
    "uploadProductImageResponse": {
        "operationResult": "SUCCESS",
        "responseMessage": "Product Image created.",
        "responseDateTime": "2013-02-18T04:25:14.142-06:00",
        "imageSequenceId": 4
    }
}

SOAP

Request

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:neon="http://www.z2systems.com/schemas/neonws/">
   <soapenv:header>
       <soapenv:body>
          <neon:uploadproductimagerequest>
             <usersessionid>T1361240829693</usersessionid>
             <productid>78</productid>
             <imagelabel>test image</imagelabel>
             <imagedata>[Base64 encoded binary string]</imagedata>
             <imagetype>jpg</imagetype>
          </neon:uploadproductimagerequest>
       </soapenv:body>
    </soapenv:header>
</soapenv:envelope>

Response

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:body>
      <ns2:uploadproductimageresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
         <operationresult>SUCCESS</operationresult>
         <responsemessage>Product Image created.</responsemessage>
         <responsedatetime>2013-02-25T20:48:29.270-06:00</responsedatetime>
         <imagesequenceid>4</imagesequenceid>
      </ns2:uploadproductimageresponse>
   </soap:body>
</soap:envelope>

Request Parameters

Name Required Description
productId Yes
imageLabel Yes A label for the image.
imageUrl * A publicly available URL for an image. Either imageUrl or imageData must be provided.
imageData * The base64-encoded binary data of an image. Either imageUrl or imageData must be provided.
ImageType Yes Possible values include: png, gif, jpg.

Response Parameters

Name Required Description
sequenceId

Error Codes

Code Text Description
12291 Image size is too large.

12292 Image type is required.
12293 One of the Image data or image url is required. Either the imageUrl or imageData parameter must be provided in your request.
12294 Image URL is invalid.
12296 Image label is required.