Aurora API: Product Category
Product Category
Using this controller you can add, edit, delete and retrieve all Product Categories.
Add
Deferred: No
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Product>
<Category>
<Add>
<DisplayCategory>1</DisplayCategory>
<Name>Test category</Name>
<Title>Testing</Title>
<Header>This is the header.</Header>
<Footer>This is the footer.</Footer>
<URLName>test-category</URLName>
<URL>test-category</URL>
<MetaTitle>Testing</MetaTitle>
<MetaDescription>This is a description.</MetaDescription>
<MetaKeywords>very, cool, category</MetaKeywords>
<MetaRobots>noindex, nofollow</MetaRobots>
<CanonicalURL></CanonicalURL>
<Order>10</Order>
<OrderBy></OrderBy>
<ItemsPerPage>20</ItemsPerPage>
<IsLandingPage>1</IsLandingPage>
<IsMenuItem>1</IsMenuItem>
<CategoryLevel>0</CategoryLevel>
<ParentCategoryID>0</ParentCategoryID>
</Add>
</Category>
</Product>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data>
<CategoryID>5950</CategoryID>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Update
Deferred: No
The 'Update' call is almost identical to the 'Add' call with the only real difference being that most of the fields are now optional. While adding a new item requires that you provide all necessary information at once, when using the 'Update' method, you can just provide the information you wish to change and leave out all of the rest (excluding the relevant ID fields of course which are use to identify the records to be updated).
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Product>
<Category>
<Update>
<CategoryID>5950</CategoryID>
<Name>Test category updated</Name>
</Update>
</Category>
</Product>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data>
<CategoryID>5950</CategoryID>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Delete
Deferred: No
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Product>
<Category>
<Delete>
<CategoryIDs>
<CategoryID>5950</CategoryID>
</CategoryIDs>
</Delete>
</Category>
</Product>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data/>
</Response>
</Responses>
</AuroraResponseEnvelope>
Request Fields
Field | Values | API Version | Description | Required |
---|---|---|---|---|
CategoryIDs | Container | 1.4+ | No | |
CategoryIDs.CategoryID | Integer | 1.4+ | The ID of the Category to delete. | Only if 'CategoryIDs' is provided |
Get
This method allows access to the full list of product categories currently configured in Aurora. It is recommended that the Detail Level element is used to reduce the data overhead when requesting categories.
Deferred: No
Example Request to get all data for all categories:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Product>
<Category>
<Get>
<RequestID>1</RequestID>
</Get>
</Category>
</Product>
</Request>
</Requests>
</AuroraRequestEnvelope>
Example Request to get minimal data for all categories that belong to the parent category '123':
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Product>
<Category>
<Get>
<RequestID>1</RequestID>
<ParentCategoryID>123</ParentCategoryID>
<DetailLevel>Minimum</DetailLevel>
</Get>
</Category>
</Product>
</Request>
</Requests>
</AuroraRequestEnvelope>
This will only return the first-level categories belonging to the specified parent category, i.e. sub-categories of child categories are not included and must be fetched separately.
Example Response:
<?xml version="1.0" encoding="utf-8"?>
<AuroraResponseEnvelope>
<Header>
<Summary>
<Ack>OK</Ack>
<RequestsProcessed>1</RequestsProcessed>
<RequestsSucceeded>1</RequestsSucceeded>
<RequestErrors>0</RequestErrors>
</Summary>
</Header>
<Responses>
<Response>
<RequestID>1</RequestID>
<Ack>OK</Ack>
<Data>
<Product>
<Category>
<CategoryID>5950</CategoryID>
<DisplayCategory>1</DisplayCategory>
<Name>Test category</Name>
<Title>Testing</Title>
<Header>This is the header.</Header>
<Footer>This is the footer.</Footer>
<URLName>test-category</URLName>
<URL>test-category</URL>
<MetaTitle>Testing</MetaTitle>
<MetaDescription>This is a description.</MetaDescription>
<MetaKeywords>very, cool, category</MetaKeywords>
<MetaRobots/>
<CanonicalURL></CanonicalURL>
<Order>10</Order>
<OrderBy>price ASC</OrderBy>
<ItemsPerPage>20</ItemsPerPage>
<IsLandingPage>1</IsLandingPage>
<IsMenuItem>1</IsMenuItem>
<CategoryLevel>0</CategoryLevel>
<ParentCategoryID>0</ParentCategoryID>
<DateCreated>2012-03-21 12:32:58</DateCreated>
<DateModified>2012-03-21 12:50:00</DateModified>
</Category>
</Product>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Request Fields
Field | Values | API Version | Description | Required |
---|---|---|---|---|
DetailLevel | Detail Levels | 1.4+ | This allows the client to request varying volumes of data when receiving data back from the server. | No |
Language | "all" or language ISO | 1.4+ | This allows the client to request specific or all languages to be returned. If not included in the request the default language will be returned. | No |
Tracking | Request Tracking | 1.4+ | If this is set to 'unsent' then any orders previously retrieved via the current API account while 'tracking' was active will be excluded from the results. This allows for unique order exports to be set-up easily to avoid duplicate orders being downloaded. | No |
Interval | String interval | 1.1+ | P indicates the period (required) nY indicates the number of years nM indicates the number of months nD indicates the number of days T indicates the start of a time section (required if you are going to specify hours, minutes, or seconds) nH indicates the number of hours nM indicates the number of minutes nS indicates the number of seconds | No |
ParentCategoryID | Integer > 0 | 1.1+ | The Internal Aurora ID of the Product Category you would like to receive the first level categories of, i.e. if you request the Parent Category ID of 1, then only the categories that are directly below this will be returned and not any of these category's sub-children. | No - Only one of 'ParentCategoryID' or 'CategoryIDs' is permitted |
CategoryIDs | Container | 1.1+ | No - Only one of 'ParentCategoryID' or 'CategoryIDs' is permitted | |
CategoryIDs.CategoryID | Integer > 0 | 1.1+ | Any number of category IDs can be provided using a separate 'CategoryID' tag for each | Only if 'CategoryIDs' is provided |
DisplayCategory | 1 or 0 | 1.1+ | Whether the Product Category is configured to be publicly visible on the website via Aurora. | No |
Response fields
Field | Values | API Version | Description | Detail Levels |
CategoryID | Integer > 0 | 1.1+ | The Internal ID Aurora uses to identify a Product Category. | Minimum + |
DisplayCategory | String | 1.1+ | This denotes whether a category is to be shown on an Aurora website or not. | Minimum + |
OrderBy | String | 1.1+ | The default order in which products listed within this category should placed. | Full |
ItemsPerPage | Integer | 1.1+ | The default number of items to display per page. A value of zero means that there is no default set. | Full |
IsPromotion | 1 or 0 | 1.1+ | This has a very specific use for certain clients of Aurora. Please do not use this field unless otherwise instructed. | Full |
IsLandingPage | 1 or 0 | 1.1+ | This has a very specific use for certain clients of Aurora. Please do not use this field unless otherwise instructed. | Full |
ParentCategoryID | Integer > 0 | 1.1+ | The Internal Aurora ID of the Product Category to which this category belongs (i.e. that is is a 'child' of). | Minimum + |
Order | Integer | 1.1+ | Minimum + | |
CategoryLevel | Integer | 1.1+ | This has a very specific use for certain clients of Aurora. Please do not use this field unless otherwise instructed. | Full |
Title | String | 1.1+ | This is the title given to the category when shown on a page to the customer. It is usually used in Aurora websites for the Category's main 'H1' tag. | Full |
IsMenuItem | 1 or 0 | 1.1+ | This denotes whether a category should appear in the main navigation section of an Aurora website. Note: that this is not always used by the client's front-end. | Full |
MetaTitle | String | 1.1+ | The Meta Title used when displaying the category page to the customer. Note: that this is not always used by the client's front-end. | Full |
MetaDescription | String | 1.1+ | The Meta Description used when displaying the category page to the customer. Note: that this is not always used by the client's front-end. | Full |
MetaKeywords | String | 1.1+ | The Meta Description used when displaying the category page to the customer. Note: that this is not always used by the client's front-end. | Full |
MetaRobots | string | 1.5 | The Meta Robots used when displaying the category page to the customer. Note: that this is not always used by the client's front-end. | Full |
CanonicalURL | URL Encoded String | 1.1+ | This is often not used, however can allow the setting of the Canonical Meta Data to prevent excessive linkage being created within search engines. | Full |
Name | String | 1.1+ | The plain text name given to the Category. | Minimum + |
URLName | URL Encoded String | 1.1+ | The URL encoded version of the category name used when building it into any site URL. | Full |
URL | URL Encoded String | 1.1+ | The full URL path that can be used to access the category on the website. Simply add the client's domain name to the beginning to load the category product listing page. | Minimum + |
Header | String (HTML Permitted) | 1.1+ | This contains any HTML header that is applied to the category listing page when on display. Note: that this is not always used by the client's front-end. | Full |
Footer | String (HTML Permitted) | 1.1+ | This contains any HTML footer that is applied to the category listing page when on display. Note: that this is not always used by the client's front-end. | Full |
DateCreated | yyyy-mm-dd hh:mm:ss | 1.1+ | Full | |
DateModified | yyyy-mm-dd hh:mm:ss | 1.1+ | Full |
Updated over 2 years ago