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

Element Name Type Description Example
`` integer The unique ID for the category. System generated. 34
`` datetime The time the request was made. 2014-04-20 06:02:30
`` string The acknowledgement message. Success, Error or Warning
`` Contains the child elements below.
`` string The error message returned. Request Error
`` string The severity code. Error
`` string The description of the error. Internal server error.

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)
CategoryName is a text string naming the category
CategoryReference Required String(50)
Internal Reference
ShortDescription1 Required String(255)
Primary Short Description
ShortDescription2 Required String(255)
Secondary Short Description
ShortDescription3 Required String(255)
Tertiary Short Description
Description1 Required String(5000)
Primary Content of the Category
Description2 Required String(5000)
Secondary Content of the Category
Description3 Required String(5000)
Tertiary Content of the Category
ParentCategoryID Optional Integer
ParentCategoryID is the parent category id
SortOrder Optional Integer
SortOrder
Active Optional Boolean(True, False)
Active is a boolean defining whether it is active or not
OnSiteMap Optional Boolean(True, False)
OnSiteMap
OnMenu Optional Boolean(True, False)
OnMenu
AllowReviews Optional Boolean(True, False)
Allow Reviews
RequireLogin Optional Boolean(True, False)
Require Login
DatePosted Optional DateTime
Date Posted

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>

Element Name Field Type
Error ErrorType
Warning WarningType

<Error>

Element Name Field Type
Message String
SeverityCode String
Description String

<Warning>

Element Name Field Type
Message String
SeverityCode String

If you are a vendor creating an integration with Neto by Maropost, we would like to hear from you!

Contact Us

Was this article useful?

Be notified when this page is updated. Optional.