Skip to content

Pilot Groups

Role names and user_group_id values are listed in User groups.

Groups of pilots for bulk operations (activation, welcome emails, billing). All endpoints require manager access (user_group_id ≤ 150 — Chief Pilot and above), except manager_do and manager_welcomize which require user_group_id ≤ 150 (Chief Pilot and above).


GET /pilot_groups/manager_index.json

List all pilot groups for the company. When called as a JSON request, returns groups with a pilot_count field. Ordered alphabetically by name.

{
"pilotGroups": [
{
"PilotGroup": {
"id": "abc123",
"company_id": "42",
"name": "Instructors",
"pilot_count": 5
}
}
]
}

GET /pilot_groups/manager_view/{id}.json

Full details for a single group including all member pilots. Each user also shows which other groups they belong to.

Parameter Type Description
id UUID Pilot group ID
{
"PilotGroup": {
"PilotGroup": {
"id": "abc123",
"company_id": "42",
"name": "Instructors"
},
"User": [
{
"id": "100",
"active": true,
"email": "pilot@example.com",
"email_status": "confirmed",
"user_group_id": "170",
"UserGroup": { "name": "Pilot" },
"UserDetail": { "name": "John", "surname": "Doe" },
"PilotGroups": []
}
]
}
}

GET /pilot_groups/manager_pilots/{id}.json

Returns the members of a pilot group as a flat array — one object per pilot, with no nested User/UserDetail wrappers. Useful when you only need the member list (e.g. to populate a picker) without the full group payload. Company-scoped and excludes deleted users.

Note: email and email_status live on the users table (per-company row), not on UserCredential.

Parameter Type Description
id UUID Pilot group ID
{
"pilots": [
{
"id": "100",
"email": "pilot@example.com",
"email_status": "confirmed",
"name": "John",
"surname": "Doe",
"user_group_id": "170",
"active": true
}
]
}

Returns 404 if the group does not exist for the company.


POST /pilot_groups/manager_add.json

Create a new pilot group.

Field Type Required Description
PilotGroup.name string Yes Group name
{
"result": true,
"message": "The new group has been created."
}

POST /pilot_groups/manager_edit/{id}.json

PUT /pilot_groups/manager_edit/{id}.json

Update a pilot group. A GET to this endpoint returns the current group data (including its members) for pre-populating a form.

Parameter Type Description
id UUID Pilot group ID
Field Type Required Description
PilotGroup.name string Yes Group name
PilotGroup.User array No Array of {"id": "..."} objects to set group membership
{
"result": true,
"message": "The Pilot group has been saved."
}

POST /pilot_groups/manager_delete/{id}.json

DELETE /pilot_groups/manager_delete/{id}.json

Delete a pilot group. Members are not deleted — only the group record and memberships.

Parameter Type Description
id UUID Pilot group ID
{
"result": true,
"message": "The Pilot group has been deleted."
}

GET /pilot_groups/manager_do/{pilotGroupId}/{action}.json

Activate or deactivate all pilots in a group. Only affects users whose current active status differs from the target state.

Parameter Type Description
pilotGroupId UUID Pilot group ID
action string 1 to activate, 0 to deactivate
{
"result": true,
"message": "Pilot status changed"
}

POST /pilot_groups/manager_welcomize/{pilotGroupId}.json

Send welcome / account confirmation emails to all active members of the group who have an email address.

Parameter Type Description
pilotGroupId UUID Pilot group ID
{
"result": true,
"message": "3 emails sent"
}