UpdateCategory

Overview

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

Element Name Type Description Example Neto Version
Contains the child elements below.
The following are mandatory for an UpdateCategory POST
integer The unique ID for the order/invoice. Used for lookups and updates. 1 v5.3+
The following are optional for an UpdateCategory POST
string The name of the category T-shirt v5.3+
integer The id of the parent category. For category hierarchy purposes. Use GetCategory to get a list of category ID's. 12 v5.3+
integer The sort order of the category in relation to other categories. 3 v5.3+
boolean Flag to determine if category appears on website or not. True
False
v5.3+
boolean Flag to determine if category appears on XML sitemap or not. True
False
v5.3+
boolean Flag to determine if category appears on menus or not. True
False
v5.3+
string_50 Category reference field Home Pending Release
string_255 Category short description field 1 Pending Release
string_255 Category short description field 2 Pending Release
string_255 Category short description field 3 Pending Release
string Category Description Field 1 Pending Release
string Category Description Field 2 Pending Release
string Category Description Field 3 Pending Release

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

integer The unique ID for the category. 1
datetime The time the request was made. 2014-04-20 06:02:30
string The acknowledgement message. Success, Error or Warning
Contains messages child elements (see below).

string The error message returned. Request Error
string The severity code. Error
string The description of the error. Internal server error.

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>

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, we would like to hear from you!

Contact Us

Was this article useful?

Be notified when this page is updated. Optional.