Skip to content

Commit 5885029

Browse files
update endpoints in README
1 parent 3ff3750 commit 5885029

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Test the API using Swagger UI (`/` route), Postman, cURL or your preferred HTTP
6565
#### Fetch products using name, category, subcategory
6666
- [GET] `/product/<name: string>` - Get product with name: `name` <br/><br/>
6767
- [GET] `/subcategory/<subcategory_id: int>/products?page=<page_no>` - Get product with within subcategory `subcategory`. Returns `page_no` of the paginated results. <br/><br/>
68-
- [GET] `/category/<category_id: int>/products` - Get product with within category `category`. Returns first page of the paginated results. <br/><br/>
69-
- [GET] `/category/<category_id: int>/products?page=<page_no>` - Get product with within category `category`. Returns `page_no` of the paginated results. <br/><br/>
68+
- [GET] `/categories/<category_id: int>/products` - Get product with within category `category`. Returns first page of the paginated results. <br/><br/>
69+
- [GET] `/categories/<category_id: int>/products?page=<page_no>` - Get product with within category `category`. Returns `page_no` of the paginated results. <br/><br/>
7070

7171

7272
#### Authorization
@@ -100,19 +100,19 @@ Test the API using Swagger UI (`/` route), Postman, cURL or your preferred HTTP
100100

101101
#### Category
102102
- [GET] `/categories` - Get all categories
103-
- [GET] `/category/(int: category_id)` - Get category with category_id
104-
- [GET] `/category/(int: category_id)/subcategories` - Get subcategories within a category_id.
105-
- [DELETE] `/category/(int: category_id)` (Protected) - Delete category with category_id
103+
- [GET] `/categories/(int: category_id)` - Get category with category_id
104+
- [GET] `/categories/(int: category_id)/subcategories` - Get subcategories within a category_id.
105+
- [DELETE] `/categories/(int: category_id)` (Protected) - Delete category with category_id
106106

107-
- [POST] `/category/create` (Protected) - Create a new category
107+
- [POST] `/categories` (Protected) - Create a new category
108108
```
109109
{
110110
"name": "name",
111111
"subcategories": [<subcategory ids>] //optional
112112
}
113113
```
114114

115-
- [PUT] `/category/(int: category_id)/update` (Protected) - Update category with category_id
115+
- [PUT] `/categories/(int: category_id)` (Protected) - Update category with category_id
116116
```
117117
{
118118
"name": "name",

0 commit comments

Comments
 (0)