{"info":{"_postman_id":"13aa9001-2e24-48c9-bc02-49c59769ec74","name":"school management api","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"40107823","collectionId":"13aa9001-2e24-48c9-bc02-49c59769ec74","publishedId":"2sB2j1hso1","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-04-28T09:34:54.000Z"},"item":[{"name":"post addschools","id":"1aee26e6-3f04-48ad-90c0-191332ba38e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"ABC High\",\r\n  \"address\": \"123 Main St\",\r\n  \"latitude\": 32.9988,\r\n  \"longitude\": 90.7378\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/api/schools/addschool","description":"<h3 id=\"add-school\">Add School</h3>\n<p>This endpoint allows you to add a new school to the database.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>name</code> (string) : The name of the school.</p>\n</li>\n<li><p><code>address</code> (string) : The address of the school.</p>\n</li>\n<li><p><code>latitude</code> (number) : The latitude coordinate of the school location.</p>\n</li>\n<li><p><code>longitude</code> (number) : The longitude coordinate of the school location.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p><code>success</code> (boolean) : Indicates if the request was successful.</p>\n</li>\n<li><p><code>message</code> (string) : A message related to the request.</p>\n</li>\n<li><p><code>data</code> (object) : An object containing the details of the added school, including the name, address, latitude, longitude, _id, createdAt, updatedAt, and __v.</p>\n</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"message\": \"\",\n    \"data\": {\n        \"name\": \"ABC High\",\n        \"address\": \"123 Main St\",\n        \"latitude\": 0,\n        \"longitude\": 0,\n        \"_id\": \"\",\n        \"createdAt\": \"\",\n        \"updatedAt\": \"\",\n        \"__v\": 0\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"8000","path":["api","schools","addschool"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1aee26e6-3f04-48ad-90c0-191332ba38e2"},{"name":"get all schools list","event":[{"listen":"test","script":{"id":"7f7effe7-5b86-4867-8ef4-2afcc7ed53a0","exec":[""],"type":"text/javascript","packages":{}}}],"id":"cb4e285c-c433-4e38-86f8-4e4e63ae77dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/api/schools/listSchools?latitude=32.98&longitude=90.73","description":"<p>This endpoint makes an HTTP GET request to retrieve a list of schools based on the provided latitude and longitude coordinates. The request should include the latitude and longitude query parameters in the URL.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p>Method: GET</p>\n</li>\n<li><p>URL: <code>http://localhost:8000/api/schools/listSchools</code></p>\n</li>\n<li><p>Query Parameters:</p>\n<ul>\n<li><p>latitude (number): The latitude coordinate.</p>\n</li>\n<li><p>longitude (number): The longitude coordinate.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>Upon a successful execution, the endpoint returns a JSON response with a status code of 200 and the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"message\": \"\",\n  \"data\": [\n    {\n      \"_id\": \"\",\n      \"name\": \"\",\n      \"address\": \"\",\n      \"latitude\": 0,\n      \"longitude\": 0,\n      \"createdAt\": \"\",\n      \"updatedAt\": \"\",\n      \"__v\": 0,\n      \"distance\": 0\n    }\n  ]\n}\n\n</code></pre>\n<ul>\n<li><p><code>success</code> (boolean): Indicates if the request was successful.</p>\n</li>\n<li><p><code>message</code> (string): An optional message related to the response.</p>\n</li>\n<li><p><code>data</code> (array): An array of school objects, each containing the following properties:</p>\n<ul>\n<li><p><code>_id</code> (string): The unique identifier of the school.</p>\n</li>\n<li><p><code>name</code> (string): The name of the school.</p>\n</li>\n<li><p><code>address</code> (string): The address of the school.</p>\n</li>\n<li><p><code>latitude</code> (number): The latitude coordinate of the school location.</p>\n</li>\n<li><p><code>longitude</code> (number): The longitude coordinate of the school location.</p>\n</li>\n<li><p><code>createdAt</code> (string): The timestamp of the school's creation.</p>\n</li>\n<li><p><code>updatedAt</code> (string): The timestamp of the school's last update.</p>\n</li>\n<li><p><code>__v</code> (number): Version key for the school object.</p>\n</li>\n<li><p><code>distance</code> (number): The distance of the school from the provided coordinates.</p>\n</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8000","path":["api","schools","listSchools"],"host":["localhost"],"query":[{"key":"latitude","value":"32.98"},{"key":"longitude","value":"90.73"}],"variable":[]}},"response":[],"_postman_id":"cb4e285c-c433-4e38-86f8-4e4e63ae77dc"}]}