OpenAPI Sessions
Some OpenApi functions work with a session. A session is an individual browser or device that is interacting with Fieldpine. You do not need to create a session yourself as one will be automatically created for you.
Sessions are not common or required for the vast majority of OpenApi use. Mainly they are required if you are using OpenApi to communicate directly with PosGreen trading registers at the front counter. A session helps that Pos understand if your API call relates to the interactive Pos, or is a background parallel operation.
Several functions allow you to specify the session for the function being executed. If you do not supply any value them your session is used, however if you provide an explicit session identifier then that session is used instead.
Quick Examples
A browser on a mobile device capturing sales
Where the device is creating and managing sales itself, ie it is the POS checkout, then you do not need to specify a session identifier. Functions will automatically use your private session and you will be isolated from other active sales.
A browser providing a customer display
If you have a web based customer display interacting with a sale actively being rung up on a device then the browser needs to specify a session, so that the server knows which sale is to be displayed.
A web page within PosGreen used to capture information
Often PosGreen (Windows based standalone Pos) will display a web page to capture information for the sale. For example selling an item might briefly open a captive web page to capture serial numbers or details for warranty purposes. As these web pages are part of PosGreen you do not need to provide a session identifier and will automatically be connected to the current Windows session.
Head Office remotely watching active sales
A head office monitoring application might call into each store to monitor sales in realtime. In this case the application will need to provide a session identifier to enumerate over all the sessions.