Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 566 Bytes

get.md

File metadata and controls

36 lines (28 loc) · 566 Bytes

Get products

Description

Get all products from database.

URL : /api/products

Method: GET

Success Response

Code: 200 OK

Context example

[
  {
    "__v": 0,
    "_id": "6369523318c90dd1e14fd8b0",
    "createdAt": "2022-11-07T18:45:07.229Z",
    "name": "ball",
    "price": 5,
    "updatedAt": "2022-11-07T18:45:07.229Z"
  },
  {
    "__v": 0,
    "_id": "636952bedc28685ef0f7aa85",
    "createdAt": "2022-11-07T18:47:26.263Z",
    "name": "shoes",
    "price": 20,
    "updatedAt": "2022-11-07T18:47:26.263Z"
  }
]