UpdateCategory
Endpoint URL |
https://www.yournetosite.com.au/do/WS/NetoAPI |
Method |
POST |
XML Headers |
NETOAPI_ACTION |
UpdateCategory |
NETOAPI_USERNAME |
Your Neto Username (generate this in your Neto control panel) |
NETOAPI_KEY |
Your Neto API Secure Key (generate this in your Neto control panel) |
|
JSON Headers |
NETOAPI_ACTION |
UpdateCategory |
NETOAPI_USERNAME |
Your Neto Username (generate this in your Neto control panel) |
NETOAPI_KEY |
Your Neto API Secure Key (generate this in your Neto control panel) |
Accept |
application/json |
|
Description |
Use this call to update categories. A successful call to UpdateCategory returns the unique identifier (CategoryID) for the updated category, and the date and time the order was updated (CurrentTime) |
XSD Schema |
UpdateCategory XSD | UpdateCategory Response XSD
|
UpdateCategory Post
<?xml version="1.0" encoding="utf-8"?>
<UpdateCategory>
<Category>
<CategoryID>12</CategoryID>
<CategoryName>Pants</CategoryName>
<ParentCategoryID>10</ParentCategoryID>
<SortOrder>3</SortOrder>
<Active>True</Active>
<OnSiteMap>True</OnSiteMap>
<OnMenu>True</OnMenu>
<AllowReviews>True</AllowReviews>
<RequireLogin>True</RequireLogin>
</Category>
</UpdateCategory>
UpdateCategory Elements
Responses
Sample UpdateCategory Response (Success)
Category Added
<?xml version="1.0" encoding="utf-8"?>
<UpdateCategoryResponse>
<Category>
<CategoryID>N10157</CategoryID>
</Category>
<CurrentTime>2014-01-03 02:34:42</CurrentTime>
<Ack>Success</Ack>
</UpdateCategoryResponse>
UpdateCategory Response (Error)
Required field missing, Category not added
<?xml version="1.0" encoding="utf-8"?>
<UpdateCategoryResponse>
<Category />
<CurrentTime>2014-01-03 02:31:27</CurrentTime>
<Ack>Error</Ack>
<Messages>
<Error>
<Message>CategoryID is a required field and is missing</Message>
<SeverityCode>Error</SeverityCode>
</Error>
</Messages>
</UpdateCategoryResponse>
Sample UpdateCategory Response (Warning)
Non required field in wrong format, field ignored, Category added
<?xml version="1.0" encoding="utf-8"?>
<UpdateCategoryResponse>
<Category>
<CategoryID>N10158</CategoryID>
</Category>
<CurrentTime>2014-01-03 02:40:10</CurrentTime>
<Ack>Warning</Ack>
<Messages>
<Warning>
<Message>CategoryStatus Lost does not exist, setting as New</Message>
<SeverityCode>Warning</SeverityCode>
</Warning>
</Messages>
</UpdateCategoryResponse>
UpdateCategory Response Elements
UpdateCategory Post
You must specify at least one filter and one OutputSelector in your UpdateCategory request. These will determine the results returned.
XML POST
<?xml version="1.0" encoding="utf-8"?>
<UpdateCategory>
<Category>
<CategoryID>(Integer)</CategoryID>
<CategoryName>(String)</CategoryName>
<CategoryReference>(String)</CategoryReference>
<ShortDescription1>(String)</ShortDescription1>
<ShortDescription2>(String)</ShortDescription2>
<ShortDescription3>(String)</ShortDescription3>
<Description1>(String)</Description1>
<Description2>(String)</Description2>
<Description3>(String)</Description3>
<ParentCategoryID>(Integer)</ParentCategoryID>
<SortOrder>(Integer)</SortOrder>
<Active>(Boolean)</Active>
<OnSiteMap>(Boolean)</OnSiteMap>
<OnMenu>(Boolean)</OnMenu>
<AllowReviews>(Boolean)</AllowReviews>
<RequireLogin>(Boolean)</RequireLogin>
</Category>
</UpdateCategory>
JSON POST
{
"Category": [ {
"CategoryID":"Integer",
"CategoryName":"String",
"CategoryReference":"String",
"ShortDescription1":"String",
"ShortDescription2":"String",
"ShortDescription3":"String",
"Description1":"String",
"Description2":"String",
"Description3":"String",
"ParentCategoryID":"Integer",
"SortOrder":"Integer",
"Active":"Boolean",
"OnSiteMap":"Boolean",
"OnMenu":"Boolean",
"AllowReviews":"Boolean",
"RequireLogin":"Boolean"
} ]
}
<Category>
Element Name |
Required |
Field Type / Options |
CategoryID |
Required |
Integer |
CategoryName |
Optional |
String(100) |
CategoryReference |
Optional |
String(50) |
ShortDescription1 |
Optional |
String(255) |
ShortDescription2 |
Optional |
String(255) |
ShortDescription3 |
Optional |
String(255) |
Description1 |
Optional |
String(5000) |
Description2 |
Optional |
String(5000) |
Description3 |
Optional |
String(5000) |
ParentCategoryID |
Optional |
Integer |
SortOrder |
Optional |
Integer |
Active |
Optional |
Boolean(True, False) |
OnSiteMap |
Optional |
Boolean(True, False) |
OnMenu |
Optional |
Boolean(True, False) |
AllowReviews |
Optional |
Boolean(True, False) |
RequireLogin |
Optional |
Boolean(True, False) |
UpdateCategory Responses
XML Response
<?xml version="1.0" encoding="utf-8"?>
<UpdateCategory>
<Category>
<CategoryID>(Integer)</CategoryID>
</Category>
<Messages>
<Error>
<Message>(String)</Message>
<SeverityCode>(String)</SeverityCode>
<Description>(String)</Description>
</Error>
<Warning>
<Message>(String)</Message>
<SeverityCode>(String)</SeverityCode>
</Warning>
</Messages>
</UpdateCategory>
JSON Response
{
"Category": [ {
"CategoryID":"Integer"
} ] , "Messages": {
"Error": [ {
"Message":"String",
"SeverityCode":"String",
"Description":"String"
} ] , "Warning": [ {
"Message":"String",
"SeverityCode":"String"
} ]
}
}
<Category>
Element Name |
Field Type |
CategoryID |
Integer |
<Messages>
<Error>
<Warning>
If you are a vendor creating an integration with Neto by Maropost, we would like to hear from you!
Contact Us