JSON API methods to control the SoftPoS CashRegister, see also https://github.com/Soft-Contact/resto/issues/2#placeorder
Place order
-
order
as a JSON object -
successCallback
as a function for successful callback -
failureCallback
as a function for failure callback
addToOpenTable
-
openTable
as a JSON object from https://github.com/Soft-Contact/resto/issues/2#addtoopentable -
successCallback
as a function for successful callback -
failureCallback
as a function for failure callback
removeFromOpenTable
-
removeReq
as a JSON object with parameters "tableCode", "clerkCode": "rowID" -
successCallback
as a function for successful callback -
failureCallback
as a function for failure callback
get currently on cashregister screen active transaction
successCallback
failureCallback
Execute lisp macro on cashregister side
-
cmd
lisp macro to execute successCallback
failureCallback
Meta
- deprecated: use evalLisp instead, kept some time for backwards compatibility
Evaluate lisp macro on cashregister side
-
cmd
lisp macro to evaluate successCallback
failureCallback
JSON API methods to control the SoftPoS CashRegister printing
Experimental: Print data to the printer
printData
successCallback
let printData =
{
lines: [
{ type: "TEXT", contents: "test string"},
{ type: "TEXT", contents: "text\non\nmultiple\nlines"},
{ type: "QR_CODE", contents: "sample code", alignment: "RIGHT"},
{ type: "BAR_CODE", contents: "1234567890123"},
{ type: "QR_CODE", contents: "another code"},
]
}
JSON API methods to control the SoftPoS CashRegister payment terminal
Experimental: Authorize payment on SoftPoS side using SoftPos configured payment device
payment
successCallback
failureCallback
statusCallback
Experimental: Abort currently active payment
successCallback
JSON API methods to get article and article group data
Get all articles from SoftPos
successCallback
errorCallback
API methods needed by various separate displays (KitchenDisplay, OrderDisplay).
Experimental: List all transactions based on jobOrderSystemId
-
jobOrderSystemId
Job order system id from which to list transactions successCallback
errorCallback
Experimental: Remove transactions based on jobOrderSystemId and transactionUuid
-
jobOrderSystemId
Job order system id from which to remove transaction -
transactionUuid
transcation to remove successCallback
errorCallback
Experimental: Change transactionsline state
-
jobOrderSystemId
Job order system id from which to remove transaction -
transactionUuid
transcation to modify -
lineStateName
Ordered, Ready, Prepared, Served, Deleted, Other successCallback
errorCallback
Experimental: Get map of configuration parameters, including custom configuration
successCallback
errorCallback
Experimental: Save custom configuration
-
conf
custom configuration successCallback
errorCallback
Save kitchen system waiting time in minutes
jobOrderSystemId
waitingTime
successCallback
errorCallback
Get kitchen system waiting time in minutes
jobOrderSystemId
successCallback
errorCallback
Methods related to messages from SoftPos
Experimental: Listen for all messages
-
listenCallbackFn
callback fn where all SoftPoS side asynchronous messages are passed
{ type: "COMMAND", data: "REFRESH_KITCHEN_DISPLAY"}
Utility methods
Gets the SoftPoS API type depending on which environment is used to run it
Returns string one of NONE/HTMLVIEW_LEGACY/HTMLVIEW_JCEF
Gets the SoftPoS version
Returns string SoftPoS version
Get the SoftPos info JSON
successCallback
failureCallback
Returns json with fields "success" and "response", where response contains the SoftPosInfo object
Utility methods for logging
logRecord
window.softPos.log({level: 'INFO', msg:'Info message'});
Log TRACE message
msg
obj
Log DEBUG message
msg
obj
Log INFO message
msg
obj
Log WARN message
msg
obj
Log ERROR message
msg
obj
Log FATAL message
msg
obj