Aurora API: Content Category
Content Category
Using this controller you can add, edit, delete and retrieve all Content Categories.
Add
Deferred: No
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Content>
<Category>
<Add>
<CategoryName>My category</CategoryName>
<CategoryDescription>This is my category</CategoryDescription>
<CategoryURL>my-category</CategoryURL>
</Add>
</Category>
</Content>
</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>8</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:
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Content>
<Category>
<Update>
<CategoryID>8</CategoryID>
<CategoryDescription>This is my new category</CategoryDescription>
</Update>
</Category>
</Content>
</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>8</CategoryID>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Delete
Deferred: No
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Content>
<Category>
<Delete>
<CategoryIDs>
<CategoryID>8</CategoryID>
</CategoryIDs>
</Delete>
</Category>
</Content>
</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
Deferred: No
Records returned by this call are currently always ordered by the date they were created. This may change, so you should consider specifying the sort order of your results if this is going to affect your systems performance in the future.
The 'tracking' attribute can be used to denote whether or not tracking should be enabled, please see Request Tracking for more details.
Example Request:
<?xml version="1.0" encoding="utf-8"?>
<AuroraRequestEnvelope>
<Header>
<AuthToken>...</AuthToken>
</Header>
<Requests>
<Request>
<Content>
<Category>
<Get>
<Limit>100</Limit>
<Paging>
<Limit>1</Limit>
<Page>1</Page>
</Paging>
</Get>
</Category>
</Content>
</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>
<Paging>
<Token>09523cc99a45a72f34807d5d5fcc9eb6747</Token>
</Paging>
<Data>
<Content>
<Category>
<CategoryID>1</CategoryID>
<CategoryParentID>0</CategoryParentID>
<CategoryName language="en-gb">Aurora Commerce</CategoryName>
<CategoryDescription language="en-gb"/>
<CatgegoryURL language="en-gb">Aurora Commerce</CatgegoryURL>
</Category>
<Category>
<CategoryID>8</CategoryID>
<CategoryParentID>0</CategoryParentID>
<CategoryName language="en-gb">My category</CategoryName>
<CategoryDescription language="en-gb">This is my new category.</CategoryName>
<CatgegoryURL language="en-gb">my-category</CatgegoryURL>
</Category>
</Content>
</Data>
</Response>
</Responses>
</AuroraResponseEnvelope>
Request Fields
Field | Values | API Version | Description | Required |
---|---|---|---|---|
CategoryIDs | Container | 1.4+ | No | |
CategoryIDs.CategoryID | Integer | 1.4+ | The ID to restrict the result to. | Only if 'CategoryIDs' is provided |
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 |
Limit | Integer > 0 | 1.4+ | The number of records to return before beginning to page | No |
Paging | Container | 1.4+ | See Paging | No |
Paging.Token | String | 1.4+ | This is the Token string issued from any previous Get call featuring paging. Providing this will have the API collect the data from the previously generated set of data, ensuring accurate and consistent dataset results for every page. You cannot change the request properties previously provided when using a Token, so these are ignored by the API. | No |
Paging.Limit | Integer > 0 | 1.4+ | The number of results to return in the page being requested | No |
Paging.Page | Integer > 0 | 1.4+ | The page number to return the results for | Only if 'Token' is provided |
Updated over 2 years ago