أنواع المستشارين — the categories consultants are filed under.
Reads follow the consultants section: PRIVATE community → members only
(404 otherwise), PUBLIC → anyone. Writes need consultants:manage and
current membership. A communityId in the body must equal the path's.
6 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/communities/{communityId}/consultants/types | List consultant types |
POST | /api/communities/{communityId}/consultants/types | Create a type (consultants:manage) |
DELETE | /api/communities/{communityId}/consultants/types/{id} | Delete a type (consultants:manage) |
GET | /api/communities/{communityId}/consultants/types/{id} | One type |
PUT | /api/communities/{communityId}/consultants/types/{id} | Edit a type (consultants:manage) |
GET | /api/communities/{communityId}/consultants/types/consultant/{consultantId} | The types of one consultant |
GET /api/communities/{communityId}/consultants/typesAuth: optional — a token changes what you can see (see "Who may read what").
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
q | query | no | string | — |
page | query | no | integer | — |
pageSize | query | no | integer | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | { success, data: ConsultantType[], ...page } | — |
404 | Private community and the caller is not a member | — |
POST /api/communities/{communityId}/consultants/typesAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | — |
description | string | no | — |
Responses
| Status | Description | Body |
|---|---|---|
201 | data is the ConsultantType | — |
400 | name missing | — |
DELETE /api/communities/{communityId}/consultants/types/{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 | — |
GET /api/communities/{communityId}/consultants/types/{id}Auth: optional — a token changes what you can see (see "Who may read what").
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | data is the ConsultantType | — |
404 | Not found | — |
PUT /api/communities/{communityId}/consultants/types/{id}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Request body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | — |
description | string | no | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | data is the ConsultantType | — |
GET /api/communities/{communityId}/consultants/types/consultant/{consultantId}Auth: optional — a token changes what you can see (see "Who may read what").
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
consultantId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | data is ConsultantType[] | — |