AddCategory
Endpoint URL |
https://www.yournetosite.com.au/do/WS/NetoAPI |
Method |
POST |
XML Headers |
NETOAPI_ACTION |
AddCategory |
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 |
AddCategory |
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 add a new product category. |
XSD Schema |
AddCategory XSD | AddCategory Response XSD
|
AddCategory Post
Advanced (All Fields)
<?xml version="1.0" encoding="utf-8"?>
<AddCategory>
<Category>
<CategoryName>Shirts</CategoryName>
<ParentCategoryID>10</ParentCategoryID>
<SortOrder>1</SortOrder>
<Active>True</Active>
<OnSiteMap>True</OnSiteMap>
<OnMenu>True</OnMenu>
<AllowReviews>True</AllowReviews>
<RequireLogin>True</RequireLogin>
</Category>
</AddCategory>
Basic (Only Required Fields)
<?xml version="1.0" encoding="utf-8"?>
<AddCategory>
<Category>
<CategoryName>Shirts</CategoryName>
</Category>
</AddCategory>
Sample AddCategory Response (Success)
Category Added
<?xml version="1.0" encoding="utf-8"?>
<AddCategoryResponse>
<Category>
<CategoryID>12</CategoryID>
</Category>
<CurrentTime>2014-01-03 02:31:27</CurrentTime>
</AddCategoryResponse>
Sample AddCategory Response (Error)
Required field missing, category not added
<?xml version="1.0" encoding="utf-8"?>
<AddCategoryResponse>
<Category />
<CurrentTime>2014-01-03 02:31:27</CurrentTime>
<Ack>Error</Ack>
<Messages>
<Error>
<Message>CategoryName is a required field and is missing</Message>
<SeverityCode>Error</SeverityCode>
</Error>
</Messages>
</AddCategoryResponse>
Sample Add Multiple Categories in a Single Call Post
<?xml version="1.0" encoding="utf-8"?>
<AddCategory>
<Category>
<CategoryName>Shirts</CategoryName>
</Category>
<Category>
<CategoryName>Shorts</CategoryName>
</Category>
<Category>
<CategoryName>Pants</CategoryName>
</Category>
</AddCategory>
AddCategory Response Elements
AddCategory Post
You must specify at least one filter and one OutputSelector in your AddCategory request. These will determine the results returned.
XML POST
<?xml version="1.0" encoding="utf-8"?>
<AddCategory>
<Category>
<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>
<DatePosted>(DateTime)</DatePosted>
</Category>
</AddCategory>
JSON POST
{
"Category": [ {
"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",
"DatePosted":"DateTime"
} ]
}
<Category>
Element Name |
Required |
Field Type / Options |
CategoryName |
Required |
String(100) |
CategoryReference |
Required |
String(50) |
ShortDescription1 |
Required |
String(255) |
ShortDescription2 |
Required |
String(255) |
ShortDescription3 |
Required |
String(255) |
Description1 |
Required |
String(5000) |
Description2 |
Required |
String(5000) |
Description3 |
Required |
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) |
DatePosted |
Optional |
DateTime |
AddCategory Responses
XML Response
<?xml version="1.0" encoding="utf-8"?>
<AddCategory>
<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>
</AddCategory>
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