Skip to main content

Manage Groups

Create, read, update, and delete saved groups and their rosters.

Create a Groupโ€‹

POST /v1/groups

Scope: groups:write

FieldTypeRequiredDescription
namestringYesGroup name (unique per supplier)
organization_customer_idintegerNoOrganization customer that owns the roster
member_customer_idsarrayNoCustomer ids to seed as members
curl -X POST "https://app.equipdash.com/api/v1/groups" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Tuesday Crew",
"member_customer_ids": [55, 56, 57]
}'

Returns 201 with the group, or 422 when the name is taken.

List Groupsโ€‹

GET /v1/groups

Scope: groups:read โ€” returns every group with its member count, ordered by name.

Get a Groupโ€‹

GET /v1/groups/{id}

Scope: groups:read โ€” one group with its full roster. 404 for another supplier's group.

Update a Groupโ€‹

PATCH /v1/groups/{id}

Scope: groups:write โ€” update name and/or organization_customer_id.

Replace the Rosterโ€‹

PUT /v1/groups/{id}/members

Scope: groups:write โ€” replaces the whole roster in one call.

FieldTypeRequiredDescription
membersarrayYesThe complete new roster
members[].customer_idintegerYesCustomer id (must belong to your supplier)
members[].notesstringNoPer-member notes (carried into bookings)
members[].emergency_contact_namestringNoEmergency contact name
members[].emergency_contact_phonestringNoEmergency contact phone

Delete a Groupโ€‹

DELETE /v1/groups/{id}

Scope: groups:write โ€” deletes the group and its member rows. Past bookings keep their participants (snapshot semantics); customers are never deleted.

Attach a Group to a Bookingโ€‹

POST /v1/bookings/{id}/groups

Scope: groups:write

Materializes the group's members into the booking's participants (deduped by customer) and stamps the booking with the group id for provenance.

curl -X POST "https://app.equipdash.com/api/v1/bookings/123/groups" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "group_id": 7 }'
{
"data": {
"booking_id": 123,
"group_id": 7,
"participants_count": 8
}
}

Errorsโ€‹

StatusCodeDescription
401authentication_requiredNo API key provided
403insufficient_scopeKey lacks groups:read / groups:write
404not_foundGroup or booking not found (or another supplier's)
422group_invalidDuplicate name or invalid member
422validation_errorMissing/invalid fields