Products
GET
Authentication: Optional
/products
For a single product
/products/<id>
Query Params
| Field | Description | Example Value |
|---|---|---|
| name | Product Name for filtering | ketchup |
| category_id | Category of the product | 5 |
| customer_id | Customer ID field. To be used by admins to get the cart of the customer. Otherwise it automatically fetches the ID from the token | 5 |
POST
This API can only be used by admins
Authentication: Required
/products
JSON Example
Values and types can be inferred from the example
{
"name": "Name",
"description": "Description",
"category_id": 7,
"rate": 399
}
PATCH
This API can only be used by admins
Authentication: Required
/products/<id>
JSON Example
Values and types can be inferred from the example
{
"name": "Name",
"description": "Description",
"category_id": 7,
"rate": 399
}
DELETE
This API can only be used by admins
Authentication: Required
/products/<id>