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

List the sales in a session

Any signed in user. Returns each sale in a session, newest first, alongside the session. An id that matches no session is refused rather than answered with an empty list.

GET/api/v1/sessions/{sessionId}/sales
Authorization
AuthorizationBearer token (JWT) · headerrequired

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

Path parameters
sessionIdstringrequired

The cash session id.

Responses
200

The session's sales and the session

itemsobject[]required
Show properties
Array of object
idstringrequired
invoice_numberstringrequired
total_amountstringrequired
vat_amountstringrequired
payment_methodstringrequired
sold_atstringrequired
pharmacist_namestring | nullrequired
sessionobjectrequired
Show properties
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
404

Session not found

detailstringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://localhost:8000/api/v1/sessions/string/sales' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "items": [
    {
      "id": "string",
      "invoice_number": "string",
      "total_amount": "string",
      "vat_amount": "string",
      "payment_method": "string",
      "sold_at": "string",
      "pharmacist_name": "string"
    }
  ],
  "session": {
    "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"
  }
}