← Technical API reference

Backend resource · STATIC DECLARATIONS

Specimen API reference · mansoq-core

Static source contract for Specimen: 4 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}/specimen/. 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}/specimen/{external_id}/ retrieve declared/inherited method
PUT /api/v1/facility/{facility_external_id}/specimen/{external_id}/ update declared/inherited method
PATCH /api/v1/facility/{facility_external_id}/specimen/{external_id}/ partial_update declared/inherited method
POST /api/v1/facility/{facility_external_id}/specimen/retrieve_by_accession_identifier/ retrieve_by_accession_identifier @action declaration

retrieve · GET

GET /api/v1/facility/{facility_external_id}/specimen/{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

response: SpecimenRetrieveSpec. 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
accession_identifier str false No extra constraint extracted
status SpecimenStatusOptions true No extra constraint extracted
specimen_type ValueSetBoundCoding[SPECIMEN_TYPE_CODE_VALUESET.slug] true No extra constraint extracted
received_time str | None false No extra constraint extracted
collection CollectionSpec | None false No extra constraint extracted
processing list[ProcessingSpec] false No extra constraint extracted
condition list[ValueSetBoundCoding[SPECIMEN_CONDITION_VALUESET.slug]] false No extra constraint extracted
note str | None false No extra constraint extracted
specimen_definition dict | None false No extra constraint extracted
service_request dict | None false No extra constraint extracted

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

Declared refusal/error evidence: PermissionDenied: You do not have permission to read this specimen.

update · PUT

PUT /api/v1/facility/{facility_external_id}/specimen/{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

request: SpecimenUpdateSpec. 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
accession_identifier str false No extra constraint extracted
status SpecimenStatusOptions | None false No extra constraint extracted
specimen_type ValueSetBoundCoding[SPECIMEN_TYPE_CODE_VALUESET.slug] | None false No extra constraint extracted
received_time str | None false No extra constraint extracted
collection CollectionSpec | None false No extra constraint extracted
processing list[ProcessingSpec] false No extra constraint extracted
condition list[ValueSetBoundCoding[SPECIMEN_CONDITION_VALUESET.slug]] false No extra constraint extracted
note str | None false No extra constraint extracted

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

Declared refusal/error evidence: PermissionDenied: You do not have permission to write this specimen.

partial_update · PATCH

PATCH /api/v1/facility/{facility_external_id}/specimen/{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

request: SpecimenUpdateSpec. 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: SpecimenRetrieveSpec. 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_write_specimen. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: You do not have permission to write this specimen.

retrieve_by_accession_identifier · POST

POST /api/v1/facility/{facility_external_id}/specimen/retrieve_by_accession_identifier/ — action retrieve_by_accession_identifier. 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

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

Field Type Required Constraints
accession_identifier str true No extra constraint extracted

decorator responses: SpecimenRetrieveSpec. 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_specimen. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: You do not have permission to read this specimen; ValidationError: Multiple specimens found with the same accession identifier; ValidationError: Specimen not found with the given accession identifier.

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.