This API provides access to a marketplace's offers database. It includes functionality to retrieve and manage offers, allowing users to view all available offers and remove specific ones using either their name or barcode.
The database consists of a table with the following 5 fields:
id
: Unique identifier for the offer.title
: Name of the product.price
: Product price in EUR.barcode
: Product barcode.quantity
: Number of units available in stock.
- Endpoint:
/api/home
- Description: Leads to an interactive page to access the features of the API.
- Endpoint:
/api/offers
- Description: Provides an HTML table containing information on all the offers present in the database.
- Endpoint:
/api/remove_offer/barcode?string:barcode
- Description: Removes the offer that has the given barcode in its barcode field.
- Endpoint:
/api/remove_offer/name?string:name
- Description: Removes the offer that has the given name in its title field.