API Get participants
From zFairs Contest Management
Contents
Get Participants
Returns all student/participant records for a fair, including project links, school/teacher, tags, waivers, and fee status when fees are tracked.
Authentication
All data API calls are POST (unless noted) with JSON body:
| Field | Required | Description |
|---|---|---|
ApiKey |
Yes* | Private API key for your site. Prefer this over username/password. |
Username / Password |
Yes* | Alternate auth if not using ApiKey. |
FairId |
Yes | Fair GUID from the site URL (f query parameter).
|
Body |
Depends | Request payload. Use {} when no body fields are needed.
|
- Provide either
ApiKeyorUsername+Password.
Calls must be run server-side — do not expose your API key in a browser.
Response envelope
Most endpoints return:
{
Success: true,
Message: null, // error text when Success is false
Body: { ... } // endpoint-specific payload
}
Request
fetch('/api/data/participants', {
method:'POST',
headers:{'Content-Type': 'application/json'},
body: JSON.stringify({
ApiKey:'<Private key>',
FairId: '9df61f13-474b-442f-ac1f-edca7348ef71', // value of f in your URL
Body: {}
})
})
.then(response => response.json())
.then(data=>{console.log('Success: ',data);})
.catch((error)=>{console.log('Error: ', error);});Response
On success Body looks like:
{
Success: true,
Message: null,
Body: {
participants: [{
id: "person-guid",
idInt: 1001,
firstName: "Alice",
lastName: "Example",
username: "alice.example",
email: "alice@example.com",
phone: "800-000-0000",
address: "123 Main St",
address2: "Apt 2",
city: "Ogden",
state: "UT",
zip: "84401",
countryName: "United States",
projectId: "AB-123", // display project id
projectKey: "36-char-GUID", // project GUID
title: "Project Title",
studentId: "S-001",
divisionName: "Junior",
category: { Id: "12", Name: "Biology" },
teamProject: true,
school: { Id: "24", Name: "Example School" },
teacher: { Id: "55", Name: "Jane Smith" },
tags: ["VIP"],
gender: "F",
shirtSize: "M",
holdHarmlessSigned: "2024-02-01T00:00:00Z",
medialReleaseSigned: "2024-02-01T00:00:00Z", // note: field name is medialReleaseSigned
mediaRelease: true,
permissionsAndWaiversSigned: "2024-02-01T00:00:00Z",
feePaid: true // null when the fair does not track registration fees
}]
}
}
Field notes
feePaidis only populated when the fair has a registration fee type configured; otherwise it isnull.- Fee tracking can be by person or by project depending on fair settings.
category,school, andteacheruse{ Id, Name }.- For project-scoped participants with flattened columns, see API Get Projects.
Related APIs
- API Get Projects
- API Add Person / API Add Project
- API Get Teachers / API Get Schools
- API Get Tags / API Set Tags