GetCategory
Endpoint URL | https://www.yournetosite.com.au/do/WS/NetoAPI | ||||||||
Method | POST | ||||||||
XML Headers |
|
||||||||
JSON Headers |
|
||||||||
Description | Use this call to get product category data. A successful call to GetCategory returns the data requested. | ||||||||
XSD Schema | GetCategory XSD | GetCategory Response XSD |
GetCategory Post
You must specify at least one Filter and one OutputSelector in your GetCategory request. These will determine the results returned.
Responses
Sample GetCategory Response (Success)
Includes all outputs
<?xml version="1.0" encoding="UTF-8"?>
<GetCategoryResponse>
<Category>
<CategoryID>13</CategoryID>
<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>
<CurrentTime>2014-04-07 11:50:40</CurrentTime>
<Ack>Success</Ack>
</GetCategoryResponse>
Sample GetCategory Response (Error)
Input call, no data returned.
<?xml version="1.0" encoding="utf-8"?>
<GetCategoryResponse>
<Category />
<CurrentTime>2014-01-03 02:31:27</CurrentTime>
<Ack>Error</Ack>
<Messages>
<Error>
<Message>Message describing reason for error.</Message>
<SeverityCode>Error</SeverityCode>
</Error>
</Messages>
</GetCategoryResponse>
Sample GetCategory Response (Warning)
Warning message, data returned.
<?xml version="1.0" encoding="UTF-8"?>
<GetCategoryResponse>
<Category>
<CategoryID>13</CategoryID>
<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>
<CurrentTime>2014-04-06 06:03:39</CurrentTime>
<Ack>Warning</Ack>
<Messages>
<Warning>
<Message>Message describing reason for warning.</Message>
<SeverityCode>Waring</SeverityCode>
</Warning>
</Messages>
</GetCategoryResponse>
GetCategory Post
You must specify at least one filter and one OutputSelector in your GetCategory request. These will determine the results returned.
XML POST
<?xml version="1.0" encoding="utf-8"?>
<GetCategory>
<Filter>
<CategoryID>20</CategoryID>
<ParentCategoryID>2</ParentCategoryID>
<CategoryName>T-Shirts</CategoryName>
<Active>True</Active>
<OnSiteMap>True</OnSiteMap>
<OnMenu>True</OnMenu>
<AllowReviews>True</AllowReviews>
<RequireLogin>True</RequireLogin>
<DatePostedFrom>(DateTime)</DatePostedFrom>
<DatePostedTo>(DateTime)</DatePostedTo>
<DateUpdatedFrom>(DateTime)</DateUpdatedFrom>
<DateUpdatedTo>(DateTime)</DateUpdatedTo>
<Page>(Integer)</Page>
<Limit>(Integer)</Limit>
<OutputSelector>CategoryID</OutputSelector>
<OutputSelector>ID</OutputSelector>
<OutputSelector>CategoryName</OutputSelector>
<OutputSelector>ParentCategoryID</OutputSelector>
<OutputSelector>Active</OutputSelector>
<OutputSelector>SortOrder</OutputSelector>
<OutputSelector>OnSiteMap</OutputSelector>
<OutputSelector>OnMenu</OutputSelector>
<OutputSelector>AllowReviews</OutputSelector>
<OutputSelector>CategoryReference</OutputSelector>
<OutputSelector>ShortDescription1</OutputSelector>
<OutputSelector>ShortDescription2</OutputSelector>
<OutputSelector>ShortDescription3</OutputSelector>
<OutputSelector>Description1</OutputSelector>
<OutputSelector>Description2</OutputSelector>
<OutputSelector>Description3</OutputSelector>
<OutputSelector>ExternalSource</OutputSelector>
<OutputSelector>ExternalReference1</OutputSelector>
<OutputSelector>ExternalReference2</OutputSelector>
<OutputSelector>ExternalReference3</OutputSelector>
<OutputSelector>DatePosted</OutputSelector>
<OutputSelector>DateUpdated</OutputSelector>
</Filter>
</GetCategory>
JSON POST
{
"Filter": {
"CategoryID":["Integer"/*, ...*/],
"ParentCategoryID":["Integer"/*, ...*/],
"CategoryName":["String"/*, ...*/],
"Active":"Boolean",
"OnSiteMap":"Boolean",
"OnMenu":"Boolean",
"AllowReviews":"Boolean",
"RequireLogin":"Boolean",
"DatePostedFrom":"DateTime",
"DatePostedTo":"DateTime",
"DateUpdatedFrom":"DateTime",
"DateUpdatedTo":"DateTime",
"Page":"Integer",
"Limit":"Integer",
"OutputSelector":["Enumeration"/*, ...*/]
}
}
<Filter>
Element Name | Required | Field Type / Options |
---|---|---|
CategoryID | Optional Supports Multiple Elements |
Integer |
ParentCategoryID | Optional Supports Multiple Elements |
Integer |
CategoryName | Optional Supports Multiple Elements |
String(100) |
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) |
DatePostedFrom | Optional | DateTime |
DatePostedTo | Optional | DateTime |
DateUpdatedFrom | Optional | DateTime |
DateUpdatedTo | Optional | DateTime |
Page | Optional | Integer |
Limit | Optional | Integer |
<OutputSelector>
Determines what is returned by the POST. Refer to the example response below this table or the related XSD schema for details and restrictions of each output element.
Note: Each OutputSelector should be a separate element in your post.
OutputSelector | Enumeration (CategoryID, ID, CategoryName, ParentCategoryID, Active, SortOrder, OnSiteMap, OnMenu, AllowReviews, CategoryReference, ShortDescription1, ShortDescription2, ShortDescription3, Description1, Description2, Description3, ExternalSource, ExternalReference1, ExternalReference2, ExternalReference3, DatePosted, DateUpdated) |
GetCategory Responses
XML Response
<?xml version="1.0" encoding="utf-8"?>
<GetCategory>
<Category>
<ID>(Integer)</ID>
<CategoryID>(Integer)</CategoryID>
<CategoryName>(String)</CategoryName>
<ParentCategoryID>(Integer)</ParentCategoryID>
<Active>(Boolean)</Active>
<SortOrder>(Boolean)</SortOrder>
<OnSiteMap>(Boolean)</OnSiteMap>
<OnMenu>(Boolean)</OnMenu>
<AllowReviews>(Boolean)</AllowReviews>
<RequireLogin>(String)</RequireLogin>
<CategoryReference>(String)</CategoryReference>
<ShortDescription1>(String)</ShortDescription1>
<ShortDescription2>(String)</ShortDescription2>
<ShortDescription3>(String)</ShortDescription3>
<Description1>(String)</Description1>
<Description2>(String)</Description2>
<Description3>(String)</Description3>
<ExternalSource>(String)</ExternalSource>
<ExternalReference1>(String)</ExternalReference1>
<ExternalReference2>(String)</ExternalReference2>
<ExternalReference3>(String)</ExternalReference3>
<DatePosted>(DateTime)</DatePosted>
<DateUpdated>(DateTime)</DateUpdated>
</Category>
<Messages>
<Error>
<Message>(String)</Message>
<SeverityCode>(String)</SeverityCode>
<Description>(String)</Description>
</Error>
<Warning>
<Message>(String)</Message>
<SeverityCode>(String)</SeverityCode>
</Warning>
</Messages>
</GetCategory>
JSON Response
{
"Category": [ {
"ID":"Integer",
"CategoryID":"Integer",
"CategoryName":"String",
"ParentCategoryID":"Integer",
"Active":"Boolean",
"SortOrder":"Boolean",
"OnSiteMap":"Boolean",
"OnMenu":"Boolean",
"AllowReviews":"Boolean",
"RequireLogin":"String",
"CategoryReference":"String",
"ShortDescription1":"String",
"ShortDescription2":"String",
"ShortDescription3":"String",
"Description1":"String",
"Description2":"String",
"Description3":"String",
"ExternalSource":"String",
"ExternalReference1":"String",
"ExternalReference2":"String",
"ExternalReference3":"String",
"DatePosted":"DateTime",
"DateUpdated":"DateTime"
} ] , "Messages": {
"Error": [ {
"Message":"String",
"SeverityCode":"String",
"Description":"String"
} ] , "Warning": [ {
"Message":"String",
"SeverityCode":"String"
} ]
}
}
<Category>
Element Name | Field Type |
---|---|
ID | Integer |
CategoryID | Integer |
CategoryName | String |
ParentCategoryID | Integer |
Active | Boolean |
SortOrder | Boolean |
OnSiteMap | Boolean |
OnMenu | Boolean |
AllowReviews | Boolean |
RequireLogin | String |
CategoryReference | String |
ShortDescription1 | String |
ShortDescription2 | String |
ShortDescription3 | String |
Description1 | String |
Description2 | String |
Description3 | String |
ExternalSource | String |
ExternalReference1 | String |
ExternalReference2 | String |
ExternalReference3 | String |
DatePosted | DateTime |
DateUpdated | DateTime |
<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 |