Close Service from KDS
Close Harbor Soho's active service from the KDS board after every ticket is paid, closed or void, and after the cash register session for the service has already been closed.
In this article
Use this guide when Harbor Soho has an active service visible in KDS and a TPV-authorised operator needs to end that service from the kitchen operations context.
The action starts in KDS, but the close itself is governed by TPV rules. KDS permission lets the team view production; the implemented backend makes `tpv:use` the minimum effective permission for closing the service.
Before you start
- Harbor Demo Group and Harbor Soho, or another valid organisation and location, are selected in the app context.
- KDS is enabled for the location through `tpv_settings.enable_kds`.
- The operator can enter KDS with `kds:view`, `kds:use` or `kds:manage`.
- The operator has TPV permission to close the service; in the implemented backend, `tpv:use` is the minimum effective permission.
- The location has an active `service_session`, for example Harbor Soho's Soho lunch service.
- Every ticket in the service is already in a terminal status: `paid`, `closed` or `void`.
- No `cash_register_session` remains `open` for the same location and service session.
Instructions
- 1.
Open the KDS board
Open `/:orgId/:locationId/kds`. The board must resolve the active service through `GET /api/app/{orgId}/{locationId}/service-sessions/active` before close controls are available.
- 2.
Confirm service readiness
Before closing, make sure all accounts have been paid, closed or voided, and that the cash register for this service has already been closed. Either unresolved tickets or an open cash register session will block the backend action.
- 3.
Open the active service control
Select the `Servicio activo` header or the Soho lunch service label. With an active session and TPV permission, the modal shows the service summary and the `Cerrar servicio` button.
- 4.
Close the service
Select `Cerrar servicio`. KDS sends the close request for the active service session immediately, without an extra confirmation prompt and without a `closed_by_staff_id` value from this flow.
- 5.
Check the result
On success, the modal closes, active service data refreshes and the app shows `Servicio cerrado correctamente.` If the close fails, resolve pending ticket states or close the cash register, then try again.
Validations and limits
- If no organisation or location is selected, KDS asks the operator to select a location for kitchen operations.
- If KDS permission is missing or KDS is disabled in TPV settings, the operator cannot reach the close-service modal from KDS.
- If there is no active `service_session`, the modal shows the open-service state instead of the close action.
- The close request requires a valid location context, a non-empty session id and a `service_session` that belongs to the current location.
- Only ticket statuses `paid`, `closed` and `void` pass the service-close validation.
- Any `cash_register_session` with `status` `open` for the same service session blocks closure.
- A successful close sets `service_sessions.status` to `closed` and sets `closed_at` to the current UTC time.
- The KDS flow does not record a named closing staff member because `closed_by_staff_id` is sent without a value.
- The backend accepts `POST` and `PUT` for the close route, but the implemented KDS client uses `POST`.
Expected result
The active service session is marked closed, the KDS service data is refreshed, and the operator receives the success message. Closure remains blocked until ticket and cash register state are clean.