← Technical API reference

Backend resource · STATIC DECLARATIONS

Facility Organization API reference · mansoq-core-teleicu

Static source contract for Facility Organization: 11 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-teleicu at /api/v1/facility/{facility_external_id}/organizations/. verified core mount in config/urls.py This is an alternative core contract, not proof that the primary core uses the same behavior. 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/facility/{facility_external_id}/organizations/ list declared/inherited method
POST /api/v1/facility/{facility_external_id}/organizations/ create declared/inherited method
GET /api/v1/facility/{facility_external_id}/organizations/{external_id}/ retrieve declared/inherited method
PUT /api/v1/facility/{facility_external_id}/organizations/{external_id}/ update declared/inherited method
PATCH /api/v1/facility/{facility_external_id}/organizations/{external_id}/ partial_update declared/inherited method
DELETE /api/v1/facility/{facility_external_id}/organizations/{external_id}/ destroy declared/inherited method
GET /api/v1/facility/{facility_external_id}/organizations/favorite_lists/ favorite_lists @action declaration
POST /api/v1/facility/{facility_external_id}/organizations/{external_id}/add_favorite/ add_favorite @action declaration
POST /api/v1/facility/{facility_external_id}/organizations/{external_id}/remove_favorite/ remove_favorite @action declaration
POST /api/v1/facility/{facility_external_id}/organizations/upsert/ upsert @action declaration
GET /api/v1/facility/{facility_external_id}/organizations/mine/ mine @action declaration

list · GET

GET /api/v1/facility/{facility_external_id}/organizations/ — action list. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query containing_user not declared at read site not established
query parent not declared at read site not established

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

Field Type Required Constraints
meta dict false No extra constraint extracted
id UUID4 false No extra constraint extracted
active bool false No extra constraint extracted
name str true No extra constraint extracted
description str false No extra constraint extracted
metadata dict false No extra constraint extracted
org_type FacilityOrganizationTypeChoices true No extra constraint extracted
parent UUID4 | None false No extra constraint extracted
created_by dict | None false No extra constraint extracted
updated_by dict | None false No extra constraint extracted
system_generated bool true No extra constraint extracted
level_cache int false No extra constraint extracted
has_children bool true No extra constraint extracted

Observed authorization checks: get_accessible_facility_organizations. Helper/queryset evidence is included; this is not proof of complete security review.

create · POST

POST /api/v1/facility/{facility_external_id}/organizations/ — action create. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query containing_user not declared at read site not established
query parent not declared at read site not established
body form_submission not declared at read site not established

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

Field Type Required Constraints
meta dict false No extra constraint extracted
id UUID4 false No extra constraint extracted
active bool false No extra constraint extracted
name str true No extra constraint extracted
description str false No extra constraint extracted
metadata dict false No extra constraint extracted
facility UUID4 true No extra constraint extracted
org_type FacilityOrganizationTypeChoices true No extra constraint extracted
parent UUID4 | None false No extra constraint extracted

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

Field Type Required Constraints
meta dict false No extra constraint extracted
id UUID4 false No extra constraint extracted
active bool false No extra constraint extracted
name str true No extra constraint extracted
description str false No extra constraint extracted
metadata dict false No extra constraint extracted
org_type FacilityOrganizationTypeChoices true No extra constraint extracted
parent UUID4 | None false No extra constraint extracted
created_by dict | None false No extra constraint extracted
updated_by dict | None false No extra constraint extracted
system_generated bool true No extra constraint extracted
level_cache int false No extra constraint extracted
has_children bool true No extra constraint extracted
permissions list[str] false No extra constraint extracted

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

Declared refusal/error evidence: PermissionDenied: User does not have the required permissions to create organizations; PermissionDenied: Cannot update root organization; PermissionDenied: Cannot create root organization; ValidationError: Organization already exists with same name; PermissionDenied: Cannot create organizations under root organization; PermissionDenied: Cannot create nested facility organizations under 'role' type facility organization; ValidationError (dynamic detail; inspect source).

Conditional gates: model_obj is None and parent.level_cache comparison settings.FACILITY_ORGANIZATION_MAX_DEPTH; conditional/computed expression; inspect pinned declaration comparison settings.MAX_ORGANIZATION_IN_FACILITY.

retrieve · GET

GET /api/v1/facility/{facility_external_id}/organizations/{external_id}/ — action retrieve. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query containing_user not declared at read site not established
query parent not declared at read site not established

response: FacilityOrganizationRetrieveSpec. 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.

Observed authorization checks: get_accessible_facility_organizations. Helper/queryset evidence is included; this is not proof of complete security review.

update · PUT

PUT /api/v1/facility/{facility_external_id}/organizations/{external_id}/ — action update. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query containing_user not declared at read site not established
query parent not declared at read site not established

