Skip to content

BASIC STORE API WHICH STORES DATA ABOUT PRODUCTS

Notifications You must be signed in to change notification settings

MuslimShah/StoreAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

-------------- SIMPLE API OF STORE PRODUCTS ---------

IN THIS API USER CAN GET ALL PRODUCTS AND THEIR ALL FIELDS USER CAN GET SOME SELECTED FIELDS USER CAN SEARCH USING NAME OF PRODUCT AND COMPANY USER CAN SORT PRODUCTS USER CAN LIMIT PRODUCTS

REQUESTS

get('api/v1/products');

Search by name

get('api/v1/products?name=(name here)')

search by company

get('api/v1/products?company=(comapny name here)')

sort

get('api/v1/products?sort=(name,price)')

add a - prefix for decending

limit

get('api/v1/products?limit=(limit here)')

only selected fields

get('api/v1/products?select=(fields here separated by comma)')

Pagination

get('api/v1/products?page=(page here i.e 2)')

Example

{
"_id":"63fe4fc543b8fd3fe12f13da"
"featured":"false"
"rating":4
"createdAt":"2023-02-28T19:01:59.291+00:00"
"name":"accent chair"
"price":25
"company":"marcos"
}

About

BASIC STORE API WHICH STORES DATA ABOUT PRODUCTS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published