{"info":{"_postman_id":"65ede9a2-8eff-49b5-8f28-4c99a6ff145f","name":"Agronomix API Documentation","description":"<html><head></head><body><p><strong>Agronomix</strong> is an e-commerce app for agro related products. With Agronomix, users can find and purchase agro related products. Merchants can monitor their sales, add new products and manage their customer base. This project was built for the <strong>ALX Final WebStack Project</strong> By Adedoyin Emmanuel, Kofi Taylor and Abdulliah Sala.</p>\n<p>Documentation By <a href=\"https://github.com/adedoyin-emmanuel\">Adedoyin Emmanuel Adeniyi</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"25154969","collectionId":"65ede9a2-8eff-49b5-8f28-4c99a6ff145f","publishedId":"2s9YsGiDUB","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-01-05T05:27:07.000Z"},"item":[{"name":"Auth","item":[{"name":"Login","id":"58441873-97bc-4acd-9b15-621dff6fbe6b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\":\"adedoyine535@gmail.com\",\n    \"password\":\"emmysoft\",\n    \"userType\":\"buyer\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/auth/login","description":"<p>Login endpoint, requires email, password and userType which can be buyer or merchant</p>\n","urlObject":{"path":["auth","login"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"58441873-97bc-4acd-9b15-621dff6fbe6b"},{"name":"Forgot-Password","id":"6f67d732-25a0-46d3-baa2-52e1739c5461","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\":\"adedoyine535@gmail.com\",\n    \"userType\":\"buyer\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/auth/forgot-password","description":"<p>Forgot password endpoint, requires an email and a userType which can be buyer or merchant</p>\n","urlObject":{"path":["auth","forgot-password"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f67d732-25a0-46d3-baa2-52e1739c5461"},{"name":"Reset-Password","id":"a610facd-66fb-4641-87a5-7eef6ee75e2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"token\":\"123\",\n    \"password\":\"114jdgkbdg923\",\n    \"userType\":\"buyer\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/auth/reset-password","description":"<p>Reset password endpoint. This is the endpoint you want to make request to after the forgot-password endpoint. Requires a token, password and a userType</p>\n","urlObject":{"path":["auth","reset-password"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"a610facd-66fb-4641-87a5-7eef6ee75e2c"},{"name":"Verify-Email","id":"7b172b54-50b9-4e72-988f-49b18dedb395","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/auth/verify-email?email=adedoyine535@gmail.com","description":"<p>Verfiy-Email endpoint, this endpoint sends the buyer or merchant an email to get them verified.</p>\n","urlObject":{"path":["auth","verify-email"],"host":["http://localhost:2800/api"],"query":[{"key":"email","value":"adedoyine535@gmail.com"}],"variable":[]}},"response":[],"_postman_id":"7b172b54-50b9-4e72-988f-49b18dedb395"},{"name":"Change-Password","id":"f26bb073-95e6-4bd8-a4ec-75efd2fc1a9f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Change Password endpoint. This endpoint requires a currentPassword and a newPassword passed along with the request body.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"f26bb073-95e6-4bd8-a4ec-75efd2fc1a9f"}],"id":"fa37437c-174c-4483-9472-37e41af35681","description":"<p><strong>Authentication and Authorization</strong>. This request folder contains the <strong>login, reset-password, forgot-password, change-password, verify-email, logout and refresh-token</strong> endpoint.</p>\n","_postman_id":"fa37437c-174c-4483-9472-37e41af35681"},{"name":"Merchant","item":[{"name":"Create Merchant","id":"33374f48-c946-4afc-a664-cadba9d0d7a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\":\"Agronomix\",\n    \"username\":\"agronomix\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/merchant/","description":"<p>Create a new merchant</p>\n","urlObject":{"path":["merchant",""],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"33374f48-c946-4afc-a664-cadba9d0d7a9"},{"name":"Update Merchant","id":"f9c2f3d4-4ab9-4fe1-b702-3e9d308f989b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\":\"Agronomix\",\n    \"username\":\"agronomix\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/merchant/","description":"<p>Update merchant details</p>\n","urlObject":{"path":["merchant",""],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"f9c2f3d4-4ab9-4fe1-b702-3e9d308f989b"},{"name":"Search Merchant","id":"2f7e2d41-0a11-4323-85fa-ffd72d27e8f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\":\"Agronomix\",\n    \"username\":\"agronomix\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/merchant/search?searchTerm=agronomix","description":"<p>Search a merchant by name</p>\n","urlObject":{"path":["merchant","search"],"host":["http://localhost:2800/api"],"query":[{"key":"searchTerm","value":"agronomix"}],"variable":[]}},"response":[],"_postman_id":"2f7e2d41-0a11-4323-85fa-ffd72d27e8f1"},{"name":"Online Merchant","id":"765671e9-0aec-442e-bb77-e4f49130b6a5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\":\"Agronomix\",\n    \"username\":\"agronomix\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/merchant/online","description":"<p>This endpoint fetches merchant that are online.</p>\n","urlObject":{"path":["merchant","online"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"765671e9-0aec-442e-bb77-e4f49130b6a5"},{"name":"Me","id":"b663f067-473d-4865-ac2a-eea60f61763b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\":\"Agronomix\",\n    \"username\":\"agronomix\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/merchant/online","description":"<p>This endpoint is particular to a merchant that's currently logged in, visiting the endpoint provides basic information about the authenticated user such as fullname, email-address, profilePicture, dateAdded, updatedAt, orderHistory, and other necessary information the client needs.</p>\n","urlObject":{"path":["merchant","online"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"b663f067-473d-4865-ac2a-eea60f61763b"},{"name":"All Merchants","id":"684a1992-352b-4194-9369-c0da795b74ff","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\":\"Agronomix\",\n    \"username\":\"agronomix\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/merchant/","description":"<p>This endpoint fetches all merchant on Agronomix</p>\n","urlObject":{"path":["merchant",""],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"684a1992-352b-4194-9369-c0da795b74ff"},{"name":"Get Merchant By Id","id":"43abe46f-5849-42bb-8169-2bdf775beb9e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\":\"Agronomix\",\n    \"username\":\"agronomix\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/merchant/133590hdgsnti0358305","description":"<p>This endpoint gets a merchant by his/her id</p>\n","urlObject":{"path":["merchant","133590hdgsnti0358305"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"43abe46f-5849-42bb-8169-2bdf775beb9e"},{"name":"Delete Merchant","id":"aea0b9b3-97ea-44e9-a8fc-1f87827ca74d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"companyName\":\"Agronomix\",\n    \"username\":\"agronomix\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/merchant/133590hdgsnti0358305","description":"<p>Delete Merchant Endpoint, this can be accessed by only super-admins for now.</p>\n","urlObject":{"path":["merchant","133590hdgsnti0358305"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"aea0b9b3-97ea-44e9-a8fc-1f87827ca74d"}],"id":"87d744c7-268a-43d2-a62e-c2a59dc20581","description":"<p>Merchant Resource. This request folder contains the endpoint for the merchant resource.</p>\n","_postman_id":"87d744c7-268a-43d2-a62e-c2a59dc20581"},{"name":"Buyer","item":[{"name":"Create Buyer","id":"7658dfc2-75b9-4d59-8977-08927b27fc46","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"Adedoyin Emmanuel\",\n    \"username\":\"emmysoft\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/buyer","description":"<p>Create a new buyer which is the primary user</p>\n","urlObject":{"path":["buyer"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"7658dfc2-75b9-4d59-8977-08927b27fc46"},{"name":"Update Buyer","id":"639a4075-c78a-4e93-a1de-3960a8bee069","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"Adedoyin Emmanuel\",\n    \"username\":\"emmysoft\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/buyer","description":"<p>Updates a buyer details</p>\n","urlObject":{"path":["buyer"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"639a4075-c78a-4e93-a1de-3960a8bee069"},{"name":"Search Buyer","id":"9b6a2f43-d74a-4893-aa2b-111bb320db11","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"Adedoyin Emmanuel\",\n    \"username\":\"emmysoft\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/buyer/search?searchTerm=emmysoft","description":"<p>Search for a buyer</p>\n","urlObject":{"path":["buyer","search"],"host":["http://localhost:2800/api"],"query":[{"key":"searchTerm","value":"emmysoft"}],"variable":[]}},"response":[],"_postman_id":"9b6a2f43-d74a-4893-aa2b-111bb320db11"},{"name":"Online Buyer","id":"ff231bf0-2fe3-4ed5-ae3f-28cab326ab5b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"Adedoyin Emmanuel\",\n    \"username\":\"emmysoft\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/buyer/search?searchTerm=emmysoft","description":"<p>Fetches all buyers that are online</p>\n","urlObject":{"path":["buyer","search"],"host":["http://localhost:2800/api"],"query":[{"key":"searchTerm","value":"emmysoft"}],"variable":[]}},"response":[],"_postman_id":"ff231bf0-2fe3-4ed5-ae3f-28cab326ab5b"},{"name":"Me","id":"15d552e2-ccb6-41da-9ef0-2e09bdef1566","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"Adedoyin Emmanuel\",\n    \"username\":\"emmysoft\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/buyer/me","description":"<p>This endpoint is particular to the authenticated buyer, on visiting this endpoint, provides basic information about the authenticated buyer.</p>\n","urlObject":{"path":["buyer","me"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"15d552e2-ccb6-41da-9ef0-2e09bdef1566"},{"name":"All Buyers","id":"58c6323c-afa0-4c6f-9326-9fde72f3439c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"Adedoyin Emmanuel\",\n    \"username\":\"emmysoft\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/buyer/","description":"<p>Gets all buyers on Agronomix.</p>\n","urlObject":{"path":["buyer",""],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"58c6323c-afa0-4c6f-9326-9fde72f3439c"},{"name":"Get Buyer By Id","id":"e84dbc42-7c32-4838-9b5d-41b60509f958","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"Adedoyin Emmanuel\",\n    \"username\":\"emmysoft\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/buyer/sdjsglet03963nlsnslg","description":"<p>Gets a buyer by his/her Id</p>\n","urlObject":{"path":["buyer","sdjsglet03963nlsnslg"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"e84dbc42-7c32-4838-9b5d-41b60509f958"},{"name":"Delete Buyer","id":"2fbaa9c7-ccc7-4cf8-ad8a-e66c693d9966","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"name\":\"Adedoyin Emmanuel\",\n    \"username\":\"emmysoft\",\n    \"email\":\"addedoyine535@gmail.com\",\n    \"password\":\"emmysoft\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/buyer/sdjsglet03963nlsnslg","description":"<p>Deletes a buyer from the platform, only avaliable to super-admins at the moment.</p>\n","urlObject":{"path":["buyer","sdjsglet03963nlsnslg"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"2fbaa9c7-ccc7-4cf8-ad8a-e66c693d9966"}],"id":"a07cbfee-758e-40bd-a52c-156dad77134d","description":"<p>Buyer Resouces</p>\n","_postman_id":"a07cbfee-758e-40bd-a52c-156dad77134d"},{"name":"Product","item":[{"name":"Create Product","id":"682e4bb2-b03d-4f16-a821-390dc1a99373","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/product","description":"<p>This endpoint is only accessible to only the merchant resource, a buyer can not create a product.</p>\n","urlObject":{"path":["product"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"682e4bb2-b03d-4f16-a821-390dc1a99373"},{"name":"Update Product","id":"3dc5ec24-b121-4c44-ab2f-ca247dd05752","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/product","description":"<p>Update product endpoint.</p>\n","urlObject":{"path":["product"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"3dc5ec24-b121-4c44-ab2f-ca247dd05752"},{"name":"Get All Products","id":"786a8568-3fae-4ab4-a468-e5afa858e702","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/product","description":"<p>Gets all products</p>\n","urlObject":{"path":["product"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"786a8568-3fae-4ab4-a468-e5afa858e702"},{"name":"Get Product By Id","id":"481370d8-fc67-4d79-a767-3120c1046d68","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/product/1","description":"<p>Gets a product by Id</p>\n","urlObject":{"path":["product","1"],"host":["http://localhost:2800/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"481370d8-fc67-4d79-a767-3120c1046d68"},{"name":"Search Product","id":"73ee0baa-917c-4784-bee0-8a81a9fbdf9f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:2800/api/product?searchTerm=yam","description":"<p>Search a product by its name or description.</p>\n","urlObject":{"path":["product"],"host":["http://localhost:2800/api"],"query":[{"key":"searchTerm","value":"yam"}],"variable":[]}},"response":[],"_postman_id":"73ee0baa-917c-4784-bee0-8a81a9fbdf9f"}],"id":"0157415c-756b-4705-9fc3-a1aecd811065","_postman_id":"0157415c-756b-4705-9fc3-a1aecd811065","description":""},{"name":"Transactions","item":[],"id":"35e2bdd9-d179-4d2e-b8db-65aa7dd2b92c","description":"<p>Transactions request folder</p>\n","_postman_id":"35e2bdd9-d179-4d2e-b8db-65aa7dd2b92c"}],"event":[{"listen":"prerequest","script":{"id":"a260b3b8-e17f-48d7-9f70-88cb181b8f79","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a016dc5b-8b5d-4e5a-9cba-326119f8b906","type":"text/javascript","exec":[""]}}],"variable":[{"key":"BASE_URL","value":"http://localhost:2800/api","type":"string"}]}