Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

GaaS-Holdings/test-store-backend

Repository files navigation

API

Get list of products

GET /products

Response

[
  {
    "id": 1,
    "name": "Rise",
    "tagline": "Daily Nootropic For Memory",
    "image": "https://url1",
    "featured": false
  }
]

Statuses

Status Code Description
200 OK
500 INTERNAL SERVER ERROR

Get current cart

GET /cart

Response

[
  {
    "product_id": 1,
    "quantity": 2
  }
]

Statuses

Status Code Description
200 OK
500 INTERNAL SERVER ERROR

Add product to the cart

POST /cart/add
Parameter Type Description
product_id integer Required. Product ID
quantity integer Required. Amount to add

Response

[
  {
    "product_id": 1,
    "quantity": 2
  }
]
Status Code Description
200 OK
404 NOT FOUND
500 INTERNAL SERVER ERROR

Delete product from the cart

POST /cart/delete
Parameter Type Description
product_id integer Required. Product ID

Response

[
  {
    "product_id": 1,
    "quantity": 2
  }
]
Status Code Description
200 OK
404 NOT FOUND
500 INTERNAL SERVER ERROR

Update product in the cart

POST /cart/update
Parameter Type Description
product_id integer Required. Product ID
quantity integer Required. New amount

Response

[
  {
    "product_id": 1,
    "quantity": 2
  }
]
Status Code Description
200 OK
422 UNPROCESSABLE ENTITY
404 NOT FOUND
500 INTERNAL SERVER ERROR

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published