Skip to content
PharmaFlow Knowledgebase
Esc
↑↓navigate↵open⌘Jpreview

Read the caller's open session

Any signed in user. Returns the session the caller has open at this branch, or null. The lookup is scoped to the caller and branch, so a till never sees another till’s session.

GET/api/v1/sessions/current
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT from POST /api/v1/auth/login sent as Authorization Bearer.

Responses
200

The open session, or a null session when none is open

Any of:
object
idstringrequired
user_idstringrequired
branch_idstringrequired
opening_floatstringrequired
statusstringrequired
break_minutesintegerrequired
min -9007199254740991 · max 9007199254740991
opened_atstringrequired
closed_atstring | nullrequired
total_salesintegerrequired
min -9007199254740991 · max 9007199254740991
total_revenuestringrequired
total_vatstringrequired
payment_breakdownstring | nullrequired
object
sessionnullrequired
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Request
curl -X GET 'http://localhost:8000/api/v1/sessions/current' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "id": "string",
  "user_id": "string",
  "branch_id": "string",
  "opening_float": "string",
  "status": "string",
  "break_minutes": -9007199254740991,
  "opened_at": "string",
  "closed_at": "string",
  "total_sales": -9007199254740991,
  "total_revenue": "string",
  "total_vat": "string",
  "payment_breakdown": "string"
}