Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prinx/hubtel.ecommerce.cart.api.v3
https://github.com/prinx/hubtel.ecommerce.cart.api.v3
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/prinx/hubtel.ecommerce.cart.api.v3
- Owner: prinx
- License: mit
- Created: 2022-08-05T10:06:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-24T08:39:07.000Z (about 2 years ago)
- Last Synced: 2024-10-17T04:16:54.515Z (29 days ago)
- Language: C#
- Size: 39.1 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)