المستشارين — people members can book, each with a link out (linkUrl).
Plan: every route needs the consultants feature (403 FEATURE_NOT_AVAILABLE).
Who reads what: GET / accepts an optional token.
- approved member → every ACTIVE consultant;
- guest or signed-in non-member → only consultants with
isGuestVisible: true, and only when the community exposes consultants to guests; otherwise an empty page. A token alone is not membership.createdByand the creator's email are removed for guests. - deactivated consultants (
isActive: false) are visible only toconsultants:manage— on the list (?isActive=falseis ignored for anyone else) and onGET /{id}(404).
Who writes: consultants:manage only, and not while restricted from
media or suspended (403 RESTRICTION_BLOCKED). Uploads count against the
storage quota. communityId in the body is optional; if sent it must equal
the path's (400 COMMUNITY_MISMATCH).
6 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/communities/{communityId}/consultants | List consultants |
POST | /api/communities/{communityId}/consultants | Create a consultant (consultants:manage) |
DELETE | /api/communities/{communityId}/consultants/{id} | Delete a consultant (consultants:manage) |
GET | /api/communities/{communityId}/consultants/{id} | One consultant (members) |
PUT | /api/communities/{communityId}/consultants/{id} | Edit a consultant (consultants:manage) |
POST | /api/communities/{communityId}/consultants/reorder | Set the display order (consultants:manage) |
GET /api/communities/{communityId}/consultantsAuth: optional — a token changes what you can see (see "Who may read what").
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
page | query | no | integer | — |
limit | query | no | integer | — |
search | query | no | string | — |
status | query | no | ConsultantStatus | — |
typeIds | query | no | string | Comma-separated or JSON array |
isActive | query | no | boolean | Managers only; ignored for everyone else |
Responses
| Status | Description | Body |
|---|---|---|
200 | A page (empty for a non-member of a private community) | object |
POST /api/communities/{communityId}/consultantsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
Request body (required) — multipart/form-data
Type: ConsultantWriteForm
Responses
| Status | Description | Body |
|---|---|---|
201 | data is the Consultant | — |
400 | name or linkUrl missing, invalid image, COMMUNITY_MISMATCH | — |
403 | Missing permission, RESTRICTION_BLOCKED, FEATURE_NOT_AVAILABLE, or storage quota exceeded | — |
DELETE /api/communities/{communityId}/consultants/{id}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Deleted | — |
404 | Not found | — |
GET /api/communities/{communityId}/consultants/{id}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | data is the Consultant | — |
404 | Missing | — |
PUT /api/communities/{communityId}/consultants/{id}Send only the fields to change. Also accepts isActive, sortOrder, and removeIcon / removeBanner = 'true'.
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Request body — multipart/form-data
Type: ConsultantWriteForm
Responses
| Status | Description | Body |
|---|---|---|
200 | data is the Consultant | — |
400 | Validation error or COMMUNITY_MISMATCH | — |
404 | Not found | — |
POST /api/communities/{communityId}/consultants/reorderAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
consultantIds | string (uuid)[] | yes | In the new order |
Responses
| Status | Description | Body |
|---|---|---|
200 | Reordered | — |