update qty
This commit is contained in:
38
api-tests/cart.http
Normal file
38
api-tests/cart.http
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
### Add item to cart
|
||||
POST https://cart.tornberg.me/api/12345
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"sku": "763281",
|
||||
"quantity": 1
|
||||
}
|
||||
|
||||
### Update quanity of item in cart
|
||||
PUT https://cart.tornberg.me/api/12345/1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"quantity": 1
|
||||
}
|
||||
|
||||
### Add item to cart
|
||||
POST http://localhost:8080/cart/12345/item
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"itemId": "67890",
|
||||
"quantity": 2
|
||||
}
|
||||
|
||||
### Remove item from cart
|
||||
DELETE http://localhost:8080/cart/12345/item/67890
|
||||
|
||||
### Checkout cart
|
||||
POST http://localhost:8080/cart/12345/checkout
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"paymentMethod": "credit_card",
|
||||
"shippingAddress": "123 Main St, Anytown, USA"
|
||||
}
|
||||
Reference in New Issue
Block a user