Attendee Management Guide
This guide covers how to manage attendees in your GxP projects, including creating, updating, and querying attendee records.
Overview
Attendees are the core entity in GxP, representing individuals who participate in your events. Each attendee belongs to a project and can have:
- Custom field values
- Assigned attendee type
- Credentials (barcodes, RFID, etc.)
- Group memberships
Listing Attendees
Retrieve a paginated list of attendees for a project:
curl -X GET "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Items per page (max: 100) |
sort | string | Sort field (e.g., created_at, -last_name) |
filter[field] | string | Filter by field value |
include | string | Include related resources |
Example: Filtered Query
curl -X GET "https://api.gramercy.cloud/api/v1/projects/my-team/my-event/attendees?filter[attendee_type_id]=5&sort=-created_at&include=credentials" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
Creating an Attendee
Create a new attendee record:
curl -X POST "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@example.com",
"attendee_type_id": 1,
"custom_fields": {
"company": "Acme Corp",
"job_title": "Engineer"
}
}'
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
first_name | string | Yes | First name |
last_name | string | Yes | Last name |
email | string | No | Email address |
attendee_type_id | integer | No | Attendee type ID |
custom_fields | object | No | Custom field key-value pairs |
Response
{
"data": {
"id": 12345,
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@example.com",
"attendee_type_id": 1,
"attendee_type": {
"id": 1,
"name": "General Admission"
},
"custom_fields": {
"company": "Acme Corp",
"job_title": "Engineer"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}
Creating an attendee triggers the AttendeeCreated WebSocket event and may trigger the attendee.created webhook if configured.
Updating an Attendee
Update an existing attendee:
curl -X PUT "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees/{attendeeId}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"email": "jane.updated@example.com",
"custom_fields": {
"job_title": "Senior Engineer"
}
}'
Partial Updates
Use PATCH for partial updates:
curl -X PATCH "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees/{attendeeId}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"custom_fields": {
"job_title": "Senior Engineer"
}
}'
Deleting an Attendee
Remove an attendee from the project:
curl -X DELETE "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees/{attendeeId}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
Deleting an attendee also removes:
- Associated credentials
- Group memberships
- Form responses linked to the attendee
Searching Attendees
Use the search endpoint for advanced queries:
curl -X POST "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees/search" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"filters": [
{
"field": "email",
"operator": "like",
"value": "%@acme.com"
},
{
"field": "attendee_type_id",
"operator": "=",
"value": 1
}
],
"sort": [
{"field": "last_name", "direction": "asc"}
]
}'
Search Operators
| Operator | Description |
|---|---|
= | Equals |
!= | Not equals |
<, >, <=, >= | Comparison |
like | Pattern match (use % wildcard) |
in | Value in array |
not in | Value not in array |
is null | Field is null |
is not null | Field is not null |
Managing Credentials
Attendees can have multiple credentials for identification.
List Credentials
curl -X GET "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees/{attendeeId}/credentials" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
Add Credential
curl -X POST "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees/{attendeeId}/credentials" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"credential_type_id": 1,
"value": "ABC123456"
}'
Remove Credential
curl -X DELETE "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees/{attendeeId}/credentials/{credentialId}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
Attendee Types
Attendee types categorize attendees (e.g., "VIP", "Speaker", "General Admission").
List Attendee Types
curl -X GET "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendee-types" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"
Bulk Operations
Batch Create
Create multiple attendees in a single request:
curl -X POST "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees/batch" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"resources": [
{"first_name": "John", "last_name": "Doe"},
{"first_name": "Jane", "last_name": "Smith"}
]
}'
Batch Update
Update multiple attendees:
curl -X PATCH "https://api.gramercy.cloud/api/v1/projects/{teamSlug}/{projectSlug}/attendees/batch" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"resources": {
"12345": {"attendee_type_id": 2},
"12346": {"attendee_type_id": 2}
}
}'
Real-time Events
Subscribe to attendee events via WebSocket:
// Using Laravel Echo
Echo.private(`dashboard.project.${projectSlug}.attendees`)
.listen('AttendeeCreated', (e) => {
console.log('New attendee:', e.attendee);
})
.listen('AttendeeUpdated', (e) => {
console.log('Updated attendee:', e.attendee);
});
See the Real-time Events guide for more details.
Error Handling
Common Errors
| Status | Error | Solution |
|---|---|---|
| 400 | Validation failed | Check required fields and data types |
| 404 | Attendee not found | Verify the attendee ID exists |
| 409 | Duplicate entry | Email or credential already exists |
| 422 | Invalid data | Check custom field values |