Skip to main content

Get Active POS Business Session (v1)

Method & Path

GET /v1/workspace/:workspaceId/pos/business-session

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

Description

Returns the open POS business session for the workspace store, if any. A business session represents an operational / accounting day chosen by the workspace owner (e.g. for overnight shifts). New POS invoices are created only while a session is open.

Authentication

Required: JWT in Authorization header.

Required permissions: store.orders.manage

Persona: Workspace Owner, Staff (store.orders.manage)

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token: Bearer <token>
X-Staff-IdstringNoStaff context; omit for workspace owner client session

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace identifier

Response 200 OK

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

When no session is open:

{
"session": null
}

Common Errors

  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions (store.orders.manage)
  • 500 Internal Server Error: Server error