API v1 Reference

Update Product Option

REST

Request

https://api.neoncrm.com/neonws/services/api/store/updateProductOption?userSessionId=[session id]&productOption.name=size&productOption.optionValues.optionValue.name=small&productOption.optionValues.optionValue.priceAdjustment=-5&productOption.optionValues.optionValue.name=medium&productOption.optionValues.optionValue.priceAdjustment=0&productOption.optionValues.optionValue.name=large&productOption.optionValues.optionValue.priceAdjustment=5&productId=78&productOption.optionId=43

Response

{
    "UpdateProductOptionResponse": {
        "operationResult": "SUCCESS",
        "responseMessage": "Product option updated.",
        "responseDateTime": "2013-02-20T00:50:52.814-06:00"
    }
}

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:updateproductoptionrequest>
            <usersessionid>T1361844704954</usersessionid>
            <productoption>
                <optionid>38</optionid>
                <name>size</name>
                <optionvalues>
                   <optionvalue>
                      <optionvalueid>131</optionvalueid>
                      <name>small</name>
                      <priceadjustment>-10</priceadjustment>
                   </optionvalue>
                    <optionvalue>
                      <optionValueId></optionValueId>
                      <name>medium</name>
                      <priceadjustment>10</priceadjustment>
                   </optionvalue>
                      <optionvalue>
                      <optionValueId></optionValueId>
                      <name>large</name>
                      <priceadjustment>20</priceadjustment>
                   </optionvalue>
                </optionvalues>
             </productoption>
          </neon:updateproductoptionrequest>
       </soapenv:body>
    </soapenv:header>
</soapenv:envelope>

Response

<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:body>
      <ns2:updateproductoptionresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
         <operationresult>SUCCESS</operationresult>
         <responsemessage>Product option updated.</responsemessage>
         <responsedatetime>2013-02-25T20:41:53.342-06:00</responsedatetime>
      </ns2:updateproductoptionresponse>
   </soap:body>
</soap:envelope>

Request Parameters

Name Required Description
productId Yes Product ID
productOption.optionId Yes Product Option ID
productOption.name Yes Name of the new product option
productOption.optionValues.optionValue.name Yes This parameter should be repeated for each option value.
productOption.optionValues.optionValue.priceAdjustment This parameter should be repeated for each option value. Value can be either a positive or negative integer (-5, 2, 100)

Response Parameters

Name Required Description
optionId Yes

Error Codes

Code Text Description
12500 Product option id is required.
12501 Product option id is invalid.
12502 Product option name is required.
12503 Product id for option is required.
12504 Product id for option is invalid.
12505 A product can only have maximum 3 options.
12506 A product option should have at least one option value.
12507 Product option value name is required.