{"info":{"_postman_id":"1b5534b2-d0ff-46e1-a4c7-95e47c7758ea","name":"Bus API","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"19939427","collectionId":"1b5534b2-d0ff-46e1-a4c7-95e47c7758ea","publishedId":"2s847LMr5Q","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-10-19T19:18:50.000Z"},"item":[{"name":"AUTHENTICATION","item":[{"name":"Register","id":"64bca5ed-5804-4e89-9eb5-f9de02169d00","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"fahd\",\r\n    \"email\": \"roussafifahd@gmail.com\",\r\n    \"password\": \"123456\",\r\n    \"address\": \"test 123\",\r\n    \"city\": \"safi\",\r\n    \"state\": \"kesh-safi\",\r\n    \"zip\": \"50000\",\r\n    \"country\": \"morocco\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/create-user","urlObject":{"protocol":"http","port":"5000","path":["api","auth","create-user"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"64bca5ed-5804-4e89-9eb5-f9de02169d00"},{"name":"Login","id":"cde77c73-ddad-4a0f-97fd-352557d31ca6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"roussafifahd@gmail.com\",\r\n    \"password\" : \"password\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/login","urlObject":{"protocol":"http","port":"5000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"cde77c73-ddad-4a0f-97fd-352557d31ca6"},{"name":"ResetPassword","id":"5a93f83d-8f6c-4dca-af40-10ce3ce7ff7e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"\",\r\n    \"redirectUrl\" : \"google.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/requestPasswordReset","urlObject":{"protocol":"http","port":"5000","path":["api","auth","requestPasswordReset"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5a93f83d-8f6c-4dca-af40-10ce3ce7ff7e"},{"name":"Update Password","id":"9dcdc997-0c65-4e36-9ea3-401939699bb7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"newPassword\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/ResetPassword/636e5ba49199d2316d65b949/d2e26643-11c1-43ca-815c-4cc7cef00318636e5ba49199d2316d65b949","urlObject":{"protocol":"http","port":"5000","path":["api","auth","ResetPassword","636e5ba49199d2316d65b949","d2e26643-11c1-43ca-815c-4cc7cef00318636e5ba49199d2316d65b949"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9dcdc997-0c65-4e36-9ea3-401939699bb7"}],"id":"d01a5041-1b36-4ede-b9b2-a1cb71878d01","_postman_id":"d01a5041-1b36-4ede-b9b2-a1cb71878d01","description":""},{"name":"BOOKING","item":[{"name":"Get all Bookings","id":"2f258a7a-97be-43ef-9044-45042f124ead","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"","value":"","type":"text"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/bookings/get-all-bookings","urlObject":{"protocol":"http","port":"5000","path":["api","bookings","get-all-bookings"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2f258a7a-97be-43ef-9044-45042f124ead"},{"name":"Book Seat","id":"b092fcae-ca5a-4868-aeb5-9145b041445b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \r\n            \"bus\": \"635f86f25aaaf2db856eb87e\",\r\n            \"seats\": [\r\n            5\r\n            ]\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/bookings/book-seat/6357dca47d1dcad7b9849fc0","urlObject":{"protocol":"http","port":"5000","path":["api","bookings","book-seat","6357dca47d1dcad7b9849fc0"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b092fcae-ca5a-4868-aeb5-9145b041445b"},{"name":"Get booking by user","id":"23eeecfd-2e6d-421c-9e18-7da5fc7458e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/bookings/634c90280856abce5b51c3c7","urlObject":{"protocol":"http","port":"5000","path":["api","bookings","634c90280856abce5b51c3c7"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"23eeecfd-2e6d-421c-9e18-7da5fc7458e7"},{"name":"cancel booking","id":"0319b4b3-5b5d-4c51-a81c-e79b5fd7c5f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/bookings/6357f15351d84f66db846c3d/634c90280856abce5b51c3c7/634c7badb1882c2f3b266f24","urlObject":{"protocol":"http","port":"5000","path":["api","bookings","6357f15351d84f66db846c3d","634c90280856abce5b51c3c7","634c7badb1882c2f3b266f24"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0319b4b3-5b5d-4c51-a81c-e79b5fd7c5f8"},{"name":"Get by Params","id":"16dde778-306a-47ac-bacd-d13463a11cf8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/buses/get?from=Ounagha&to=Jerada&journeyDate=2022-11-14","urlObject":{"protocol":"http","port":"5000","path":["api","buses","get"],"host":["localhost"],"query":[{"key":"from","value":"Ounagha"},{"key":"to","value":"Jerada"},{"key":"journeyDate","value":"2022-11-14"}],"variable":[]}},"response":[],"_postman_id":"16dde778-306a-47ac-bacd-d13463a11cf8"}],"id":"e8ff2e50-ee24-431e-a613-8ac4d39bd41b","_postman_id":"e8ff2e50-ee24-431e-a613-8ac4d39bd41b","description":""},{"name":"BUSES","item":[{"name":"Get All Buses","id":"e61035b2-ab8a-451c-b2df-5afd0a5977f9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/buses/get-all-buses","urlObject":{"protocol":"http","port":"5000","path":["api","buses","get-all-buses"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e61035b2-ab8a-451c-b2df-5afd0a5977f9"},{"name":"Get bus by id","id":"461e6624-450a-4113-8995-434c96b8a6d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/buses/634c7badb1882c2f3b266f24","urlObject":{"protocol":"http","port":"5000","path":["api","buses","634c7badb1882c2f3b266f24"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"461e6624-450a-4113-8995-434c96b8a6d4"},{"name":"Add Bus","id":"ab8f3d82-158a-43c8-b777-9856a13e2935","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"TE-TE\",\r\n    \"busNumber\": \"1500\",\r\n    \"from\":\"TEST\",\r\n    \"to\":\"TEST\",\r\n    \"departure\":\"6:00\",\r\n    \"arrival\":\"9:00\",\r\n    \"journeyDate\":\"2022-12-01\",\r\n    \"capacity\":\"50\",\r\n    \"price\":\"150\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/buses/add-bus","urlObject":{"protocol":"http","port":"5000","path":["api","buses","add-bus"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"ab8f3d82-158a-43c8-b777-9856a13e2935"},{"name":"Update Bus","id":"c43f38b7-c938-4245-aaa7-ad9e6e063cc6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"_id\": \"634c7badb1882c2f3b266f24\",\r\n    \"name\": \"CA-TA\",\r\n    \"busNumber\": \"4500\",\r\n    \"from\":\"Casablanca\",\r\n    \"to\":\"Tanger\",\r\n    \"departure\":\"2:00 am\",\r\n    \"arrival\":\"5:00 am\",\r\n    \"JourneyDate\":\"2022/10/22\",\r\n    \"capacity\":\"40\",\r\n    \"price\":\"200\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/buses/update-bus","urlObject":{"protocol":"http","port":"5000","path":["api","buses","update-bus"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c43f38b7-c938-4245-aaa7-ad9e6e063cc6"},{"name":"Delete Bus","id":"e07f5635-1f50-4f45-8da8-731c4fe81be8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/buses/634d2c8f9aa346086f807842","urlObject":{"protocol":"http","port":"5000","path":["api","buses","634d2c8f9aa346086f807842"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e07f5635-1f50-4f45-8da8-731c4fe81be8"}],"id":"2a939d4e-10a5-4e02-8e2b-14403b22a90b","_postman_id":"2a939d4e-10a5-4e02-8e2b-14403b22a90b","description":""},{"name":"USERS","item":[{"name":"Get User by id","id":"56639a3f-3b72-4c39-81df-c49ee6700b1b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/users/634c90280856abce5b51c3c7","urlObject":{"protocol":"http","port":"5000","path":["api","users","634c90280856abce5b51c3c7"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"56639a3f-3b72-4c39-81df-c49ee6700b1b"},{"name":"Get all users","id":"8073b278-c47f-44cb-8518-7a627fc56d40","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/users/get-all-users","urlObject":{"protocol":"http","port":"5000","path":["api","users","get-all-users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8073b278-c47f-44cb-8518-7a627fc56d40"}],"id":"826a5251-f9fc-4d7f-b816-bddde3202e45","_postman_id":"826a5251-f9fc-4d7f-b816-bddde3202e45","description":""}]}