AdvanGo POS API
Introduction
In order to be fully functional to the customer an AdvanGo requires a separate screen/system to interface with the end customer. To ease the integration with the POS system, our AdvanGo offers an API with all the operations neatly under a single section.
Please remember throughout the integration that the system must be in read mode ADVANGO_DYNAMIC and as with the rest of services/read modes AdvanGo is meant to be configured with the device stopped. This read mode was introduced in AdvanNet 2.8.48
Note: all examples are provided using curl assuming no AdvanNet REST authentication because are easier to succinctly incorporate in a written guide, use your favourite HTTP library in the integration.
OPs (all GET)
e.g.: curl http://:ip/adgo/autosession
Session ops
adgo/session/start
Starts the session, changing the status to STARTEDadgo/session/end[/:ts]
Ends the session, optionally it will remain in STANDBY status during :ts millisecondsadgo/session/status
Returns the session status, the range of values is [IDLE,STARTED,STANDBY]adgo/session/data[/:ts]
Returns all the epc read since the session started. Optionally, if :ts is provided, it'll return the EPCs read in the last :ts ms instead.
Session-less reading
adgo/inventory/:ts
With autosession off and session IDLE, carry out an inventory during :ts seconds
Misc
adgo/persistConfig
Persist current configuration across rebootsdevice/start
Start the devicedevice/stop
Stop the device
Parameters (GET/PUT)
e.g.: curl -X PUT http://:ip/adgo/autosession -d "true"
adgo/autosession
If true the reader will keep the RF on, albeit at low power, and start a session automatically when reads exceed a certain thresholdadgo/autosessionLowPower
The power value when session is IDLE and autosession onadgo/autosessionHighPower
The power value when session is STARTED and autosession onadgo/power
The power value used in inventaries or with autosession offadgo/startedStatusTimeoutSecs
Max time a session can be in status STARTED
Typical workflows
Session
One thing that sets apart the AdvanGo system from the rest of Keonn systems is that when started, it is stateful. The system session status can be
IDLE: The system is at rest, if the parameter autosession is true the system will read tags at low power and change session if the system reads enough tags.
STARTED: The system is actively reading tags and keeping an internal list of unique tags reads since the session started
STANDBY: The system still remembers the tags read while it was started but no longer keeps the list of tags updated, this is a transitory state that will transition to IDLE automatically.
Here we present examples on how to work with sessions, both with automatic and manual start of session.
Automatic session
Perfect for a hands-free integration with the system. Takes advantage of the movement of tags when dropped into the basket for an easier time reading. Enables seamless experience for the customer
PREREQUISITE: Set autoSession on: curl -X PUT http://:ip/adgo/autosession -d "true"
Poll repeately the status of the system ( curl http://:ip/adgo/session/status ) until it is STARTED
Keep polling the reader for the session data: curl http://:ip/adgo/session/data
End the session when the customer tells you they've finished adding products: curl http://:ip/adgo/session/end
(ALTERNATIVE) Sending an end operation with a time window (e.g. curl http://:ip/adgo/session/end/10000) the system will wait in status STANDBY the time before falling back to IDLE this allows getting the session data without new reads or waiting for the current customer to leave before going back to the initial step.
Manual session
Reduces accidental readings as the system doesn't start RF until told. Requires more involvement from the customer.
PREREQUISITE: Set autoSession off: curl -X PUT http://:ip/adgo/autosession -d "false"
Start the session when the customer is ready: curl http://:ip/adgo/session/start
Keep polling the reader for the session data: curl http://:ip/adgo/session/data
When the customer tells that they've finished adding items get the data curl http://:ip/adgo/session/data and then end the session curl http://:ip/adgo/session/end
No session
For the times you don't feel like dealing with the session and just want to check what's in the well
PREREQUISITE: Set autoSession off: curl -X PUT http://:ip/adgo/autosession -d "false"
Just launch an inventory: curl http://:ip/adgo/inventory/:ts
Advanced configuration
throughput
the threshold that triggers autosession can be configured by adding this json to the advanced JSON Conf of the read mode: {"autoSessionThroughput":0.1,"throughput":{"windowTimeMs":1000,"resolutionMs":20,"maxThroughputSec": 500}} the actual value is autoSessionThroughput in tags per second. You can smooth out the value over time by increasing the value windowTimeMs