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

Open a cash session

Any signed in user. Opens a cash session for the caller’s branch with an opening float. A till that already has an open session gets that one back, and a missing float reads as zero.

POST/api/v1/sessions/open
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Request body
requiredapplication/json
opening_floatnumber
Responses
200

The open session

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
401

Not authenticated

detailstringrequired
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://localhost:8000/api/v1/sessions/open' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "opening_float": 0
}'
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"
}