get https://api.introvoke.com/api/v1/company//events
Query Parameters
startDate
(string, optional) - Start date filter (ISO 8601 format)endDate
(string, optional) - End date filter (ISO 8601 format)includeSubCompanies
(boolean, optional, default: true) - Include events from sub-companieslastDay
(boolean, optional) - Get events from the last 24 hourslast7days
(boolean, optional) - Get events from the last 7 dayslast30days
(boolean, optional) - Get events from the last 30 days
Usage Examples
Basic Usage
# Get all events (default - includes sub-companies)
GET /v1/company/abc123/events
# Get events from parent company only
GET /v1/company/abc123/events?includeSubCompanies=false
Date Filtering
# Get events from date range
GET /v1/company/abc123/events?startDate=2024-01-01T00:00:00Z&endDate=2024-12-31T23:59:59Z
# Get events from specific date onwards
GET /v1/company/abc123/events?startDate=2024-06-01T00:00:00Z
Preset Filters
# Get events from last 24 hours
GET /v1/company/abc123/events?lastDay=true
# Get events from last 7 days
GET /v1/company/abc123/events?last7days=true
# Get events from last 30 days
GET /v1/company/abc123/events?last30days=true
Combined Filtering
# Last 7 days, excluding sub-companies
GET /v1/company/abc123/events?last7days=true&includeSubCompanies=false
Filter Rules
Valid Combinations
- No filters (returns all events)
- Manual dates only (
startDate
and/orendDate
) - One preset filter only (
lastDay
,last7days
, orlast30days
) - Any date filter +
includeSubCompanies
Invalid Combinations
- Multiple preset filters together
- Preset filters + manual date parameters
Examples of Invalid Requests
# Multiple preset filters - NOT ALLOWED
GET /v1/company/abc123/events?lastDay=true&last7days=true
# Mixing preset with manual dates - NOT ALLOWED
GET /v1/company/abc123/events?last7days=true&startDate=2024-01-01T00:00:00Z
Default Behavior
When no parameters are provided:
- Returns ALL events from parent company + sub-companies
- No date restrictions applied
Common Use Cases
Dashboard
GET /v1/company/abc123/events?last30days=true
Company Reports
GET /v1/company/abc123/events?includeSubCompanies=false&startDate=2024-01-01T00:00:00Z
Recent Activity
GET /v1/company/abc123/events?lastDay=true
Response Fields
Key fields in the response:
uid
- Unique event identifiername
- Event namestartDate
- Event start date (ISO 8601)endDate
- Event end date (ISO 8601)timezone
- Event timezoneisEventLive
- Whether event is currently liveisEventCancelled
- Whether event is cancelledcompany
- Company information object
Notes
- Date filtering is applied at database level for performance
- Use ISO 8601 format for dates (e.g.,
2024-01-15T10:00:00Z
) - Preset filters are more efficient than manual date calculations
- Default behavior includes sub-company events unless explicitly set to false