← Technical API reference

Backend resource · STATIC DECLARATIONS

Device API reference · mansoq-core

Static source contract for Device: 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 at /api/v1/facility/{facility_external_id}/device/. 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/facility/{facility_external_id}/device/ list declared/inherited method
POST /api/v1/facility/{facility_external_id}/device/ create declared/inherited method
GET /api/v1/facility/{facility_external_id}/device/{external_id}/ retrieve declared/inherited method
PUT /api/v1/facility/{facility_external_id}/device/{external_id}/ update declared/inherited method
PATCH /api/v1/facility/{facility_external_id}/device/{external_id}/ partial_update declared/inherited method
DELETE /api/v1/facility/{facility_external_id}/device/{external_id}/ destroy declared/inherited method
POST /api/v1/facility/{facility_external_id}/device/upsert/ upsert @action declaration
POST /api/v1/facility/{facility_external_id}/device/{external_id}/associate_encounter/ associate_encounter @action declaration
POST /api/v1/facility/{facility_external_id}/device/{external_id}/associate_location/ associate_location @action declaration
POST /api/v1/facility/{facility_external_id}/device/{external_id}/add_managing_organization/ add_managing_organization @action declaration
POST /api/v1/facility/{facility_external_id}/device/{external_id}/remove_managing_organization/ remove_managing_organization @action declaration

list · GET

GET /api/v1/facility/{facility_external_id}/device/ — 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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

response: DeviceListSpec. 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
identifier str | None false No extra constraint extracted
status DeviceStatusChoices true No extra constraint extracted
availability_status DeviceAvailabilityStatusChoices true No extra constraint extracted
manufacturer str | None false No extra constraint extracted
manufacture_date datetime | None false No extra constraint extracted
expiration_date datetime | None false No extra constraint extracted
lot_number str | None false No extra constraint extracted
serial_number str | None false No extra constraint extracted
registered_name str true No extra constraint extracted
user_friendly_name str | None false No extra constraint extracted
model_number str | None false No extra constraint extracted
part_number str | None false No extra constraint extracted
contact list[ContactPoint] false No extra constraint extracted
care_type str | None false No extra constraint extracted
mansoq_metadata dict false No extra constraint extracted

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

create · POST

POST /api/v1/facility/{facility_external_id}/device/ — 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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

request: DeviceCreateSpec. 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
identifier str | None false No extra constraint extracted
status DeviceStatusChoices true No extra constraint extracted
availability_status DeviceAvailabilityStatusChoices true No extra constraint extracted
manufacturer str | None false No extra constraint extracted
manufacture_date datetime | None false No extra constraint extracted
expiration_date datetime | None false No extra constraint extracted
lot_number str | None false No extra constraint extracted
serial_number str | None false No extra constraint extracted
registered_name str true No extra constraint extracted
user_friendly_name str | None false No extra constraint extracted
model_number str | None false No extra constraint extracted
part_number str | None false No extra constraint extracted
contact list[ContactPoint] false No extra constraint extracted
care_type str | None false No extra constraint extracted
mansoq_metadata dict false No extra constraint extracted

response: DeviceRetrieveSpec. 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
identifier str | None false No extra constraint extracted
status DeviceStatusChoices true No extra constraint extracted
availability_status DeviceAvailabilityStatusChoices true No extra constraint extracted
manufacturer str | None false No extra constraint extracted
manufacture_date datetime | None false No extra constraint extracted
expiration_date datetime | None false No extra constraint extracted
lot_number str | None false No extra constraint extracted
serial_number str | None false No extra constraint extracted
registered_name str true No extra constraint extracted
user_friendly_name str | None false No extra constraint extracted
model_number str | None false No extra constraint extracted
part_number str | None false No extra constraint extracted
contact list[ContactPoint] false No extra constraint extracted
care_type str | None false No extra constraint extracted
mansoq_metadata dict false No extra constraint extracted
current_encounter dict | None false No extra constraint extracted
current_location dict true No extra constraint extracted
created_by dict | None false No extra constraint extracted
updated_by dict | None false No extra constraint extracted
managing_organization dict | None false No extra constraint extracted

Observed authorization checks: can_read_devices_on_location, can_create_device. 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 device.

retrieve · GET

GET /api/v1/facility/{facility_external_id}/device/{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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

response: DeviceRetrieveSpec. 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: can_read_devices_on_location. Helper/queryset evidence is included; this is not proof of complete security review.

update · PUT

PUT /api/v1/facility/{facility_external_id}/device/{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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

request: DeviceUpdateSpec. 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
identifier str | None false No extra constraint extracted
status DeviceStatusChoices true No extra constraint extracted
availability_status DeviceAvailabilityStatusChoices true No extra constraint extracted
manufacturer str | None false No extra constraint extracted
manufacture_date datetime | None false No extra constraint extracted
expiration_date datetime | None false No extra constraint extracted
lot_number str | None false No extra constraint extracted
serial_number str | None false No extra constraint extracted
registered_name str true No extra constraint extracted
user_friendly_name str | None false No extra constraint extracted
model_number str | None false No extra constraint extracted
part_number str | None false No extra constraint extracted
contact list[ContactPoint] false No extra constraint extracted
mansoq_metadata dict false No extra constraint extracted

response: DeviceRetrieveSpec. 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: can_read_devices_on_location, can_manage_device. Helper/queryset evidence is included; this is not proof of complete security review.

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

partial_update · PATCH

PATCH /api/v1/facility/{facility_external_id}/device/{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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

request: DeviceUpdateSpec. 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: DeviceRetrieveSpec. 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: can_read_devices_on_location, can_manage_device. Helper/queryset evidence is included; this is not proof of complete security review.

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

destroy · DELETE

DELETE /api/v1/facility/{facility_external_id}/device/{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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

Observed authorization checks: can_read_devices_on_location, can_manage_device. 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: PermissionDenied: You do not have permission to update device.

upsert · POST

POST /api/v1/facility/{facility_external_id}/device/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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

Observed authorization checks: can_read_devices_on_location, can_manage_device, can_create_device. 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 device; PermissionDenied: You do not have permission to create device.

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

associate_encounter · POST

POST /api/v1/facility/{facility_external_id}/device/{external_id}/associate_encounter/ — action associate_encounter. 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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

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

Declared refusal/error evidence: ValidationError: Encounter already associated; ValidationError: Encounter is not part of given facility; PermissionDenied: You do not have permission to associate device; PermissionDenied: You do not have permission to associate encounter to this device.

associate_location · POST

POST /api/v1/facility/{facility_external_id}/device/{external_id}/associate_location/ — action associate_location. 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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

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

Declared refusal/error evidence: ValidationError: Location already associated; ValidationError: Location is not part of given facility; PermissionDenied: You do not have permission to associate location to this device; PermissionDenied: You do not have permission to update device.

add_managing_organization · POST

POST /api/v1/facility/{facility_external_id}/device/{external_id}/add_managing_organization/ — action add_managing_organization. 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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

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

Declared refusal/error evidence: ValidationError: Organization is not part of given facility; PermissionDenied: You do not have permission to manage facility organization; ValidationError: Organization is already associated with this device; PermissionDenied: You do not have permission to update device.

remove_managing_organization · POST

POST /api/v1/facility/{facility_external_id}/device/{external_id}/remove_managing_organization/ — action remove_managing_organization. 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 location not declared at read site direct indexing; validation may be upstream
query include_children not declared at read site not established

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

Declared refusal/error evidence: ValidationError: No managing organization is associated with this device; PermissionDenied: You do not have permission to manage facility organization; PermissionDenied: You do not have permission to update device.

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.