{"info":{"_postman_id":"6fa06db6-d453-4981-9e45-7db4f154c704","name":"Rider","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"43871527","collectionId":"6fa06db6-d453-4981-9e45-7db4f154c704","publishedId":"2sB3BHkoZ3","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-08-16T14:51:04.000Z"},"item":[{"name":"add-user","event":[{"listen":"test","script":{"id":"e8520f54-56f3-4664-8b0e-9bde0ed876c5","exec":["var template = `\r","<style type=\"text/css\">\r","    .tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}\r","    .tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;text-align:left;}\r","    .tftable tr {background-color:#ffffff;}\r","    .tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}\r","    .tftable tr:hover {background-color:#e0ffff;}\r","</style>\r","\r","<table class=\"tftable\" border=\"1\">\r","    <tr>\r","        <th>ID</th>\r","        <th>Name</th>\r","        <th>Age</th>\r","        <th>Email</th>\r","    </tr>\r","    \r","    {{#each response}}\r","        <tr>\r","            <td>{{id}}</td>\r","            <td>{{name}}</td>\r","            <td>{{age}}</td>\r","            <td>{{email}}</td>\r","        </tr>\r","    {{/each}}\r","</table>\r","`;\r","\r","function constructVisualizerPayload() {\r","    return { response: pm.response.json() };\r","}\r","\r","pm.visualizer.set(template, constructVisualizerPayload());"],"type":"text/javascript","packages":{}}}],"id":"27e43cf4-6765-4790-986b-8f782ad980f9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"sam\",\r\n    \"rating\":\"3.4\",\r\n    \"lat\":\"32.43\",\r\n    \"long\":\"34.56\"\r\n}","options":{"raw":{"language":"json"}}},"url":"localhost:3000/api/rider/addrider","description":"<h2 id=\"add-rider-api\">Add Rider API</h2>\n<p>This endpoint allows you to add a new rider to the system. It accepts rider details in the request body and processes the information to create a new rider entry.</p>\n<h3 id=\"request-method\">Request Method</h3>\n<p><code>POST</code></p>\n<h3 id=\"endpoint\">Endpoint</h3>\n<p><code>/api/rider/addrider</code></p>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<p>The request body must be in JSON format and should include the following parameters:</p>\n<ul>\n<li><p><strong>name</strong> (string): The name of the rider.</p>\n</li>\n<li><p><strong>rating</strong> (string): The rating of the rider, represented as a string.</p>\n</li>\n<li><p><strong>lat</strong> (string): The latitude coordinate of the rider's location.</p>\n</li>\n<li><p><strong>long</strong> (string): The longitude coordinate of the rider's location.</p>\n</li>\n</ul>\n<h3 id=\"example-request-body\">Example Request Body</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"sam\",\n  \"rating\": \"3.4\",\n  \"lat\": \"32.43\",\n  \"long\": \"34.56\"\n}\n\n</code></pre>\n<h3 id=\"expected-response\">Expected Response</h3>\n<p>On successful addition of the rider, the API will return a confirmation response. The response format will typically include a success message and the details of the newly created rider entry.</p>\n<p>Make sure to handle any potential errors, such as validation issues, which may be returned in the response as well.</p>\n<p>This endpoint allows you to add a new rider to the system.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p><strong>Method</strong>: <code>POST</code></p>\n</li>\n<li><p><strong>Endpoint</strong>: <code>/api/rider/addrider</code></p>\n</li>\n</ul>\n<h3 id=\"request-body\">Request Body</h3>\n<p>The request body must be in JSON format and include the following parameters:</p>\n<ul>\n<li><p><strong>name</strong> (string): The name of the rider.</p>\n</li>\n<li><p><strong>rating</strong> (string): The rating of the rider, represented as a string.</p>\n</li>\n<li><p><strong>lat</strong> (string): The latitude coordinate of the rider's location.</p>\n</li>\n<li><p><strong>long</strong> (string): The longitude coordinate of the rider's location.</p>\n</li>\n</ul>\n<p><strong>Example Request Body</strong>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"name\": \"sam\",\n  \"rating\": \"3.4\",\n  \"lat\": \"32.43\",\n  \"long\": \"34.56\"\n}\n\n</code></pre>\n<h3 id=\"expected-response-1\">Expected Response</h3>\n<p>Upon successful addition of the rider, the API will respond with a confirmation message and the details of the added rider. The response format will typically include the rider's unique identifier and any other relevant information confirming the successful operation.</p>\n","urlObject":{"port":"3000","path":["api","rider","addrider"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"27e43cf4-6765-4790-986b-8f782ad980f9"},{"name":"get rider","id":"31ac7c18-fc08-46dd-a661-90cde671fd04","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:3000/api/rider/getrider?lat=13.1&long=34.33","description":"<h2 id=\"get-rider-information\">Get Rider Information</h2>\n<p>This endpoint retrieves information about riders based on their geographical location.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p><strong>Method:</strong> GET</p>\n</li>\n<li><p><strong>Endpoint:</strong> <code>/api/rider/getrider</code></p>\n</li>\n<li><p><strong>Query Parameters:</strong></p>\n<ul>\n<li><p><code>lat</code> (float): The latitude of the location to search for riders.</p>\n</li>\n<li><p><code>long</code> (float): The longitude of the location to search for riders.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h3 id=\"example-request\">Example Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /api/rider/getrider?lat=13.1&amp;long=34.33\n\n</code></pre><h3 id=\"response\">Response</h3>\n<ul>\n<li><p><strong>Status Code:</strong> 200</p>\n</li>\n<li><p><strong>Content-Type:</strong> application/json</p>\n</li>\n<li><p>[{ \"id\": 0, \"name\": \"\", \"rating\": 0, \"lat\": 0, \"long\": 0, \"distance\": 0}]</p>\n</li>\n</ul>\n<p>The response will be an array of rider objects, each containing the following fields:</p>\n<ul>\n<li><p><code>id</code>: Unique identifier for the rider.</p>\n</li>\n<li><p><code>name</code>: Name of the rider.</p>\n</li>\n<li><p><code>rating</code>: Rating of the rider.</p>\n</li>\n<li><p><code>lat</code>: Latitude of the rider's location.</p>\n</li>\n<li><p><code>long</code>: Longitude of the rider's location.</p>\n</li>\n<li><p><code>distance</code>: Distance from the specified location to the rider.</p>\n</li>\n</ul>\n<h2 id=\"overview\">Overview</h2>\n<p>This endpoint is designed to retrieve data using an HTTP GET request. It allows users to access specific resources based on the provided parameters.</p>\n<h2 id=\"request-method\">Request Method</h2>\n<ul>\n<li><strong>Method</strong>: GET</li>\n</ul>\n<h2 id=\"endpoint\">Endpoint</h2>\n<ul>\n<li><strong>URL</strong>: localhost:3000/api/rider/getrider</li>\n</ul>\n<h2 id=\"request-parameters\">Request Parameters</h2>\n<p>The request may include the following parameters (exact parameters are not specified):</p>\n<ul>\n<li><p>lat: provide the latitude</p>\n</li>\n<li><p>long: provide the longitude</p>\n</li>\n<li><p><em>(Add additional parameters as necessary)</em></p>\n</li>\n</ul>\n<h2 id=\"expected-response-format\">Expected Response Format</h2>\n<p>The response from this endpoint will typically be in JSON format, containing the requested data. The structure of the response will include keys relevant to the requested resource.</p>\n<h2 id=\"example-response\">Example Response</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n \"id\":\"3\",\n r\"rating\":\"3.2\",\n \"lat\":\"13.1\",\n \"long\":\"34.65\",\n \"dist\":\"1.08\"\n}\n\n</code></pre>\n<h2 id=\"notes\">Notes</h2>\n<ul>\n<li><p>Ensure that all required parameters are included in the request to receive the expected data.</p>\n</li>\n<li><p>The response will vary based on the parameters provided in the request.</p>\n</li>\n</ul>\n","urlObject":{"port":"3000","path":["api","rider","getrider"],"host":["localhost"],"query":[{"key":"lat","value":"13.1"},{"key":"long","value":"34.33"}],"variable":[]}},"response":[],"_postman_id":"31ac7c18-fc08-46dd-a661-90cde671fd04"}]}