Store Locator Frontend API’s
1.Fetch Stores - User
Request:-
http://localhost:6969/store/fetch-stores
With this API you can Easily Fetch all the data of our Stores List and User can see all
the Stores Location with this.
Response:-
{
"message": "Here we can see the data of all Stores...",
"stores": [
"_id": "66a20f0d6b904a403e393e22",
"gst_No": "12345tctgc",
"name": "Saksham Agarwal",
"latitude": 2345,
"longitude": 12345,
"pincode": "759857",
"address": "Agra",
"owner": {
"_id": "66a0b34cbb6ad52f2664ffdd",
"name": "Saksham Agarwal",
"contact": "7088894066",
"email": "cheeta1234@gmail.com",
"username": "saksham__agarwal__20",
"__v": 0,
"store": "66a20f0d6b904a403e393e22"
},
"__v": 0
},
"_id": "66a211069ca1b45fc20f9c76",
"gst_No": "27AABCU9603R1ZM",
"name": "XYZ Enterprises",
"latitude": 28.7041,
"longitude": 77.1025,
"pincode": "110001",
"address": "456, Market Road, Delhi, India"
},
"_id": "66a21f4d9ca1b45fc20f9c78",
"gst_No": "27AABC9603R1ZM",
"name": "XYZ Enterprises",
"latitude": 28.7041,
"longitude": 77.1025,
"pincode": "110001",
"address": "456, Market Road, Delhi, India"
},
Note: The Above given data is only a sample data, these are not real stores.
2.Register Store
Request:-
http://localhost:6969/store/register-store
You have to enter the following Key value pairs in the url-encoded form then you can
register your store in our database
{
gst_No:AVGVSVJ,
name:Vanshika Enterprises,
latitude:28.7041,
longitude:77.1025,
pincode:110001,
address:123, Wano kuni, New world,
Response:-
{
“message”:"Your Store Successfully Added..."
},
“gst_No”:”AVGVSVJ”,
“name”:”Vanshika Enterprises”,
“latitude”:”28.7041”,
“longitude”:”77.1025”,
“pincode”:”110001”,
“address”:”123, Wano kuni, New world”,
}
3.Update Store
Request:-
http://localhost:6969/store/update-store
You have to enter the following updated Key value pairs in the url-encoded form then
you can update your store in our database
{
“gst_No”:”AVGVSVJ”,
“name”:”God D. Usopp”,
“address”:”Egg Head, Near Elbaf, New World, Grand Line”,
Note: Please give the same gst number to keep it unique, also make it easy to find and update.
Response:-
{
“message”:" Store Details Updated Successfully..."
},
“gst_No”:”AVGVSVJ”,
“name”:”God D. Usopp”,
“latitude”:”28.7041”,
“longitude”:”77.1025”,
“pincode”:”110001”,
“address”:” Egg Head, Near Elbaf, New World, Grand Line”,