Skip to main content

Close POS Business Session (v1)

Method & Path

POST /v1/workspace/:workspaceId/pos/business-session/close

Actual backend path: /v1/workspace/:workspaceId/pos/business-session/close

Description

Closes the currently open POS business session for the workspace store. After closing, new invoices cannot be created until the workspace owner opens a new session. Draft invoices linked to the closed session cannot be modified (items, discounts, notes, cancel, complete).

Workspace Owner only

Requests must not include X-Staff-Id. Staff members cannot close a business session.

Authentication

Required: JWT in Authorization header.

Required permissions: store.orders.manage

Persona: Workspace Owner only (no X-Staff-Id header)

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
Content-TypestringYesapplication/json (body may be empty {})

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier

Request Body

Optional empty JSON object {}.

Response 200 OK

When a session was open:

{
"session": {
"id": "507f1f77bcf86cd799439014",
"workspaceId": "507f1f77bcf86cd799439010",
"storeId": "507f1f77bcf86cd799439013",
"businessDate": "2025-03-19",
"status": "closed",
"openedAt": "2025-03-19T18:00:00.000Z",
"closedAt": "2025-03-20T05:00:00.000Z",
"openedBy": { "type": "workspace", "userId": "..." },
"createdAt": "2025-03-19T18:00:00.000Z",
"updatedAt": "2025-03-20T05:00:00.000Z"
}
}

When no open session existed:

{
"session": null
}

Common Errors

  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Staff header present (only workspace owner may close), or insufficient permissions
  • 500 Internal Server Error: Server error