Manage Groups
Create, read, update, and delete saved groups and their rosters.
Create a Groupโ
POST /v1/groups
Scope: groups:write
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Group name (unique per supplier) |
organization_customer_id | integer | No | Organization customer that owns the roster |
member_customer_ids | array | No | Customer 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.
| Field | Type | Required | Description |
|---|---|---|---|
members | array | Yes | The complete new roster |
members[].customer_id | integer | Yes | Customer id (must belong to your supplier) |
members[].notes | string | No | Per-member notes (carried into bookings) |
members[].emergency_contact_name | string | No | Emergency contact name |
members[].emergency_contact_phone | string | No | Emergency 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โ
| Status | Code | Description |
|---|---|---|
| 401 | authentication_required | No API key provided |
| 403 | insufficient_scope | Key lacks groups:read / groups:write |
| 404 | not_found | Group or booking not found (or another supplier's) |
| 422 | group_invalid | Duplicate name or invalid member |
| 422 | validation_error | Missing/invalid fields |