Retrieving a list of checked-in users
Checkins are how the Spoonity platform identifies and links a customer to an order. They're scoped to a particular store and customer, and many can exist at once.
Depending on the integration, some merchants may allow for remote or table checkins, which creates a more asynchronous experience. This also necessitates the ability to work with these checkins in a non-linear order.
The checkin workflow
The typical checkin workflow follows a consistent pattern:
- customer enters restaurant or place of business
- customer approaches cashier or is brought to a table
- customer performs a checkin at the register or at the table
- cashier or waiter reviews the list of checkins to associate it with an order
- cashier or waiter submits the order
In quick-serve / fast-casual environments, checkins are typically handled in-order.
Checking a customer in
Customer checkins are most often performed at the register through a cashier, or remotely through a client application.
When checking in through a cashier, the customer is responsible for providing an identifier of some kind to the cashier to enter into the system. This is used to validate against and generate the session.
When checking in remotely, the customer authenticates themselves through their session token, and a POS session is created on their behalf with the store.
Additional information can be found about the checkin process in our placing an order guide.
The Spoonity API supports this checkin process through it's onscreen APIs.
Create a POS session at a register
This request is used by POS integrations to create a single POS session for a customer who identifies themselves to a cashier.
Create a POS session at a register
curl -G https://api.spoonity.com/onscreen?api_key={api_key} \
-d "{
"card_number": "john.smith@example.com"
}"
Create a POS session remotely
Alternatively, users can check themselves in through the POST /vendor/store/check-in request.
This request accepts a table number or other in-location identifier and is authenticated using a user's session token to link them to the reqest.
Both this API and the previous one create the same kind of POS session.
Create a POS session remotely
curl -G https://api.spoonity.com/vendor/store/check-in?session_key={session_key} \
-d '{
"vendor_id": 100027,
"table_number": 7,
"payment_method": null
}'
View the list of checkins
Each store maintains it's own queue of open checkins, with each represented as a POS session. Sessions created through a cashier or remotely by the customer directly are stored in this queue, and can be retrieved by the integration for viewing.
Pull from the checkin queue
This API can be used to return a list of all the open POS sessions for a particular store (via it's API key). These sessions can then be viewed in detail using the subsequent request.
Pull from the checkin queue
curl -G https://api.spoonity.com/onscreen/queue?api_key={api_key}
Read data from a particular checkin
All checkins, regardless of how they were created, can be read from using the GET /onscreen API. This API returns information about the customer, as well as the rewards they are eligible for.
Read data from a particular checkin
curl -G https://api.spoonity.com/onscreen?api_key={api_key}&pos_session_hash={pos_session_hash}