Skip to content
SBC-Standard The data standard for libraries

session.open and session.update

Commands
session.open, session.update
Area
session (session)
Profile
patron display
Response
{"state":"active"}

A session is the span of time during which the display is assigned to a particular person. session.open opens it, session.update keeps it current – after every transaction, every renewal, every payment. Both commands carry the same fields.

The difference lies solely in how they treat what went before:

Command Effect
session.open starts afresh; all data of the previous session is dropped
session.update changes only the fields sent; all others remain

Request#

{"v":1,"cmd":"session.open","lang":"en",
 "customer":{"masked":"B. L.","number":"10245","has_debt":true,
             "balance":"-3.50","currency":"EUR"},
 "counters":{"loans":7,"holds":2,"holds_ready":1,"borrowed":3,"returned":1},
 "dates":{"due_next":"2026-08-29"},
 "items":[{"kind":"loan","title":"Der Schwarm","author":"Frank Schätzing",
           "due":"2026-08-29","cover":"https://…/cover.jpg"},
          {"kind":"return","title":"Momo"},
          {"kind":"hold","state":"ready","title":"Tintenherz"}],
 "notes":[{"severity":"warn","key":"card_expires","date":"2026-09-30"}]}

lang states the language the display should use. If it is absent, the display decides.

customer – the person#

Field Content
masked shortened form of address, e.g. initials. May be empty.
number patron number as a string. Intended to be shown: it helps when comparing with the card.
lang this person's preferred language; overrides lang of the request
has_debt there are outstanding charges
balance, currency account balance; negative means debt
valid_until expiry of membership (date)

A name in the clear does not belong on a display standing in public – on that and on the patron number see operation.

counters – the counts#

Field Content
loans items on loan in total
holds reservations in total
holds_ready of those, ready for collection
borrowed charged in this session
returned returned in this session
renewed renewed in this session

items – what is at hand#

Every entry has a kind:

kind Meaning Further fields
loan charged title, author, due, cover, barcode
return returned title, author, cover, barcode
renew renewed as loan, with a new due
hold reserved state: waiting or ready
fee charge amount, currency, reason

items is always the complete state of the session, never an increment. If a request is lost, the next one puts things right again.

A kind the display does not know is ignored. Anyone who keeps no list sends counters only; anyone who sends only items leaves the counting to the display. If both are present, counters prevails.

notes – notices#

{"severity":"warn","key":"card_expires","date":"2026-09-30"}

key names the notice, severity (info, warn, error) its urgency. The display does the wording – the keys are listed in the field overview. If the display does not know a key it shows nothing, unless the entry also carries a text field with ready-made wording.

Response#

{"v":1,"ok":true,"result":{"state":"active"}}

How it fits together#

  • Both commands end the screen saver and cancel an announced goodbye.
  • While a session is open the display does not revert to the idle screen of its own accord.
  • If the workplace is left unattended – locked screen, break – the controlling program sends idle.show and not session.close: nothing should be left standing, but nobody who is still there should be said goodbye to either.

This page was translated automatically from the German original. If anything reads oddly or looks wrong, please let us know — the German edition prevails.