REST Pub API: EventTemplateCategoryItems
The EventTemplateCategoryItems resource is used to retrieve the child items of categories as a flat list. Categories are represented in the system as a tree, and for a given node (or nodes) this endpoint will retrieve child items such as templates associated with that category. This resource is read-only.
Skip to an example request.
Categories can have two types of child items — templates, and simple links. Each item has minimum details of the owner CategoryID
, a Title
and a Uri
. If an item is a template, additional fields are available on it such as Summary
and AdvertisedDuration
. If required, client code can determine if a given item is a template or a link by referring to the EventTemplateID
field which is blank for link entries, but will have a value for entries representing templates.
This resource is often used in conjunction with the EventTemplateCategories resource. The Categories resource is used to retrieve the tree structure and its nodes, and the Items resource (this resource) is used to retrieve the content of each node. The screenshot below is an example of a page using data from this resource to show a list of template and links within a category. Note that the duration and offer columns are blank for the link item since these fields are applicable only for items representing templates.
When retrieving lists of items, the categoryIDs
query parameter is typically used to restrict a request to returning only the items for one or more categories.
Resource URI
/api/2012-02-01/pub/resources/eventtemplatecategoryitems/
General structure
This resource returns a collection entity with a StartIndex
, Count
, optional TotalCount
(if requested) and Items
collection with the results of the query.
{ "StartIndex":0, "Count":20, "Items":[ { "EventTemplateID":9002, "Title":"Motivation and Leadership", "Summary":"This Short Course is aimed directly at enabling you or your organisation to understand and practise the implementation of process mapping. The course will provide you with the tools and processes and a proven methodology for identifying your current AS IS business process and enable you to develop the SHOULD BE roadmap", "Code":"MOTI", "CategoryID":9032, "AdvertisedDuration":"3 hours", "Uri":"http://acme.example.org/courses/9002-motivation-and-leadership", "BestAdvertisedOffers":[ { "OfferID":0, "IsDiscountOffer":false, "OfferAmount":{ "CurrencyCode":"AUD", "AmountTaxExclusive":2181.82, "AmountTaxInclusive":2400.00, "FormattedAmountTaxExclusive":"$2,181.82", "FormattedAmountTaxInclusive":"$2,400.00", "TaxRate":{ "ShortName":"GST", "Name":"GST (10%)", "RatePercent":10.000 } } } ] }, { "CategoryID":9032, "Title":"Visit our partner site for more courses!", "Uri":"http://acme-partner.example.org/" }, { "EventTemplateID":9075, "Title":"Managing People", "Summary":"To enable participants to understand and interpret accounting reports and to use them to assist in making effective business decisions. To clown around.", "Code":"LEAD", "Tags":["Top 10","New in 2013"], "CategoryID":9032, "AdvertisedDuration":"1 day", "Uri":"http://acme.example.org/courses/9075-managing-people", "AdvertisedPresenters":[ { "PresenterID":11224, "Name":"Louise Saddler" }, { "PresenterID":11152, "Name":"Daisy Hume" } ], "Credits":[ { "Type":"PD points", "Value":2.50 }, { "Type":"PD hours", "Value":1.00 } ], "RegisterInterestUri":"http://demo.example.org/nz/register-interest?t=0&e=4857bd48-9a09-4eae-8ab2-d55c78a10526", "BestAdvertisedOffers":[ { "OfferID":0, "IsDiscountOffer":false, "OfferAmount":{ "CurrencyCode":"AUD", "AmountTaxExclusive":2181.82, "AmountTaxInclusive":2400.00, "FormattedAmountTaxExclusive":"$2,181.82", "FormattedAmountTaxInclusive":"$2,400.00", "TaxRate":{ "ShortName":"GST", "Name":"GST (10%)", "RatePercent":10.000 } } } ] }, ... ] }
Fields
Collection fields
Field | Description |
---|---|
StartIndex | The start index of the first item in the payload within the overall result set. Used for paging. |
Count |
The number of items returned in the payload in the Items array. This value is different to the total number of results in the overall result set (the TotalCount field). Used in paging and represents the page size. |
TotalCount | The total number of results in the overall result set. This field is not included unless explicitly requested in the optional parameters. |
Items | An array of item records. |
Item fields
Field | Description |
---|---|
CategoryID | An integer value representing the parent category of the category item. |
EventTemplateID | An integer value that identifies the Template ID of the category item. Applicable only if the item is a template, and is omitted if the item is a custom category item such as a link with text. |
Title | A string representing the title of the item in the category, up to 128 characters long. This is usually the name of the template, or the text to use for a link. |
Uri | A string with the URL of the item, such as the link to the template page with events. |
Summary | A string representing a short plain text one-line or one-paragraph summary of this category item, suitable for display in lists and search results. This field is only present if a summary is available for the item. |
SequenceIndex | An integer value representing the ordinal sort order of this child item within its parent category. Use this field to ensure items are displayed in the correct order in lists. |
Code |
A string with the code of the template. For example, MGMT101 . This field is omitted if the item is not a template.
|
AdvertisedDuration |
A string with descriptive text of the duration of the template and its events. For example, 4 hours .
|
AdvertisedPresenters |
An array of structures representing presenters associated with the template and its events. This field is omitted if the item is not a template.
Structure fields
|
BestAdvertisedOffers | An array of AdvertisedOffer structures representing the best generally available offers for the template and its events. This field is omitted if the item is not a template. |
Tags | An array of strings representing tags associated with the template. If the template has no tags, this field will be omitted. |
Credits | A structure describing any default credits associated with this template, such as professional development hours or points. The structure supports multiple definitions (such as points and hours). Exact field names depend on those configured for the platform. |
RegisterInterestUri | The URL of the page where interest can be registered by individuals to run a new event at a different location and/or time. Interest submissions are recorded as Leads in the platform. This field is included only if recording of interest is enabled for the template. |
RegisterPrivateInterestUri | The URL of the page where interest can be registered by individuals to run an event at a private or onsite location (for internal staff training, for example). Interest submissions are recorded as Leads in the platform. This field is included only if recording of interest in running an event privately is enabled for the template. |
HTTP GET
Returns a collection of child items for a specific category, or all categories.
Optional parameters
Parameter | Description |
---|---|
format |
String representing the required response format. Only required if an Accept HTTP header is not provided. Supported values: json
NOTE: If this parameter is missing and no valid Accept header is supplied, the API will return a 406 Not Acceptable response. |
callback |
The script function to call with response data
if this call is to be executed as a jsonp request. The HTTP content type for the response will be application/javascript . |
fields |
A list of comma-separated values representing the required fields for each record in the response payload. Supported values (field names) are listed in the Resource fields section. Field names are not case sensitive. Default is Title,Uri |
categoryIDs | A list of comma-separated values representing the IDs of categories to retrieve items for. If omitted, items for all categories will be retrieved. |
skip |
The number of records to skip in the source results before returning the response payload. Used for paging. Default is 0 . |
top |
The maximum number of records to return in the response payload. Used for paging. Default is 20 . The maximum supported value is 200 . |
includeTotalCount |
Boolean value determining whether an additional property (TotalCount ) is included in the response respresenting the total count of matching records on the server, independent of the count of records actually returned in the response payload. Used for paging. Supported values: true , false . Default is false . |
region |
String representing the region to use when retrieving event and template information. Used only in platforms that have multiple regions installed. This value influences which events are returned, and which currencies and tax rates are used when computing available offers for that region.
Supported values are dependent on regions installed on the platform. If not specified, the default region for the platform will be used when evaluating the request. |
Response
See HTTP response codes and error handling for more information on the possible responses and codes returned by this resource.
Example
Retrieve the items of categories 7000 and 7001, including their title, advertised duration, sort index, parent category and URI link.
GET /api/2012-02-01/pub/resources/eventtemplatecategoryitems/?format=json&categoryids=7000,7001&fields=CategoryID,Title,AdvertisedDuration,SequenceIndex,ViewUri
HTTP POST
Not supported.
HTTP PUT
Not supported.
HTTP DELETE
Not supported.