{"info":{"_postman_id":"6e7bcf6a-1170-46f2-8d93-d67e03947b51","name":"school api","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"36192494","collectionId":"6e7bcf6a-1170-46f2-8d93-d67e03947b51","publishedId":"2sB3BKETje","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-08-19T17:06:21.000Z"},"item":[{"name":"create school","id":"d7537292-8faa-437a-b4c1-415a4d2d1aff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Christiansen - Muller School\",\n    \"address\": \"7769 Osinski Bridge\",\n    \"latitude\": 25.9409,\n    \"longitude\": 22.2802\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/school","description":"<h2 id=\"add-school\">Add School</h2>\n<p>This endpoint allows you to add a new school to the system.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><strong>Method:</strong> POST</li>\n<li><strong>Endpoint:</strong> <code>{{URL}}/api/v1/school</code></li>\n<li><strong>Request Body (JSON):</strong><ul>\n<li><code>name</code> (string): The name of the school.</li>\n<li><code>address</code> (string): The physical address of the school.</li>\n<li><code>latitude</code> (number): The geographical latitude of the school.</li>\n<li><code>longitude</code> (number): The geographical longitude of the school.</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li><strong>Status Code:</strong> 201 Created</li>\n<li><strong>Content-Type:</strong> application/json</li>\n<li><strong>Response Body (JSON):</strong><ul>\n<li><code>status</code> (string): The status of the response.</li>\n<li><code>data</code> (object): Contains the details of the created school.<ul>\n<li><code>id</code> (number): The unique identifier for the newly created school.</li>\n<li><code>createdAt</code> (string): The timestamp when the school was created.</li>\n<li><code>name</code> (string): The name of the school.</li>\n<li><code>address</code> (string): The address of the school.</li>\n<li><code>latitude</code> (number): The latitude of the school.</li>\n<li><code>longitude</code> (number): The longitude of the school.</li>\n</ul>\n</li>\n<li><code>timestamp</code> (string): The timestamp of the response.</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"notes\">Notes</h3>\n<p>Ensure that all parameters are provided in the correct format to successfully create a new school entry.</p>\n","urlObject":{"path":["api","v1","school"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"d7537292-8faa-437a-b4c1-415a4d2d1aff"},{"name":"get all schools","id":"98205c77-1e21-4f6c-8001-2b584cb83768","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{URL}}/api/v1/school?userLat=25&sortBy=distance&userLng=26&sortOrder=desc&limit=10&offset=50","description":"<h3 id=\"api-endpoint-get-schools\">API Endpoint: Get Schools</h3>\n<p>This endpoint retrieves a list of schools based on the user's geographical location and specified sorting preferences. It allows users to find schools near them, sorted by distance.</p>\n<h4 id=\"request-parameters\">Request Parameters</h4>\n<ul>\n<li><strong>userLat</strong> (required, numeric): The latitude of the user's location.</li>\n<li><strong>userLng</strong> (required, numeric): The longitude of the user's location.</li>\n<li><strong>sortBy</strong> (optional, string): The parameter by which to sort the results. In this case, it is set to <code>distance</code>.</li>\n<li><strong>sortOrder</strong> (optional, string): The order of sorting. It can be either <code>asc</code> for ascending or <code>desc</code> for descending. The default here is <code>desc</code>.</li>\n<li><strong>limit</strong> (optional, numeric): The maximum number of results to return. This limits the response to a specified number of schools.</li>\n<li><strong>offset</strong> (optional, numeric): The number of results to skip before starting to collect the results. This is useful for pagination.</li>\n</ul>\n<h4 id=\"response-structure\">Response Structure</h4>\n<p>The response will be in JSON format and includes the following fields:</p>\n<ul>\n<li><strong>status</strong>: A string indicating the status of the request.</li>\n<li><strong>limit</strong>: The number of results requested (as specified in the request).</li>\n<li><strong>offset</strong>: The number of results skipped (as specified in the request).</li>\n<li><strong>total</strong>: The total number of schools available based on the query parameters.</li>\n<li><strong>data</strong>: An array of school objects, each containing:<ul>\n<li><strong>id</strong>: A unique identifier for the school.</li>\n<li><strong>name</strong>: The name of the school.</li>\n<li><strong>address</strong>: The physical address of the school.</li>\n<li><strong>latitude</strong>: The latitude coordinate of the school.</li>\n<li><strong>longitude</strong>: The longitude coordinate of the school.</li>\n<li><strong>distance</strong>: The distance from the user's location to the school.</li>\n</ul>\n</li>\n<li><strong>timestamp</strong>: A string representing the time at which the response was generated.</li>\n</ul>\n<h4 id=\"example-response\">Example Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"limit\": 0,\n  \"offset\": 0,\n  \"total\": 0,\n  \"data\": [\n    {\n      \"id\": 0,\n      \"name\": \"\",\n      \"address\": \"\",\n      \"latitude\": 0,\n      \"longitude\": 0,\n      \"distance\": 0\n    }\n  ],\n  \"timestamp\": \"\"\n}\n</code></pre>\n<p>This response indicates the status of the request and provides detailed information about the schools retrieved based on the user's location and sorting preferences.</p>\n","urlObject":{"path":["api","v1","school"],"host":["{{URL}}"],"query":[{"description":{"content":"<p>required</p>\n","type":"text/plain"},"key":"userLat","value":"25"},{"key":"sortBy","value":"distance"},{"description":{"content":"<p>required</p>\n","type":"text/plain"},"key":"userLng","value":"26"},{"key":"sortOrder","value":"desc"},{"key":"limit","value":"10"},{"key":"offset","value":"50"}],"variable":[]}},"response":[],"_postman_id":"98205c77-1e21-4f6c-8001-2b584cb83768"},{"name":"get all todo","id":"49dd685b-66fe-429e-bb89-ce622dcd8536","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"49dd685b-66fe-429e-bb89-ce622dcd8536"},{"name":"get single todo","id":"004c92fc-8924-462e-8edc-765ec34f3521","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"004c92fc-8924-462e-8edc-765ec34f3521"},{"name":"get all todo fb","id":"032b4187-f2be-413a-9f75-1be4d50e14bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"task\": \"this is the second task \",\n    \"done\": false\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/todo","urlObject":{"path":["api","v1","todo"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"032b4187-f2be-413a-9f75-1be4d50e14bd"},{"name":"update document","id":"a727d047-7aa4-48f5-a3f0-c551d33f0b1b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"task\": \"this is test change \"\n}","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/todo/h2eb269BVR222BFMYCef","urlObject":{"path":["api","v1","todo","h2eb269BVR222BFMYCef"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"a727d047-7aa4-48f5-a3f0-c551d33f0b1b"},{"name":"New Request","id":"120ba2c6-1642-4a87-9e0d-3a7ea66bef51","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"task\": \"this is test change \"\n}"},"url":"{{URL}}/api/v1/todo/h2eb269BVR222BFMYCef","urlObject":{"path":["api","v1","todo","h2eb269BVR222BFMYCef"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"120ba2c6-1642-4a87-9e0d-3a7ea66bef51"},{"name":"New Request","id":"c3d07dd5-fe87-454a-8cf0-5a50008552ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n      \"bookName\": \"test name hello\",\n      \"bookCost\": 2000,\n      \"description\": \"this is the test data\",\n      \"author\": \"rajwinder singh\"\n    }","options":{"raw":{"language":"json"}}},"url":"{{URL}}/api/v1/library","urlObject":{"path":["api","v1","library"],"host":["{{URL}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c3d07dd5-fe87-454a-8cf0-5a50008552ad"}]}