Backend resource · STATIC DECLARATIONS
Cash Session API reference · mansoq-odoo-be
Static source contract for Cash Session: 6 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-odoo-be at /api/{installed_plugin_prefix}/cash-session/. plugin/local mount; actual prefix and enablement require deployment verification A registered path and an indexed handler do not prove deployment availability, user permission or production readiness.
ViewSet for managing cash sessions with Odoo.
All endpoints are facility-scoped and use the authenticated user.
URL Pattern: /facility/{facility_external_id}/cash-session/
Endpoints:
- POST / - Open a new session
- PUT /close/ - Close current session
- GET /current/ - Get current session for authenticated user at location
- GET / - List sessions
- GET /counters/ - List all counters with session status
Operation map
| Method | Path | Action | Evidence |
|---|---|---|---|
| GET | /api/{installed_plugin_prefix}/cash-session/ |
list | declared/inherited method |
| POST | /api/{installed_plugin_prefix}/cash-session/ |
create | declared/inherited method |
| PUT | /api/{installed_plugin_prefix}/cash-session/close/ |
close_session | @action declaration |
| POST | /api/{installed_plugin_prefix}/cash-session/close/ |
close_session | @action declaration |
| POST | /api/{installed_plugin_prefix}/cash-session/current/ |
current_session | @action declaration |
| GET | /api/{installed_plugin_prefix}/cash-session/counters/ |
list_counters | @action declaration |
list · GET
List all sessions in the facility, optionally filtered by status.
GET /facility/{facility_external_id}/cash-session/?status=open
GET /api/{installed_plugin_prefix}/cash-session/ — action list. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| deployment mount | installed_plugin_prefix | deployment-selected mount prefix | 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 | status |
not declared at read site | not established |
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_200_OK. Other branches/framework exception handling may differ.
Declared refusal/error evidence: ValidationError (dynamic detail; inspect source).
create · POST
Open a new cash session for the authenticated user.
POST /facility/{facility_external_id}/cash-session/ { "counter_x_care_id": "UUID", "opening_balance": 5000.00 }
POST /api/{installed_plugin_prefix}/cash-session/ — action create. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| deployment mount | installed_plugin_prefix | deployment-selected mount prefix | true |
Observed authorization checks: can_list_facility_location_obj. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: status.HTTP_201_CREATED. Other branches/framework exception handling may differ.
Declared refusal/error evidence: ValidationError (dynamic detail; inspect source); PermissionDenied (dynamic detail; inspect source); NotFound (dynamic detail; inspect source).
close_session · PUT
Close the current cash session for the authenticated user.
PUT /facility/{facility_external_id}/cash-session/close/ { "counter_x_care_id": "UUID", "declared_amount": 45000.00, "denominations": {"500": 50, "200": 100} }
PUT /api/{installed_plugin_prefix}/cash-session/close/ — action close_session. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| deployment mount | installed_plugin_prefix | deployment-selected mount prefix | true |
Observed authorization checks: can_list_facility_location_obj. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: status.HTTP_200_OK. Other branches/framework exception handling may differ.
Declared refusal/error evidence: ValidationError (dynamic detail; inspect source); PermissionDenied (dynamic detail; inspect source); NotFound (dynamic detail; inspect source).
close_session · POST
Close the current cash session for the authenticated user.
PUT /facility/{facility_external_id}/cash-session/close/ { "counter_x_care_id": "UUID", "declared_amount": 45000.00, "denominations": {"500": 50, "200": 100} }
POST /api/{installed_plugin_prefix}/cash-session/close/ — action close_session. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| deployment mount | installed_plugin_prefix | deployment-selected mount prefix | true |
Observed authorization checks: can_list_facility_location_obj. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: status.HTTP_200_OK. Other branches/framework exception handling may differ.
Declared refusal/error evidence: ValidationError (dynamic detail; inspect source); PermissionDenied (dynamic detail; inspect source); NotFound (dynamic detail; inspect source).
current_session · POST
Get the current open session for the authenticated user at a location.
POST /facility/{facility_external_id}/cash-session/current/ { "counter_x_care_id": "UUID" }
POST /api/{installed_plugin_prefix}/cash-session/current/ — action current_session. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| deployment mount | installed_plugin_prefix | deployment-selected mount prefix | 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 | counter_x_care_id |
not declared at read site | not established |
Observed authorization checks: can_list_facility_location_obj. Helper/queryset evidence is included; this is not proof of complete security review.
Explicit response statuses in observed code: status.HTTP_200_OK. Other branches/framework exception handling may differ.
Declared refusal/error evidence: ValidationError: counter_x_care_id is required; ValidationError (dynamic detail; inspect source); PermissionDenied (dynamic detail; inspect source); NotFound (dynamic detail; inspect source).
list_counters · GET
List all available counters in the facility with their session status.
GET /facility/{facility_external_id}/cash-session/counters/
GET /api/{installed_plugin_prefix}/cash-session/counters/ — action list_counters. static contract extracted; runtime/permission/payload behavior review pending.
Path and deployment-context parameters:
| Location | Parameter | Type | Required |
|---|---|---|---|
| deployment mount | installed_plugin_prefix | deployment-selected mount prefix | 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_200_OK. Other branches/framework exception handling may differ.
Declared refusal/error evidence: ValidationError (dynamic detail; inspect source).
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.
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/urls.py:19
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:25
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:242
- repositories/platform/mansoq-core/mansoq/emr/api/viewsets/base.py:322
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:41
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:73
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:81
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:54
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:45
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:135
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:191
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:279
- repositories/platform/mansoq-odoo-be/src/mansoq_odoo/resources/cash_session/viewset.py:77