The Supermarket API was designed for grocery store employees to manage and retrieve produce item data. This functionality is achieved through the use of a REST API. The specifications for this project are found here.
| Data Field | Description | Data Type | Data Sample |
| name | A required case insensitive field that represents the official name of a produce item. | string | Lettuce |
| code | A required case insensitive, sixteen character, alphanumeric field, with three hyphens between each set of 4 characters. This sequence represents a produce item's unique identification. | string | A12T-4GH7-QPL9-3N4M |
| unit_price | A required field that represents the total price divided by the total units. | float64 | 3.46 |
{
"name": "Lettuce",
"code": "A12T-4GH7-QPL9-3N4M",
"unit_price": 3.46
}API functionality is achieved by using the endpoints below. It is assumed you have a working connection to the market website or you are targeting the endpoints via an API tool such as postman.
| Endpoint | Description | Sample JSON Output |
| /produce/{name} | Retrieval of a single produce item and its associated data | |
| /produce | Retrieval of all the produce items and its associated data | |
| Endpoint | Description | Sample JSON Input |
| /produce | Adds a single produce item and its associated data. | |
| /produce | Adds multiple produce items and its associated data. | |
| Endpoint | Description |
| /produce/{name} | Deletes a single produce item and its associated data. |
