0
# Event Management
1
2
Calendar event management system for scheduling meetings, calls, and tasks with contact invitations, event types, and comprehensive activity tracking integrated with CRM entities.
3
4
## Capabilities
5
6
### Event Listing and Search
7
8
List and search events with comprehensive filtering options.
9
10
```python { .api }
11
def list_events(name: str = None, event_type: str = None, status: str = None,
12
assigned_to: str = None, start_date: str = None,
13
limit: int = 10, offset: int = 0) -> dict:
14
"""
15
List events with filtering and search.
16
17
Args:
18
name (str, optional): Filter by event name (partial match)
19
event_type (str, optional): Filter by type ('Call', 'Meeting', 'Task')
20
status (str, optional): Filter by event status
21
assigned_to (str, optional): Filter by assigned user UUID
22
start_date (str, optional): Filter by start date (YYYY-MM-DD)
23
limit (int): Number of results per page (default: 10)
24
offset (int): Number of results to skip (default: 0)
25
26
Returns:
27
dict: Paginated events with metadata
28
29
Headers Required:
30
Authorization: Bearer <access_token>
31
organization-id: <org_uuid>
32
33
Example:
34
GET /api/events/?event_type=Meeting&start_date=2023-02-15&limit=5
35
36
Response:
37
{
38
"count": 12,
39
"next": "/api/events/?limit=5&offset=5",
40
"previous": null,
41
"results": [
42
{
43
"id": "event-uuid",
44
"name": "Client Strategy Meeting",
45
"event_type": "Meeting",
46
"status": "Planned",
47
"start_date": "2023-02-15",
48
"start_time": "14:00:00",
49
"end_date": "2023-02-15",
50
"contacts": ["contact1-uuid", "contact2-uuid"],
51
"created_on": "2023-01-15T10:30:00Z",
52
"assigned_to": ["user1-uuid"],
53
"teams": ["team1-uuid"]
54
}
55
]
56
}
57
"""
58
```
59
60
### Event Creation
61
62
Create new calendar events with scheduling and contact invitations.
63
64
```python { .api }
65
def create_event(event_data: dict) -> dict:
66
"""
67
Create a new calendar event.
68
69
Args:
70
event_data (dict): Event information and scheduling details
71
72
Returns:
73
dict: Created event details
74
75
Headers Required:
76
Authorization: Bearer <access_token>
77
organization-id: <org_uuid>
78
Content-Type: multipart/form-data (if including attachments)
79
80
Example:
81
POST /api/events/
82
{
83
"name": "Product Demo Call",
84
"event_type": "Call",
85
"status": "Planned",
86
"start_date": "2023-02-20",
87
"start_time": "10:00:00",
88
"end_date": "2023-02-20",
89
"contacts": ["contact1-uuid"],
90
"assigned_to": ["user1-uuid"],
91
"teams": ["team1-uuid"]
92
}
93
94
Response:
95
{
96
"id": "new-event-uuid",
97
"name": "Product Demo Call",
98
"event_type": "Call",
99
"status": "Planned",
100
"start_date": "2023-02-20",
101
"start_time": "10:00:00",
102
...event details...
103
}
104
"""
105
```
106
107
### Event Details and Operations
108
109
Get comprehensive event information and perform updates.
110
111
```python { .api }
112
def get_event(pk: str) -> dict:
113
"""
114
Get detailed event information.
115
116
Args:
117
pk (str): Event UUID
118
119
Returns:
120
dict: Complete event details with related entities
121
122
Headers Required:
123
Authorization: Bearer <access_token>
124
organization-id: <org_uuid>
125
126
Example:
127
GET /api/events/event-uuid/
128
129
Response:
130
{
131
"event_obj": {
132
"id": "event-uuid",
133
"name": "Client Strategy Meeting",
134
"event_type": "Meeting",
135
"status": "Planned",
136
"start_date": "2023-02-15",
137
"start_time": "14:00:00",
138
"end_date": "2023-02-15",
139
"contacts": ["contact1-uuid"],
140
"created_on": "2023-01-15T10:30:00Z",
141
"created_by": "user-uuid"
142
},
143
"assigned_to": [...assigned users...],
144
"teams": [...assigned teams...],
145
"comments": [...event comments...],
146
"attachments": [...event attachments...],
147
"users_mention": [...users for @mentions...]
148
}
149
"""
150
151
def update_event(pk: str, event_data: dict) -> dict:
152
"""
153
Update event information.
154
155
Args:
156
pk (str): Event UUID
157
event_data (dict): Updated event information
158
159
Returns:
160
dict: Updated event details
161
162
Headers Required:
163
Authorization: Bearer <access_token>
164
organization-id: <org_uuid>
165
166
Example:
167
PUT /api/events/event-uuid/
168
{
169
"name": "Client Strategy Meeting - Extended",
170
"start_time": "13:30:00",
171
"status": "Confirmed"
172
}
173
"""
174
175
def delete_event(pk: str) -> None:
176
"""
177
Delete an event.
178
179
Args:
180
pk (str): Event UUID
181
182
Returns:
183
None: 204 No Content on success
184
185
Headers Required:
186
Authorization: Bearer <access_token>
187
organization-id: <org_uuid>
188
189
Example:
190
DELETE /api/events/event-uuid/
191
"""
192
```
193
194
### Event Comments and Attachments
195
196
Manage comments and file attachments for events.
197
198
```python { .api }
199
def add_event_comment_or_attachment(pk: str, comment: str = None,
200
attachment: file = None) -> dict:
201
"""
202
Add comment or attachment to event.
203
204
Args:
205
pk (str): Event UUID
206
comment (str, optional): Comment text
207
attachment (file, optional): File to attach
208
209
Returns:
210
dict: Success response
211
212
Headers Required:
213
Authorization: Bearer <access_token>
214
organization-id: <org_uuid>
215
Content-Type: multipart/form-data (for attachments)
216
217
Example:
218
POST /api/events/event-uuid/
219
{
220
"comment": "Meeting rescheduled due to client availability"
221
}
222
"""
223
224
def edit_event_comment(pk: str, comment: str) -> dict:
225
"""
226
Edit an event comment.
227
228
Args:
229
pk (str): Comment UUID
230
comment (str): Updated comment text
231
232
Returns:
233
dict: Updated comment
234
235
Headers Required:
236
Authorization: Bearer <access_token>
237
238
Example:
239
PUT /api/events/comment/comment-uuid/
240
{
241
"comment": "Meeting confirmed with all attendees"
242
}
243
"""
244
245
def delete_event_comment(pk: str) -> None:
246
"""
247
Delete an event comment.
248
249
Args:
250
pk (str): Comment UUID
251
252
Returns:
253
None: 204 No Content on success
254
255
Headers Required:
256
Authorization: Bearer <access_token>
257
258
Example:
259
DELETE /api/events/comment/comment-uuid/
260
"""
261
262
def delete_event_attachment(pk: str) -> None:
263
"""
264
Delete an event attachment.
265
266
Args:
267
pk (str): Attachment UUID
268
269
Returns:
270
None: 204 No Content on success
271
272
Headers Required:
273
Authorization: Bearer <access_token>
274
275
Example:
276
DELETE /api/events/attachment/attachment-uuid/
277
"""
278
```
279
280
## Event Data Types
281
282
```python { .api }
283
class Event:
284
"""Event model representing calendar events and meetings"""
285
id: str # UUID
286
name: str # Required event name
287
event_type: str # 'Call', 'Meeting', 'Task'
288
status: str # Event status (e.g., 'Planned', 'Confirmed', 'Completed')
289
290
# Scheduling information
291
start_date: date # Event start date
292
start_time: time # Event start time
293
end_date: date # Event end date (optional)
294
295
# Entity associations
296
contacts: list[str] # Contact UUIDs for invitations
297
298
# Metadata
299
created_on: datetime
300
created_by: str # User UUID
301
org: str # Organization UUID
302
303
# Assignments
304
assigned_to: list[str] # User UUIDs
305
teams: list[str] # Team UUIDs
306
307
class EventComment:
308
"""Comments on events"""
309
id: str # UUID
310
comment: str
311
event: str # Event UUID
312
commented_on: datetime
313
commented_by: str # User UUID
314
315
class EventAttachment:
316
"""File attachments on events"""
317
id: str # UUID
318
attachment: str # File path/URL
319
event: str # Event UUID
320
created_on: datetime
321
created_by: str # User UUID
322
```
323
324
## Event Types and Scheduling
325
326
Events support different types for various business activities:
327
328
### Event Types
329
- **Call**: Phone calls and virtual calls with contacts
330
- **Meeting**: In-person or virtual meetings with multiple participants
331
- **Task**: Task-related events and deadlines
332
333
### Scheduling Features
334
- **Start Date/Time**: When the event begins
335
- **End Date**: Optional end date for multi-day events
336
- **Time Zones**: Events respect user/organization time zones
337
- **Recurring Events**: Support for repeating events (if implemented)
338
339
## Search and Filtering
340
341
Events support multiple search and filter options:
342
343
- **Name Search**: `name` parameter for partial text matching
344
- **Event Type**: Filter by call, meeting, or task events
345
- **Status Filter**: Filter by event status
346
- **Assignment**: `assigned_to` filtering by user UUID
347
- **Date Range**: Filter events by start date
348
- **Contact Participation**: Filter events involving specific contacts
349
350
All text-based filters support partial matching and are case-insensitive.
351
352
## Related Entities
353
354
Events can be associated with and relate to:
355
- **Contacts**: Event participants and invitees
356
- **Accounts**: Events related to customer accounts
357
- **Opportunities**: Sales meetings and calls
358
- **Tasks**: Task-related deadlines and meetings
359
- **Teams**: Team meetings and collaborative events
360
- **Users**: Event organizers and participants
361
- **Comments**: Event notes and follow-up information
362
- **Attachments**: Meeting agendas, notes, and related documents
363
364
This makes events central to scheduling and activity coordination across the CRM system.