Admin
Point of Sale API Admin Flow
The admin panel is used to create user accounts for the POS system, create and update dishes, and create and update dish ingredients.
To provide the proper experience for the admin panel, you’ll need to provide the following capabilities:
- Admin login
- Create ingredients
- Create dishes
Be sure you are familiar with the POS authentication flow details.
Step 1: Admin Login
The admin will log into the POS admin panel using their username and password.
Request
The client sends an HTTP request to exchange the user’s username and password for an access token.
Endpoint: POST /auth/token
Response
If the request was successful, the server responds with a 201 Created
status code with the response body containing access token.
Step 2: Create Ingredients
Ingredients are components of dishes. Admins create ingredients and specify their quantity so they can track inventory and ensure patrons cannot order dishes that can’t be made due to insufficient ingredient stock.
Request
The client sends an HTTP request to create a new ingredient and specify the in stock quantity.
Endpoint: POST /ingredients
Response
If the request was successful, the server responds with a 201 Created
status code with the response body containing the full resource.
The ingredient
object contains the following properties:
Property | Type | Description |
---|---|---|
ingredient_id | string | The ingredient id - used to associate an ingredient with a dish |
created_at | string | The date and time the ingredient was created. Uses ISO 8601 standard. Ex: 2025-04-05T14:55:03.824Z |
updated_at | string | The date and time the ingredient was most recently updated. Uses ISO 8601 standard. Ex: 2025-04-05T14:55:03.824Z |
display_name | string | The ingredient name that will appear in the POS system for patrons and staff |
name | string | The ingredient name used primarily in the admin panel |
in_stock_qty | integer | The quantity of the ingredient currently available - used to track that an ingredient has a positive quantity |
Step 3: Create Dishes
Admins create dishes by associated them with the necessary ingredients.
The request body for creating dishes should contain the following properties:
Property | Type | Description |
---|---|---|
display_name | string | Required The dish name that appears in the POS system for patrons and staff |
name | string | Required The dish name used primarily in the admin panel |
description | string | Required The long-text description of the dish. |
category | enum string | Required The category the dish belongs to. Values: Appetizers , Main Course , Dessert , and Drinks . |
preparation_time | integer | Optional The time it takes to prepare the dish, in minutes. |
price | number | Required The price of the dish. |
image_name | string | Optional The name of the image associated with the dish, if available. |
station | enum string | Required The name of the station the dish is prepared at. Values: hot , cold , beverage |
ingredients | array of objects | Required Object that contains the ingredient details of the ingredients included in the dish. |
ingredients.ingredient_id | string | Required The id of the ingredient |
ingredients.is_essential | boolean | Required Indicates whether this ingredient is required to make this dish or not. |
Request
The client sends an HTTP request to {describe the purpose of the API request}
.
Endpoint: POST /dishes
Response
If the request was successful, the server responds with a 201 Created
status code with the response body containing new resource and the dish_id
, which you’ll use in numerous requests in both the patron and staff flows.