User Management
Add a provider user or fetch available user profiles.
POST /users
Add a user to a provider.
Inputs
| Location | Field | Type | Required |
|---|---|---|---|
| body | first_name | string | Yes |
| body | last_name | string | Yes |
| body | dial_code | string | Yes |
| body | phone_number | string | Yes |
| body | email | string | Yes |
| body | role | string | Yes |
| body | password | string | No |
| body | is_admin | boolean | Yes |
Example
POST https://dispensaryapi.famasi.africa/api/v1/providers/usersReturns 201 with these fields:
| Field | Type |
|---|---|
id | string |
first_name | string |
last_name | string |
email | string |
phone_number | string |
dial_code | string |
role | string |
is_admin | boolean |
is_active | boolean |
Errors: 400 invalid request data, 500 server error.
GET /profiles
Fetch user profiles.
Returns 200 with these fields in data:
| Field | Type |
|---|---|
id | string |
email | string |
first_name | string |
last_name | string |
phone_number | string |
dial_code | string |
role | string |
is_verified | boolean |
is_active | boolean |
is_admin | boolean |
is_owner | boolean |
Errors: 401 unauthorized, 500 server error.
Authentication
Send a provider API key as x-api-key. Provider API keys →