request: FacilityOrganizationWriteSpec. 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: FacilityOrganizationRetrieveSpec. 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.

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

Declared refusal/error evidence: PermissionDenied: User does not have the required permissions to update organization; PermissionDenied: Cannot update root organization; PermissionDenied: Cannot create root organization; ValidationError: Organization already exists with same name; PermissionDenied: Cannot create organizations under root organization; PermissionDenied: Cannot create nested facility organizations under 'role' type facility organization; ValidationError (dynamic detail; inspect source).

Conditional gates: model_obj is None and parent.level_cache comparison settings.FACILITY_ORGANIZATION_MAX_DEPTH; conditional/computed expression; inspect pinned declaration comparison settings.MAX_ORGANIZATION_IN_FACILITY.

partial_update · PATCH

PATCH /api/v1/facility/{facility_external_id}/organizations/{external_id}/ — action partial_update. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query containing_user not declared at read site not established
query parent not declared at read site not established

request: FacilityOrganizationWriteSpec. 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: FacilityOrganizationRetrieveSpec. 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.

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

Declared refusal/error evidence: PermissionDenied: Cannot update root organization; PermissionDenied: Cannot create root organization; ValidationError: Organization already exists with same name; PermissionDenied: Cannot create organizations under root organization; PermissionDenied: Cannot create nested facility organizations under 'role' type facility organization; ValidationError (dynamic detail; inspect source); PermissionDenied: User does not have the required permissions to update organization.

Conditional gates: model_obj is None and parent.level_cache comparison settings.FACILITY_ORGANIZATION_MAX_DEPTH; conditional/computed expression; inspect pinned declaration comparison settings.MAX_ORGANIZATION_IN_FACILITY.

destroy · DELETE

DELETE /api/v1/facility/{facility_external_id}/organizations/{external_id}/ — action destroy. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query containing_user not declared at read site not established
query parent not declared at read site not established

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

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

Declared refusal/error evidence: ValidationError: Cannot delete root organization; ValidationError: Cannot delete organization with children; ValidationError: Cannot delete organization with users; ValidationError: Cannot delete organization with encounters; ValidationError: Cannot delete organization with locations; ValidationError: Cannot delete organization with devices; PermissionDenied: User does not have the required permissions to delete this organization.

favorite_lists · GET

GET /api/v1/facility/{facility_external_id}/organizations/favorite_lists/ — action favorite_lists. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query facility not declared at read site not established
query containing_user not declared at read site not established
query parent not declared at read site not established

Observed authorization checks: get_accessible_facility_organizations. Helper/queryset evidence is included; this is not proof of complete security review.

add_favorite · POST

POST /api/v1/facility/{facility_external_id}/organizations/{external_id}/add_favorite/ — action add_favorite. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query containing_user not declared at read site not established
query parent not declared at read site not established

Observed authorization checks: get_accessible_facility_organizations. Helper/queryset evidence is included; this is not proof of complete security review.

remove_favorite · POST

POST /api/v1/facility/{facility_external_id}/organizations/{external_id}/remove_favorite/ — action remove_favorite. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query containing_user not declared at read site not established
query parent not declared at read site not established

Observed authorization checks: get_accessible_facility_organizations. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: ValidationError: Favorite List not found.

upsert · POST

POST /api/v1/facility/{facility_external_id}/organizations/upsert/ — action upsert. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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
query containing_user not declared at read site not established
query parent not declared at read site not established
body form_submission not declared at read site not established

Observed authorization checks: get_accessible_facility_organizations, can_manage_facility_organization_obj, can_create_facility_organization_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: Cannot update root organization; PermissionDenied: Cannot create root organization; ValidationError: Organization already exists with same name; PermissionDenied: Cannot create organizations under root organization; PermissionDenied: Cannot create nested facility organizations under 'role' type facility organization; ValidationError (dynamic detail; inspect source); PermissionDenied: User does not have the required permissions to update organization; PermissionDenied: User does not have the required permissions to create organizations.

Conditional gates: conditional/computed expression; inspect pinned declaration comparison settings.MAX_DATAPOINTS_PER_UPSERT; model_obj is None and parent.level_cache comparison settings.FACILITY_ORGANIZATION_MAX_DEPTH; conditional/computed expression; inspect pinned declaration comparison settings.MAX_ORGANIZATION_IN_FACILITY.

mine · GET

Get organizations that are directly attached to the given user

GET /api/v1/facility/{facility_external_id}/organizations/mine/ — action mine. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

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

Location Field Declared/inferred read type Requiredness evidence
query containing_user not declared at read site not established
query parent not declared at read site not established

Observed authorization checks: get_accessible_facility_organizations. Helper/queryset evidence is included; this is not proof of complete security review.

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.