{"info":{"_postman_id":"2d9ccd83-a5e3-440e-9218-19d56d88f5a0","name":"ASDC","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"23195527","collectionId":"2d9ccd83-a5e3-440e-9218-19d56d88f5a0","publishedId":"2s9YeAAZuH","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-11-21T15:09:38.000Z"},"item":[{"name":"upload excel file","id":"de34e8aa-a18b-4962-9b4d-e77265e40d2e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"excel","type":"file","fileNotInWorkingDirectoryWarning":"This file isn't in your working directory. Teammates you share this request with won't be able to use this file. To make collaboration easier you can setup your working directory in Settings.","src":"/C:/Users/ECC/Downloads/Task-1.xlsx"}]},"url":"http://localhost:2000/api/excel/upload","description":"<p>This API endpoint allows you to upload an Excel file to the server. The uploaded file should contain data for adding new products.</p>\n<p>To upload the Excel file, send a POST request to <code>http://localhost:2000/api/excel/upload</code>.</p>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<p>This endpoint does not require any request parameters. However, make sure to include the Excel file in the request body.</p>\n<h3 id=\"response\">Response</h3>\n<p>The response will have a status code of 200 if the upload is successful. The response body will contain an array of objects representing the added products. Each product object will have the following properties:</p>\n<ul>\n<li><code>id</code> (number): The unique identifier of the product.</li>\n<li><code>ProductName</code> (string): The name of the product.</li>\n<li><code>ProductDescription</code> (string): The description of the product.</li>\n<li><code>Price</code> (number): The price of the product.</li>\n<li><code>Location</code> (string): The location of the product.</li>\n<li><code>Color</code> (string): The color of the product.</li>\n<li><code>_id</code> (string): The MongoDB document ID of the product.</li>\n<li><code>__v</code> (number): The version number of the product document.</li>\n</ul>\n<p>Please note that the values in the response are placeholders and may not represent the actual data added.</p>\n<p>Make sure to handle any errors that may occur during the upload process.</p>\n","urlObject":{"protocol":"http","port":"2000","path":["api","excel","upload"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"de34e8aa-a18b-4962-9b4d-e77265e40d2e"},{"name":"update","id":"b4fc9863-f4a1-40c4-b365-e2950de8471f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"ProductName\":\"molokheya\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2000/api/excel/update/1117","description":"<p>This API endpoint is used to update an Excel record with the given ID. The request should be a PUT request to the URL <code>http://localhost:2000/api/excel/update/1117</code>, where <code>1117</code> is the ID of the record to be updated.</p>\n<p>The last execution of this request returned a response with a status code of 200. The response body was as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"_id\": \"\",\n    \"id\": 0,\n    \"ProductName\": \"\",\n    \"ProductDescription\": \"\",\n    \"Price\": 0,\n    \"Location\": \"\",\n    \"Color\": \"\",\n    \"__v\": 0\n}\n\n</code></pre>\n<p>Please note that the response body contains the updated record, where each field represents a property of the record. The properties include:</p>\n<ul>\n<li><code>_id</code>: The unique identifier of the record.</li>\n<li><code>id</code>: The ID of the record.</li>\n<li><code>ProductName</code>: The name of the product.</li>\n<li><code>ProductDescription</code>: The description of the product.</li>\n<li><code>Price</code>: The price of the product.</li>\n<li><code>Location</code>: The location of the product.</li>\n<li><code>Color</code>: The color of the product.</li>\n<li><code>__v</code>: The version of the record.</li>\n</ul>\n<p>To update a record, you can provide the updated values for the desired properties in the request body. Make sure to include all the necessary fields and their corresponding values.</p>\n<p>Please refer to the API documentation for more details on the request body and available properties.</p>\n","urlObject":{"protocol":"http","port":"2000","path":["api","excel","update","1117"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b4fc9863-f4a1-40c4-b365-e2950de8471f"},{"name":"delete","id":"0101f6cd-9779-4161-bd9c-28fe65cf4cf1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:2000/api/excel/d/1117","description":"<p>This API endpoint is used to delete a specific Excel document with the given ID. The ID of the document to be deleted is provided as a parameter in the URL.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li>Method: DELETE</li>\n<li>URL: <code>http://localhost:2000/api/excel/delete/1114</code></li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li>Status: 200 OK</li>\n<li>Body:</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"\",\n    \"deletedDocument\": {\n        \"_id\": \"\",\n        \"id\": 0,\n        \"ProductName\": \"\",\n        \"ProductDescription\": \"\",\n        \"Price\": 0,\n        \"Location\": \"\",\n        \"Color\": \"\",\n        \"__v\": 0\n    }\n}\n\n</code></pre>\n<p>The response will contain the status of the deletion operation. If the deletion is successful, the response will have a status code of 200 and an empty message. The deleted document will also be included in the response body, with its properties such as ID, product name, description, price, location, color, and version.</p>\n","urlObject":{"protocol":"http","port":"2000","path":["api","excel","d","1117"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0101f6cd-9779-4161-bd9c-28fe65cf4cf1"},{"name":"get data","id":"1cbfdcde-972d-4784-91d6-1f4a788dbdc4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>This API endpoint is a GET request to retrieve data from an Excel file. The request is sent to the URL <code>http://localhost:2000/api/excel/getData/1107</code>, where <code>1107</code> is a parameter representing the ID of the data to be retrieved.</p>\n<p>The last execution of this request returned a response with a status code of 200, indicating a successful request. The response body is an array of objects, where each object represents a row of data from the Excel file. The properties of each object include:</p>\n<ul>\n<li><code>_id</code>: A unique identifier for the data row.</li>\n<li><code>id</code>: An ID associated with the data row.</li>\n<li><code>ProductName</code>: The name of the product.</li>\n<li><code>ProductDescription</code>: A description of the product.</li>\n<li><code>Price</code>: The price of the product.</li>\n<li><code>Location</code>: The location of the product.</li>\n<li><code>Color</code>: The color of the product.</li>\n<li><code>__v</code>: A version field for internal use.</li>\n</ul>\n<p>Please note that the actual values of the properties may vary and are not included in this description.</p>\n<p>To use this API endpoint, make a GET request to the specified URL with the appropriate ID parameter. The response will contain the requested data from the Excel file.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"1cbfdcde-972d-4784-91d6-1f4a788dbdc4"}]}