Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prinx/hubtel.ecommerce.cart.api
Hubtel Technical Interview - Api for eCommerce Cart
https://github.com/prinx/hubtel.ecommerce.cart.api
Last synced: 13 days ago
JSON representation
Hubtel Technical Interview - Api for eCommerce Cart
- Host: GitHub
- URL: https://github.com/prinx/hubtel.ecommerce.cart.api
- Owner: prinx
- License: mit
- Created: 2022-07-21T18:08:39.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-08-05T01:42:00.000Z (over 2 years ago)
- Last Synced: 2024-10-17T04:17:06.038Z (29 days ago)
- Language: C#
- Size: 117 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Hubtel.eCommerce.Cart
Shopping Cart API in .NET Core 6
## API Documentation
### Add a new user
```http
POST https://localhost:7150/api/Users
Content-type: application/json{
"name": "Caroline",
"phoneNumber": "233..."
}
```### Add product
```http
POST https://localhost:7150/api/Products
Content-type: application/json{
"name": "Keyboard",
"unitPrice": 5000,
"quantityInStock": 20
}
```### Add item to cart
```http
POST https://localhost:7150/api/CartItems
Content-type: application/json{
"productId": 3,
"userId": 2,
"quantity": 1
}
```
- Quantity can be negative
- Only cart item quantity will be updated if cart item already exist### Delete cart item
```http
DELETE https://localhost:7150/api/CartItems/{id}
```For a full documentation, kindly consult the Swagger link after running the project.
## Swagger link
Use this link Swagger interface after building the project (should open automatically in the browser after a build):
## Improvments
- Add unit tests
- Kafka producer and consumer## LICENSE
[MIT](LICENSE)