← Technical API reference

Backend resource · STATIC DECLARATIONS

Invoice API reference · mansoq-core-teleicu

Static source contract for Invoice: 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}/invoice/. 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}/invoice/ list declared/inherited method
POST /api/v1/facility/{facility_external_id}/invoice/ create declared/inherited method
GET /api/v1/facility/{facility_external_id}/invoice/{external_id}/ retrieve declared/inherited method
PUT /api/v1/facility/{facility_external_id}/invoice/{external_id}/ update declared/inherited method
PATCH /api/v1/facility/{facility_external_id}/invoice/{external_id}/ partial_update declared/inherited method
POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/attach_items_to_invoice/ attach_items_to_invoice @action declaration
POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/remove_item_from_invoice/ remove_item_from_invoice @action declaration
POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/attach_account_to_invoice/ attach_account_to_invoice @action declaration
POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/cancel_invoice/ cancel_invoice @action declaration
POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/lock/ lock @action declaration
POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/unlock/ unlock @action declaration

list · GET

GET /api/v1/facility/{facility_external_id}/invoice/ — 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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

response: InvoiceReadSpec. 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
title str | None false No extra constraint extracted
status InvoiceStatusOptions true No extra constraint extracted
cancelled_reason str | None false No extra constraint extracted
payment_terms str | None false No extra constraint extracted
note str | None false No extra constraint extracted
issue_date datetime.datetime | None false No extra constraint extracted
number str | None false No extra constraint extracted
total_net Decimal true No extra constraint extracted
total_gross Decimal true No extra constraint extracted
locked bool true No extra constraint extracted
created_date datetime.datetime true No extra constraint extracted
modified_date datetime.datetime true No extra constraint extracted
account dict true No extra constraint extracted
is_refund bool true No extra constraint extracted

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

Declared refusal/error evidence: PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present.

create · POST

POST /api/v1/facility/{facility_external_id}/invoice/ — 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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

request: InvoiceWriteSpec. 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
title str | None false No extra constraint extracted
status InvoiceStatusOptions true No extra constraint extracted
cancelled_reason str | None false No extra constraint extracted
payment_terms str | None false No extra constraint extracted
note str | None false No extra constraint extracted
issue_date datetime.datetime | None false No extra constraint extracted
number str | None false No extra constraint extracted
account UUID4 true No extra constraint extracted
charge_items list[UUID4] false No extra constraint extracted

response: InvoiceRetrieveSpec. 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
title str | None false No extra constraint extracted
status InvoiceStatusOptions true No extra constraint extracted
cancelled_reason str | None false No extra constraint extracted
payment_terms str | None false No extra constraint extracted
note str | None false No extra constraint extracted
issue_date datetime.datetime | None false No extra constraint extracted
number str | None false No extra constraint extracted
total_net Decimal true No extra constraint extracted
total_gross Decimal true No extra constraint extracted
locked bool true No extra constraint extracted
created_date datetime.datetime true No extra constraint extracted
modified_date datetime.datetime true No extra constraint extracted
account dict true No extra constraint extracted
is_refund bool true No extra constraint extracted
charge_items list[dict] true No extra constraint extracted
total_price_components list[dict] true No extra constraint extracted
created_by dict | None true No extra constraint extracted
updated_by dict | None true No extra constraint extracted
payments list[dict] true No extra constraint extracted
total_payments Decimal true No extra constraint extracted
credit_notes list[dict] true No extra constraint extracted
total_credit_notes Decimal true No extra constraint extracted
lock_history list[dict] true No extra constraint extracted

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

Declared refusal/error evidence: PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present; ValidationError: Account is not associated with the facility; PermissionDenied: Cannot write invoice; ValidationError: Invoice creation failed.

retrieve · GET

GET /api/v1/facility/{facility_external_id}/invoice/{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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

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

Declared refusal/error evidence: PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present; PermissionDenied: Locked invoice permission denied..

update · PUT

PUT /api/v1/facility/{facility_external_id}/invoice/{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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

request: BaseInvoiceSpec. 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
title str | None false No extra constraint extracted
status InvoiceStatusOptions true No extra constraint extracted
cancelled_reason str | None false No extra constraint extracted
payment_terms str | None false No extra constraint extracted
note str | None false No extra constraint extracted
issue_date datetime.datetime | None false No extra constraint extracted
number str | None false No extra constraint extracted

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

Declared refusal/error evidence: PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present; PermissionDenied: Cannot write invoice; ValidationError: Call the cancel invoice API to cancel the invoice; ValidationError: Invoice is already cancelled; ValidationError: Invoice must have at least one charge item; ValidationError: Invoice is already balanced; ValidationError: Invoice is already issued; ValidationError: Invoice needs to be issued before balancing.

partial_update · PATCH

PATCH /api/v1/facility/{facility_external_id}/invoice/{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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

request: BaseInvoiceSpec. 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: InvoiceRetrieveSpec. 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_invoice_in_facility, can_write_invoice_in_facility. Helper/queryset evidence is included; this is not proof of complete security review.

Declared refusal/error evidence: PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present; PermissionDenied: Cannot write invoice; ValidationError: Call the cancel invoice API to cancel the invoice; ValidationError: Invoice is already cancelled; ValidationError: Invoice must have at least one charge item; ValidationError: Invoice is already balanced; ValidationError: Invoice is already issued; ValidationError: Invoice needs to be issued before balancing.

attach_items_to_invoice · POST

POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/attach_items_to_invoice/ — action attach_items_to_invoice. 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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

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

Field Type Required Constraints
charge_items list[UUID4] true No extra constraint extracted

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

Declared refusal/error evidence: PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present; PermissionDenied: Cannot write invoice; ValidationError: Invoice is not in draft.

Direct refusal present: the handler/helper contains a top-level raise. Review whether the operation is intentionally disabled or only performs validation before relying on it.

remove_item_from_invoice · POST

POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/remove_item_from_invoice/ — action remove_item_from_invoice. 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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

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

Field Type Required Constraints
charge_item UUID4 true No extra constraint extracted

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

Declared refusal/error evidence: ValidationError: Charge item not found in invoice; PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present; PermissionDenied: Cannot write invoice; ValidationError: Invoice is not in draft.

Direct refusal present: the handler/helper contains a top-level raise. Review whether the operation is intentionally disabled or only performs validation before relying on it.

attach_account_to_invoice · POST

POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/attach_account_to_invoice/ — action attach_account_to_invoice. 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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

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

Declared refusal/error evidence: PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present; PermissionDenied: Cannot write invoice; ValidationError: Invoice is not in draft.

Direct refusal present: the handler/helper contains a top-level raise. Review whether the operation is intentionally disabled or only performs validation before relying on it.

cancel_invoice · POST

POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/cancel_invoice/ — action cancel_invoice. 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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

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

Declared refusal/error evidence: ValidationError: Invoice is already cancelled; ValidationError: Invalid reason; PermissionDenied: Cannot cancel invoice; PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present.

lock · POST

POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/lock/ — action lock. 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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

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

Declared refusal/error evidence: ValidationError: Invoice is already locked; PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present; PermissionDenied: Locked invoice permission denied..

unlock · POST

POST /api/v1/facility/{facility_external_id}/invoice/{external_id}/unlock/ — action unlock. 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 payment_reconciliation_present not declared at read site not established
query account not declared at read site not established

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

Declared refusal/error evidence: ValidationError: Invoice is not locked; PermissionDenied: Cannot read invoice; ValidationError: Account is required when payment reconciliation filter is present; PermissionDenied: Locked invoice permission denied..

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.