← Technical API reference

Backend resource · STATIC DECLARATIONS

User API reference · mansoq-core

Static source contract for User: 16 declared or inherited operation mappings, schema/field evidence and authorization/refusal references. Deployment and behavioral review remain explicit.

Static API contract — behavior review pending. Source baseline f6e9f05f76d4.

Enable JavaScript to inspect structured operation, parameter, schema and permission evidence. Download this reference and its evidence.

Declared route and availability

This resource is declared in mansoq-core at /api/v1/users/. verified core mount in config/urls.py A registered path and an indexed handler do not prove deployment availability, user permission or production readiness.

Operation map

Method Path Action Evidence
GET /api/v1/users/ list declared/inherited method
POST /api/v1/users/ create declared/inherited method
GET /api/v1/users/{username}/ retrieve declared/inherited method
PUT /api/v1/users/{username}/ update declared/inherited method
PATCH /api/v1/users/{username}/ partial_update declared/inherited method
DELETE /api/v1/users/{username}/ destroy declared/inherited method
POST /api/v1/users/upsert/ upsert @action declaration
GET /api/v1/users/getcurrentuser/ getcurrentuser @action declaration
GET /api/v1/users/{username}/check_availability/ check_availability @action declaration
POST /api/v1/users/{username}/profile_picture/ profile_picture @action declaration
DELETE /api/v1/users/{username}/profile_picture/ profile_picture @action declaration
PATCH /api/v1/users/{username}/pnconfig/ pnconfig @action declaration
GET /api/v1/users/{username}/pnconfig/ pnconfig @action declaration
POST /api/v1/users/{username}/generate_service_account_token/ generate_service_account_token @action declaration
DELETE /api/v1/users/{username}/revoke_service_account_token/ revoke_service_account_token @action declaration
POST /api/v1/users/set_preferences/ set_preferences @action declaration

list · GET

GET /api/v1/users/ — action list. static contract extracted; runtime/permission/payload behavior review pending.

response: UserSpec. Declared fields below; inherited fields are retained in the schema inventory.

Field Type Required Constraints
meta dict false No extra constraint extracted
id UUID4 | None false No extra constraint extracted
first_name str true No extra constraint extracted
last_name str true No extra constraint extracted
phone_number str true max_length: 14
prefix str | None false max_length: 10
suffix str | None false max_length: 50
last_login str true No extra constraint extracted
profile_picture_url str true No extra constraint extracted
gender str true No extra constraint extracted
username str true No extra constraint extracted
mfa_enabled bool false No extra constraint extracted
deleted bool false No extra constraint extracted
role_orgs dict true No extra constraint extracted

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

create · POST

POST /api/v1/users/ — action create. static contract extracted; runtime/permission/payload behavior review pending.

request: UserCreateSpec. Declared fields below; inherited fields are retained in the schema inventory.

Field Type Required Constraints
meta dict false No extra constraint extracted
id UUID4 | None false No extra constraint extracted
first_name str true No extra constraint extracted
last_name str true No extra constraint extracted
phone_number str true max_length: 14
prefix str | None false max_length: 10
suffix str | None false max_length: 50
gender GenderChoices true No extra constraint extracted
geo_organization UUID4 | None false No extra constraint extracted
password str | None false No extra constraint extracted
username str true No extra constraint extracted
email str true No extra constraint extracted
is_service_account bool false No extra constraint extracted
role_orgs list[UserRoleOrgCreateSpec] true No extra constraint extracted

response: UserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.

Field Type Required Constraints
meta dict false No extra constraint extracted
id UUID4 | None false No extra constraint extracted
first_name str true No extra constraint extracted
last_name str true No extra constraint extracted
phone_number str true max_length: 14
prefix str | None false max_length: 10
suffix str | None false max_length: 50
last_login str true No extra constraint extracted
profile_picture_url str true No extra constraint extracted
gender str true No extra constraint extracted
username str true No extra constraint extracted
mfa_enabled bool false No extra constraint extracted
deleted bool false No extra constraint extracted
role_orgs dict true No extra constraint extracted
geo_organization dict true No extra constraint extracted
created_by dict | None false No extra constraint extracted
email str true No extra constraint extracted
flags list[str] false No extra constraint extracted
is_service_account bool true No extra constraint extracted

Observed authorization checks: can_create_service_account, can_create_user, can_manage_organization_users_obj. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: You do not have permission to create service accounts; PermissionDenied: You do not have permission to create Users; ValidationError: Role organization is not a role organization; PermissionDenied: Access denied for requested roles; IntegrityError: User creation failed due to email error..

retrieve · GET

GET /api/v1/users/{username}/ — action retrieve. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

response: UserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.

The declared field table is shown at its first occurrence in this reference; this operation links the same schema.

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

update · PUT

PUT /api/v1/users/{username}/ — action update. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

request: UserUpdateSpec. Declared fields below; inherited fields are retained in the schema inventory.

Field Type Required Constraints
meta dict false No extra constraint extracted
id UUID4 | None false No extra constraint extracted
first_name str true No extra constraint extracted
last_name str true No extra constraint extracted
phone_number str true max_length: 14
prefix str | None false max_length: 10
suffix str | None false max_length: 50
gender GenderChoices true No extra constraint extracted
geo_organization UUID4 | None false No extra constraint extracted

response: UserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.

The declared field table is shown at its first occurrence in this reference; this operation links the same schema.

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

Declared refusal/error evidence: PermissionDenied: You do not have permission to update this user.

partial_update · PATCH

PATCH /api/v1/users/{username}/ — action partial_update. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

request: UserUpdateSpec. Declared fields below; inherited fields are retained in the schema inventory.

The declared field table is shown at its first occurrence in this reference; this operation links the same schema.

response: UserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.

