Point of Service Staff API Flow
To provide the proper experience to staff using the Point of Service (POS) API, you’ll need to build the following capabilities:- View new orders
- Prioritize orders
- Initiate order preparation
- View order prep by stations
- View dish ingredients
- Ready the order for assembly
- Assemble the order
Step 1: View new orders
Once an order is placed, it will appear on the staff expeditor’s terminal.Request
The client sends an HTTP request to retreive the list of orders in theReceived status, sorted by the created_at field so the newest order displays first. Additionally, the terminal should limit the view to 10 orders per page.
Endpoint: GET /orders
Response
If the request was successful, the server responds with a200 okay status code with the response body containing the new orders and their related properties.
Step 2: Prioritize orders
The expeditor may need to adjust the priority of an order. By default, all orders have a priority of 3. The expeditor can increase the priority to 1 or decrease to 5 depending on the situation.Request
The client sends an HTTP request to increase the orderpriority to 1. You’ll need the order’s id to make this request as well as the required order properties for the request body.
Endpoint: PUT /orders/{id}
Response
If the request was successful, the server responds with a200 OK status code with the response body containing the updated resource.
Step 3: Initiate order preparation
The expeditor can now update the order status toIn Progress. This change in status allows the staff at the various stations to see the list of dishes they need to prepare.
Request
The client sends an HTTP request to change the status of an order fromReceived to In Progress. You’ll need the order’s id to make this request as well as the required order properties for the request body.
Endpoint: PUT /orders/{id}
Response
If the request was successful, the server responds with a200 OK status code with the response body containing the updated resource.
Step 4: View order prep by station
The staff at their various stations should now be able to see which orders to prepare and which dishes in the order are prepared at their station. Station values are:hotcoldbeverage
Request
The client sends an HTTP request to retreive the orders, filtering the response to only include dishes belonging to a specificstation. You’ll need the order’s id for this request.
Endpoint: GET /orders/{id}/dishes
Response
If the request was successful, the server responds with a200 OK status code with the response body containing all dishes for the order that belong to the specified station.
The client app stores the dish ids to local storage to use in the next step.
Step 5: View dish ingredients
To prepare the dishes, the staff at each station will need to see the dish’s ingredients.Request
The client sends an HTTP request to retreive the ingredients for each dish. You’ll need the dishid for this request, which the client app has saved in local storage.
Endpoint: GET /dishes/{id}/ingredients
Response
If the request was successful, the server responds with a200 OK status code with the response body containing an array of the dish’s ingredients.
Step 6: Ready the order for assembly
Once a station has finished preparing their dishes, they will update it asReady for assembly on their terminal. The expeditor is then notified when all dishes in an order have been marked as ready.
This process is managed within the client app logic and no API calls are required for this step.
Step 7: Assemble the order
The expeditor assembles the dishes from the stations to complete the order. Once assembled, the expeditor updates the order status toOn the way for table-side orders or Ready for Pickup for take-away orders.
Request
The client sends an HTTP request to update thestatus of the order from In Progress to On the way. You’ll need the order id for this request and the required properties for the request body.
Endpoint: PUT /orders/{id}
Response
If the request was successful, the server responds with a200 OK status code with the response body containing the updated resource.