Method: /event_categories
Retrieve a list of categories associated with this event.
Invocation
- This method can be invoked using either HTTP GET or HTTP POST.
- This method requires an API key
Request Parameters
| Parameter | Description | Type | Extra |
| key | Zvents Developer API key | String | required |
| id | ID of the event | Integer | required |
Example Request
- http://www.zvents.com/rest/event_categories?id=319540&key=YOUR_API_KEY
Response Parameters
The response lists the categories on the current event.
| Parameter | Description | Type |
| id | The unique ID for the category. | Integer |
| name | The name of the category. | String |
| parent_id | Categories are heirarchical. For instance, the Rock category is a child of the Music category. If this category has a parent, this field provides the id of parent category. | Integer |
| depth | Categories are hierarchichal. This field shows the depth in the category tree for the category. Categories that are at the top of the hierarchy are at depth zero and do not have parents. | Integer |
Example Response
<?xml version="1.0" encoding="UTF-8"?>
<rsp status="ok">
<stream_count>4</stream_count>
<category id="2">
<id>2</id>
<name>community</name>
<parent_id/>
<depth>0</depth>
</category>
<category id="4">
<id>4</id>
<name>dance</name>
<parent_id/>
<depth>0</depth>
</category>
<category id="6">
<id>6</id>
<name>food & dining</name>
<parent_id/>
<depth>0</depth>
</category>
<category id="33">
<id>33</id>
<name>wine</name>
<parent_id>6</parent_id>
<depth>1</depth>
</category>
</rsp>
Output Fields
Note: The REST API does not return all possible fields for each item by default. Since some response fields are not used by most API users, these fields are suppressed from the response by default in order to reduce latency for the common calls. Additional fields can be enabled in the response using the fields parameters documented in the 'Optimizing API calls for performance' section.
Output Formats
REST responses can be returned in a number of different formats include XML, JSON and CSV. Read the documentation on output formats.
Possible Errors
This method may return one of the following errors.
- Unknown Event ID: The event ID requested does not exist.
- Insufficient Permission: You are not allowed to see details for the event.
- Invalid API Key: The API key supplied is not valid.
- Call Limit Exceeded: The API key has exceeded the daily maximum number of calls.