REST
Request
https://api.neoncrm.com/neonws/services/api/store/createProductOption?userSessionId=T1361242226955&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
Response
{
"CreateProductOptionResponse": {
"operationResult": "SUCCESS",
"responseMessage": "Product option saved.",
"responseDateTime": "2013-02-18T21:04:15.052-06:00",
"optionId": 41
}
}
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:createproductoptionrequest>
<usersessionid>T1361784723792</usersessionid>
<productoption>
<name>edition</name>
<optionvalues>
<optionvalue>
<name>Standard</name>
<priceadjustment>-10</priceadjustment>
</optionvalue>
<optionvalue>
<name>Advanced</name>
<priceadjustment>10</priceadjustment>
</optionvalue>
<optionvalue>
<name>Ultimate</name>
<priceadjustment>20</priceadjustment>
</optionvalue>
</optionvalues>
</productoption>
<productid>91</productid>
</neon:createproductoptionrequest>
</soapenv:body>
</soapenv:header>
</soapenv:envelope>
Response
<soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:body>
<ns2:createproductoptionresponse xmlns:ns2="http://www.z2systems.com/schemas/neonws/">
<operationresult>SUCCESS</operationresult>
<responsemessage>Product option saved.</responsemessage>
<responsedatetime>2013-02-25T03:49:57.392-06:00</responsedatetime>
<optionid>44</optionid>
</ns2:createproductoptionresponse>
</soap:body>
</soap:envelope>
Request Parameters
Name |
Required |
Description |
productId |
Yes |
Product 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 |
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. |
|