← Technical API reference

Backend resource · STATIC DECLARATIONS

Facility API reference · mansoq-core

Static source contract for Facility: 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/. 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/ list declared/inherited method
POST /api/v1/facility/ create declared/inherited method
GET /api/v1/facility/{external_id}/ retrieve declared/inherited method
PUT /api/v1/facility/{external_id}/ update declared/inherited method
PATCH /api/v1/facility/{external_id}/ partial_update declared/inherited method
DELETE /api/v1/facility/{external_id}/ destroy declared/inherited method
POST /api/v1/facility/upsert/ upsert @action declaration
POST /api/v1/facility/{external_id}/cover_image/ cover_image @action declaration
DELETE /api/v1/facility/{external_id}/cover_image/ cover_image @action declaration
POST /api/v1/facility/{external_id}/set_monetary_config/ set_monetary_config @action declaration
POST /api/v1/facility/{external_id}/set_invoice_expression/ set_invoice_expression @action declaration

list · GET

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

response: FacilityReadSpec. 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
name str true No extra constraint extracted
description str true No extra constraint extracted
business_timezone str | None false No extra constraint extracted
longitude Longitude | None false No extra constraint extracted
latitude Latitude | None false No extra constraint extracted
pincode int true No extra constraint extracted
address str true No extra constraint extracted
phone_number str true No extra constraint extracted
middleware_address str | None false No extra constraint extracted
facility_type str true No extra constraint extracted
is_public bool true No extra constraint extracted
extensions dict false No extra constraint extracted
features list[int] true No extra constraint extracted
cover_image_url str true No extra constraint extracted
read_cover_image_url str true No extra constraint extracted
geo_organization dict false No extra constraint extracted
created_by dict | None false 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/facility/ — action create. 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 form_submission not declared at read site not established

request: FacilityCreateSpec. 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
name str true No extra constraint extracted
description str true No extra constraint extracted
business_timezone str | None false No extra constraint extracted
longitude Longitude | None false No extra constraint extracted
latitude Latitude | None false No extra constraint extracted
pincode int true No extra constraint extracted
address str true No extra constraint extracted
phone_number str true No extra constraint extracted
middleware_address str | None false No extra constraint extracted
facility_type str true No extra constraint extracted
is_public bool true No extra constraint extracted
extensions dict false No extra constraint extracted
geo_organization UUID4 true No extra constraint extracted
features list[int] true No extra constraint extracted
print_templates list[PrintTemplate] false No extra constraint extracted

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

Field Type Required Constraints
meta dict false No extra constraint extracted
permissions list[str] false No extra constraint extracted
root_org_permissions list[str] false No extra constraint extracted
child_org_permissions list[str] false No extra constraint extracted
id UUID4 | None false No extra constraint extracted
name str true No extra constraint extracted
description str true No extra constraint extracted
business_timezone str | None false No extra constraint extracted
longitude Longitude | None false No extra constraint extracted
latitude Latitude | None false No extra constraint extracted
pincode int true No extra constraint extracted
address str true No extra constraint extracted
phone_number str true No extra constraint extracted
middleware_address str | None false No extra constraint extracted
facility_type str true No extra constraint extracted
is_public bool true No extra constraint extracted
extensions dict false No extra constraint extracted
features list[int] true No extra constraint extracted
cover_image_url str true No extra constraint extracted
read_cover_image_url str true No extra constraint extracted
geo_organization dict false No extra constraint extracted
created_by dict | None false No extra constraint extracted
flags list[str] false No extra constraint extracted
discount_codes list[dict] false No extra constraint extracted
discount_monetary_components list[dict] false No extra constraint extracted
discount_configuration dict | None false No extra constraint extracted
instance_discount_codes list[dict] false No extra constraint extracted
instance_discount_monetary_components list[dict] false No extra constraint extracted
instance_tax_codes list[dict] false No extra constraint extracted
instance_tax_monetary_components list[dict] false No extra constraint extracted
instance_informational_codes list[dict] false No extra constraint extracted
patient_instance_identifier_configs list[dict] false No extra constraint extracted
patient_facility_identifier_configs list[dict] false No extra constraint extracted
invoice_number_expression str | None false No extra constraint extracted
print_templates list[dict] false No extra constraint extracted

Observed authorization checks: can_create_facility. 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 Facilities.

retrieve · GET

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

Path and deployment-context parameters:

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

response: FacilityRetrieveSpec. 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/facility/{external_id}/ — action update. static contract extracted; runtime/permission/payload behavior review pending.

Path and deployment-context parameters:

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

request: FacilityCreateSpec. 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: FacilityRetrieveSpec. 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_update_facility_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 Facilities.

partial_update · PATCH

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

Path and deployment-context parameters:

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

request: FacilityCreateSpec. 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: FacilityRetrieveSpec. 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_update_facility_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 Facilities.

destroy · DELETE

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

Path and deployment-context parameters:

Location Parameter Type Required
path external_id 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: Only Super Admins can delete Facilities.

upsert · POST

POST /api/v1/facility/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
body form_submission not declared at read site not established

Observed authorization checks: can_update_facility_obj, can_create_facility. 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 create Facilities.

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

cover_image · POST

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

Path and deployment-context parameters:

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

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

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

Declared refusal/error evidence: PermissionDenied: You do not have permission to create Facilities.

cover_image · DELETE

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

Path and deployment-context parameters:

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

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

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

Declared refusal/error evidence: PermissionDenied: You do not have permission to create Facilities.

set_monetary_config · POST

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

Path and deployment-context parameters:

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

body validation: FacilityMonetaryCodeSpec. Declared fields below; inherited fields are retained in the schema inventory.

Field Type Required Constraints
meta dict false No extra constraint extracted
discount_codes list[Coding] true No extra constraint extracted
discount_monetary_components list[MonetaryComponentDefinition] true No extra constraint extracted
discount_configuration DiscountConfiguration | None true No extra constraint extracted

decorator request: FacilityMonetaryCodeSpec. 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_update_facility_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 Facilities.

set_invoice_expression · POST

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

Path and deployment-context parameters:

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

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

Field Type Required Constraints
invoice_number_expression str true No extra constraint extracted

Observed authorization checks: can_update_facility_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 Facilities.

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.