The declared field table is shown at its first occurrence in this reference; this operation links the same schema.

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

Declared refusal/error evidence: PermissionDenied: You do not have permission to update this user.

destroy · DELETE

DELETE /api/v1/users/{username}/ — action destroy. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

Explicit response statuses in observed code: status.HTTP_204_NO_CONTENT. Other branches/framework exception handling may differ.

Declared refusal/error evidence: PermissionDenied: You do not have permission to delete this user.

upsert · POST

POST /api/v1/users/upsert/ — action upsert. static contract extracted; runtime/permission/payload behavior review pending.

Directly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):

Location Field Declared/inferred read type Requiredness evidence
body datapoints not declared at read site not established

Observed authorization checks: can_create_service_account, can_create_user, can_manage_organization_users_obj. Helper/queryset evidence is included; this is not proof of complete security review.

Explicit response statuses in observed code: 400. Other branches/framework exception handling may differ.

Declared refusal/error evidence: RestFrameworkValidationError: Invalid request data; RestFrameworkValidationError: No datapoints provided; RestFrameworkValidationError: Too many datapoints provided; PermissionDenied: You do not have permission to update this user; PermissionDenied: You do not have permission to create service accounts; PermissionDenied: You do not have permission to create Users; ValidationError: Role organization is not a role organization; PermissionDenied: Access denied for requested roles; IntegrityError: User creation failed due to email error..

Conditional gates: conditional/computed expression; inspect pinned declaration comparison settings.MAX_DATAPOINTS_PER_UPSERT.

getcurrentuser · GET

GET /api/v1/users/getcurrentuser/ — action getcurrentuser. static contract extracted; runtime/permission/payload behavior review pending.

decorator responses: CurrentUserRetrieveSpec. Declared fields below; inherited fields are retained in the schema inventory.

Field Type Required Constraints
meta dict false No extra constraint extracted
id UUID4 | None false No extra constraint extracted
first_name str true No extra constraint extracted
last_name str true No extra constraint extracted
phone_number str true max_length: 14
prefix str | None false max_length: 10
suffix str | None false max_length: 50
last_login str true No extra constraint extracted
profile_picture_url str true No extra constraint extracted
gender str true No extra constraint extracted
username str true No extra constraint extracted
mfa_enabled bool false No extra constraint extracted
deleted bool false No extra constraint extracted
role_orgs dict true No extra constraint extracted
geo_organization dict true No extra constraint extracted
created_by dict | None false No extra constraint extracted
email str true No extra constraint extracted
flags list[str] false No extra constraint extracted
is_service_account bool true No extra constraint extracted
is_superuser bool true No extra constraint extracted
qualification str | None true No extra constraint extracted
doctor_experience_commenced_on str | None true No extra constraint extracted
doctor_medical_council_registration str | None true No extra constraint extracted
weekly_working_hours str | None true No extra constraint extracted
alt_phone_number str | None true No extra constraint extracted
date_of_birth str | None true No extra constraint extracted
verified bool true No extra constraint extracted
pf_endpoint str | None true No extra constraint extracted
pf_p256dh str | None true No extra constraint extracted
pf_auth str | None true No extra constraint extracted
organizations list[dict] true No extra constraint extracted
facilities list[dict] true No extra constraint extracted
permissions list[str] true No extra constraint extracted
preferences dict true No extra constraint extracted

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

check_availability · GET

Checks availability of username by getting as query, returns 200 if available, and 409 otherwise.

GET /api/v1/users/{username}/check_availability/ — action check_availability. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

Explicit response statuses in observed code: 200, 409. Other branches/framework exception handling may differ.

profile_picture · POST

POST /api/v1/users/{username}/profile_picture/ — action profile_picture. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

Explicit response statuses in observed code: 405, 200, 204, 404. Other branches/framework exception handling may differ.

Declared refusal/error evidence: PermissionDenied: You do not have permission to update this user.

profile_picture · DELETE

DELETE /api/v1/users/{username}/profile_picture/ — action profile_picture. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

Explicit response statuses in observed code: 405, 200, 204, 404. Other branches/framework exception handling may differ.

Declared refusal/error evidence: PermissionDenied: You do not have permission to update this user.

pnconfig · PATCH

PATCH /api/v1/users/{username}/pnconfig/ — action pnconfig. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

pnconfig · GET

GET /api/v1/users/{username}/pnconfig/ — action pnconfig. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

generate_service_account_token · POST

POST /api/v1/users/{username}/generate_service_account_token/ — action generate_service_account_token. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

Explicit response statuses in observed code: 400. Other branches/framework exception handling may differ.

Declared refusal/error evidence: PermissionDenied: You do not have permission to update token for service account.

Conditional gates: not has_permission.

revoke_service_account_token · DELETE

DELETE /api/v1/users/{username}/revoke_service_account_token/ — action revoke_service_account_token. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

Location Parameter Type Required
path username router lookup string; semantic ID validation requires handler/schema review true

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

Explicit response statuses in observed code: 400. Other branches/framework exception handling may differ.

Declared refusal/error evidence: PermissionDenied: You do not have permission to update token for service account.

Conditional gates: not has_permission.

set_preferences · POST

POST /api/v1/users/set_preferences/ — action set_preferences. static contract extracted; runtime/permission/payload behavior review pending.

Authorization: no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.

Explicit response statuses in observed code: 201. Other branches/framework exception handling may differ.

Integration review checklist

Confirm the installed route and full schema; review authentication, organization/facility scoping, all accepted fields, value-state and date/time semantics, idempotency, pagination, response/exception branches and the allowed correction/reversal workflow. Test positive and negative cases with synthetic data. This source reference does not establish external certification or replace an illustrated user procedure.

Pinned source evidence

Links require access to the private source repository.