Skip to content

Commit c1acd3e

Browse files
update README with new product URLs
1 parent 10aa701 commit c1acd3e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Test the API using Swagger UI (`/` route), Postman, cURL or your preferred HTTP
6363
### Endpoints
6464

6565
#### Fetch products using name, category, subcategory
66-
- [GET] `/product/<name: string>` - Get product with name: `name` <br/><br/>
66+
- [GET] `/products?name=<name: string>` - Get product with name: `name` <br/><br/>
6767
- [GET] `/subcategories/<subcategory_id: int>/products?page=<page_no>` - Get product with within subcategory `subcategory`. Returns `page_no` of the paginated results. <br/><br/>
6868
- [GET] `/categories/<category_id: int>/products` - Get product with within category `category`. Returns first page of the paginated results. <br/><br/>
6969
- [GET] `/categories/<category_id: int>/products?page=<page_no>` - Get product with within category `category`. Returns `page_no` of the paginated results. <br/><br/>
@@ -151,11 +151,11 @@ Test the API using Swagger UI (`/` route), Postman, cURL or your preferred HTTP
151151

152152
#### Product
153153
- [GET] `/products` - Get all products
154-
- [GET] `/product/(int: product_id)` - Get product with product_id
155-
- [GET] `/product/(int: product_id)/subcategories` - Get subcategories related to product_id
156-
- [DELETE] `/product/(int: product_id)` (Protected) - Delete product with product_id
154+
- [GET] `/products/(int: product_id)` - Get product with product_id
155+
- [GET] `/products/(int: product_id)/subcategories` - Get subcategories related to product_id
156+
- [DELETE] `/products/(int: product_id)` (Protected) - Delete product with product_id
157157

158-
- [POST] `/product/create` (Protected) - Create a new product
158+
- [POST] `/products` (Protected) - Create a new product
159159
```
160160
{
161161
"name": "name",
@@ -164,7 +164,7 @@ Test the API using Swagger UI (`/` route), Postman, cURL or your preferred HTTP
164164
}
165165
```
166166

167-
- [PUT] `/product/(int: product_id)/update` (Protected) - Update product with product_id
167+
- [PUT] `/products/(int: product_id)` (Protected) - Update product with product_id
168168
```
169169
{
170170
"name": "name",

0 commit comments

Comments
 (0)