{"id":50951277,"url":"https://github.com/walgaur/yatra","last_synced_at":"2026-06-18T01:32:22.349Z","repository":{"id":203890044,"uuid":"710627233","full_name":"walgaur/yatra","owner":"walgaur","description":"Backend for indian-tourism-project. Currently I am refactoring and migrating the entire codebase to typescript.","archived":false,"fork":false,"pushed_at":"2025-07-30T21:42:15.000Z","size":1618,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"mainline","last_synced_at":"2025-11-12T21:24:20.838Z","etag":null,"topics":["express-js","firebase","mongodb","node","nodemailer","typescript"],"latest_commit_sha":null,"homepage":"https://indian-tourism.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/walgaur.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-27T05:14:30.000Z","updated_at":"2025-07-29T18:00:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"20a3019d-eb4d-4c37-9ce5-b2f79ab54345","html_url":"https://github.com/walgaur/yatra","commit_stats":null,"previous_names":["gauravxor/indian-tourism-backend","gauravxor/yatra","walgaur/yatra"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/walgaur/yatra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walgaur%2Fyatra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walgaur%2Fyatra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walgaur%2Fyatra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walgaur%2Fyatra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/walgaur","download_url":"https://codeload.github.com/walgaur/yatra/tar.gz/refs/heads/mainline","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/walgaur%2Fyatra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34472822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express-js","firebase","mongodb","node","nodemailer","typescript"],"created_at":"2026-06-18T01:32:21.058Z","updated_at":"2026-06-18T01:32:22.337Z","avatar_url":"https://github.com/walgaur.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\u003ch1\u003eIndian Tourism API Documentation\u003c/h1\u003e\u003c/div\u003e\n\u003cb\u003eAll the APIs uses JSON Web Tokens (JWT) for authentication, which are automatically stored as HTTP Cookies. No manual token handling is required.\u003c/b\u003e\n\u003cdiv align=\"center\"\u003e\u003ch2\u003eUser Authentication Endpoints\u003c/h2\u003e\u003c/div\u003e\n\n|     | API Endpoint                              | Method | Auth | Description             |\n| --- | ----------------------------------------- | ------ | ---- | ----------------------- |\n| 1.  | [/api/auth/login](#login)                 | POST   | NO   | Send a login request    |\n| 2.  | [/api/auth/signup](#signup)               | POST   | NO   | Send a singup request   |\n| 3.  | [/api/auth/logout](#logout)               | POST   | YES  | Logout the current user |\n| 4.  | [/api/auth/forgot-password](#forgot-pass) | POST   | NO   | Reset the password      |\n\n\u003cdiv align=\"center\"\u003e\u003ch2\u003eUser Operation Endpoints\u003c/h2\u003e\u003c/div\u003e\n\n|     | API Endpoint                                            | Method | Auth | Description              |\n| --- | ------------------------------------------------------- | ------ | ---- | ------------------------ |\n| 1.  | [/api/update/user](#user-update)                        | POST   | YES  | Update User Details      |\n| 2.  | [/api/user/details/{userId}](#user-details)             | GET    | YES  | Get user details         |\n| 3.  | [/api/user/bookings/{userId}](#user-bookings)           | GET    | YES  | Get user's bookings      |\n| 4.  | [/api/book/cancellations/{userId}](#user-cancellations) | GET    | YES  | Get user's cancellations |\n\n\u003cdiv align=\"center\"\u003e\u003ch2\u003eLocation Endpoints\u003c/h2\u003e\u003c/div\u003e\n\n|     | API Endpoint                                                   | Method | Auth | Description                     |\n| --- | -------------------------------------------------------------- | ------ | ---- | ------------------------------- |\n| 1.  | [/api/location/add-location/](#add-location)                   | POST   | YES  | Add new location                |\n| 2.  | [/api/location/update-location/{locationId}](#update-location) | GET    | YES  | Update location data            |\n| 3.  | [/api/location/](#random-location)                             | GET    | NO   | Get random locations            |\n| 4.  | [/api/location/search/kolkata](#search-location)               | GET    | NO   | Search for a locations          |\n| 5.  | [/api/location/get-availability/{locationId}](#location-avail) | GET    | NO   | Get Location's availablity data |\n\n\u003cdiv align=\"center\"\u003e\u003ch2\u003eBooking Endpoints\u003c/h2\u003e\u003c/div\u003e\n\n|     | API Endpoint                                      | Method | Auth | Description                    |\n| --- | ------------------------------------------------- | ------ | ---- | ------------------------------ |\n| 1.  | [/api/book/lock/](#lock-booking)                  | POST   | YES  | Temporarily lock a booking     |\n| 2.  | [/api/book/lock/details/{lockId}](#lock-details)  | GET    | YES  | Get booking lock details       |\n| 3.  | [/api/book/final](#finalize-booking)              | POST   | YES  | Finalize the locked booking    |\n| 4.  | [/api/book/cancel](#cancel-booking)               | POST   | YES  | Cancel a booking               |\n| 5.  | [/api/book/cancel/approve](#approve-cancellation) | POST   | YES  | Approve a cancellation request |\n\n\u003cdiv align=\"center\"\u003e\u003ch2\u003eOne Time Password (OTP) Endpoints\u003c/h2\u003e\u003c/div\u003e\n\n|     | API Endpoint                        | Method | Auth | Description                                     |\n| --- | ----------------------------------- | ------ | ---- | ----------------------------------------------- |\n| 1.  | [/api/auth/resend-otp](#send-otp)   | POST   | YES  | Send email verification or password reset OTP   |\n| 2.  | [/api/auth/verify-otp](#verify-otp) | POST   | \\*   | Resend email verification or password reset OTP |\n\n---\n\n\u003cdiv align=\"center\"\u003e\u003ch2\u003e API Usage Instructions \u003c/h2\u003e\u003c/div\u003e\n\n\u003c!-- Login API --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"login\"\u003e\u003ch3\u003eCreating a login request\u003ch3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/auth/login` endpoint.\n\n```http\nPOST http://example.com/api/auth/login\nContent-Type: application/json\n\n{\n    \"email\": \"email@domain.com\",\n    \"password\": \"yourPassword\"\n}\n```\n\n\u003c/details\u003e\n\n\u003c!-- Signup API --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"signup\"\u003e\u003ch3\u003eCreating a signup request\u003ch3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/auth/signup` endpoint.\n\n```http\nPOST http://example.com/api/auth/signup\nContent-Type: application/json\n\n{\n    \"email\": \"email@domain.com\",\n    \"password\": \"yourPassword\"\n}\n```\n\nThe request body should also contain the following information\n\n`middleName`, `email`, `phone`, `addressMain`, `country`, `state`, `city`, `pincode`, `dob` with their values in **string** format.\n\n\u003c/details\u003e\n\n\u003c!-- LOGOUT API --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"logout\"\u003e\u003ch3\u003eMaking a logout request\u003ch3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/auth/logout` endpoint.\n\n```http\nPOST http://example.com/api/auth/logout\nContent-Type: application/json\n\n{\n    \"email\": \"email@domain.com\",\n}\n```\n\n\u003c/details\u003e\n\n\u003c!-- FORGOT-PASSWORD --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"forgot-pass\"\u003e\u003ch3\u003eResetting the password\u003ch3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/auth/forgot-password` endpoint.\n\n```http\nPOST http://example.com/api/auth/forgot-password\nContent-Type: application/json\n\n{\n    \"email\": \"email@domain.com\",\n}\n```\n\n\u003c/details\u003e\n\n\u003c!-- UPDATE USER ENDPOINT --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"user-update\"\u003e\u003ch3\u003eUpdating user details\u003ch3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/update/user` endpoint.\n\n```http\nPOST http://example.com/api/update/user\nContent-Type: multipart/form-data\n\n{\n    \"firstName\": \"modified-first-name\",\n    \"lastName\" : \"modified-last-name\",\n    \"email\": \"email@domain.com\",\n}\n```\n\nThe multipart form data can also contain the following fields\n`middleName`, `email`, `phone`, `addressMain`, `country`, `state`, `city`, `pincode`, `dob` in **string** format.\n\n\u003c/details\u003e\n\n\u003c!-- USER DETAILS ENDPOINT --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"user-details\"\u003e\u003ch3\u003eFetching user details\u003ch3\u003e\u003c/summary\u003e\n\nSend a `GET` request to the `/api/user/details/{userId}` endpoint.\n\n```http\nGET http://example.com/api/user/details/{userId}\n```\n\n\u003c/details\u003e\n\n\u003c!-- USER BOOKINGS ENDPOINT --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"user-bookings\"\u003e\u003ch3\u003eFetching all the locations booked by a user\u003ch3\u003e\u003c/summary\u003e\n\nSend a `GET` request to the `/api/user/bookings/{userId}` endpoint.\n\n```http\nGET http://example.com/api/user/bookings/{userId}\n```\n\n\u003c/details\u003e\n\n\u003c!-- USER CANCELLATIONS ENDPOINT --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"user-cancellations\"\u003e\u003ch3\u003eFetching all the bookings cancelled by a user\u003ch3\u003e\u003c/summary\u003e\n\nSend a `GET` request to the `/api/user/cancellations/{userId}` endpoint.\n\n```http\nGET http://example.com/api/user/cancellations/{userId}\n```\n\n\u003c/details\u003e\n\n\u003c!-- ADD NEW LOCATION ENDPOINT --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"add-location\"\u003e\u003ch3\u003eRequest to add a new location\u003ch3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/location/add-location` endpoint.\n\n```http\nPOST http://example.com/api/location/add-location\nContent-Type: application/json\n\n{\n    \"name\" : \"name-of-the-location\"\n    \"description\" : \"description-of-the-location\"\n    \"address\" : \"address-of-the-location\"\n}\n```\n\nThe request body JSON should also contain all these fields.\n`city`, `state`, `country`, `pincode`, `latitude`, `longitude`, `ticketPrice` containing string data,\n\n`cover-iamge1`, `cover-iamge2`, `cover-iamge3`, `slider-image1`, `slider-image2` and `slider-image3` containing image data.\n\n\u003c/details\u003e\n\n\u003c!-- UPDATE LOCATION ENDPOINT --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"update-location\"\u003e\u003ch3\u003eUpdating a location data\u003ch3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/location/update-location/{locationId}` endpoint.\n\n```http\nPOST http://example.com/api/location/update-location/{locationId}\nContent-Type: application/json\n\n{\n    \"name\" : \"updated-name\"\n    \"description\" : \"updated-description\"\n    \"address\" : \"updated-address\"\n}\n```\n\nThe request body JSON MAY contain all these fields.\n`city`, `state`, `country`, `pincode`, `latitude`, `longitude`, `ticketPrice` containing updatedstring data,\n`cover-iamge1`, `cover-iamge2`, `cover-iamge3`, `slider-image1`, `slider-image2` and `slider-image3` containing updated image data.\n\n\u003c/details\u003e\n\n\u003c!-- RANDOM LOCATION --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"random-location\"\u003e\u003ch3\u003eFetching random location's data\u003ch3\u003e\u003c/summary\u003e\n\nSend a `GET` request to the `/api/location/` endpoint.\n\n```http\nGET http://example.com/api/location/\n```\n\n\u003c/details\u003e\n\n\u003c!-- SEARCH LOCATION --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"search-location\"\u003e\u003ch3\u003eSearch locations using search string\u003ch3\u003e\u003c/summary\u003e\n\nSend a `GET` request to the `/api/location/search/{seaerchString}` endpoint.\n\n```http\nGET http://example.com/api/location/{searchString}\n```\n\n\u003c/details\u003e\n\n\u003c!-- LOCATION AVAILABILITY DATA --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"location-avail\"\u003e\u003ch3\u003eGet location's availability data\u003ch3\u003e\u003c/summary\u003e\n\nSend a `GET` request to the `/api/location/get-availability/{locationId}` endpoint.\n\n```http\nGET http://example.com/api/location/get-availability/{locationId}\n```\n\n\u003c/details\u003e\n\n\u003c!-- LOCK BOOKNG ENDPOINT--\u003e\n\u003cdetails\u003e\n\u003csummary id=\"lock-booking\"\u003e\u003ch3\u003eTemporarily lock a booking\u003ch3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/book/lock` endpoint.\n\n```http\nPOST http://example.com/api/location/get-availability/{locationId}\nContent-Type: application/json\n\n{\n    \"locationId\" : location-id,\n    \"noOfTickets\" : 3,\n    \"bookingDate\" : \"01-01-0001\"\n}\n```\n\n\u003c/details\u003e\n\n\u003c!-- GET BOOKING LOCK DETAILS --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"lock-details\"\u003e\u003ch3\u003eFetch the booking lock details\u003c/h3\u003e\u003c/summary\u003e\n\nSend a `GET` request to the `/api/book/lock/details/{lockId}` endpoint.\n\n```http\nGET http://example.com/api/book/lock/details/{lockId}\n```\n\n\u003c/details\u003e\n\n\u003c!-- FINALIZE THE BOOKING --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"finalize-booking\"\u003e\u003ch3\u003eFinalizing the booking using the lock ID\u003c/h3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/book/final` endpoint.\n\n```http\nPOST http://example.com/api/book/final\nContent-Type: application/json\n\n{\n    \"lockId\" : 123,\n    \"paymentId\": \"random-payment-id\"\n}\n```\n\n\u003c/details\u003e\n\n\u003c!-- CANCELLATION REQUEST --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"cancel-booking\"\u003e\u003ch3\u003eSubmit a cancellation request to the admin\u003c/h3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/book/cancel` endpoint.\n\n```http\nPOST http://example.com/api/book/cancel\nContent-Type: application/json\n\n{\n    \"bookingId\" : 123,\n\t\"userId\" : 1234\n}\n```\n\n\u003c/details\u003e\n\n\u003c!-- CANCELLATION APPROVAL --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"approve-cancellation\"\u003e\u003ch3\u003eApproving the ticket cancellation request\u003c/h3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/book/cancel/approve` endpoint.\n\n```http\nPOST http://example.com/api/book/cancel/approve\nContent-Type: application/json\n\n{\n    \"bookingId\" : 123,\n    \"adminId\" : 1234\n}\n```\n\n\u003c/details\u003e\n\n\u003c!-- RESEND OTP --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"send-otp\"\u003e\u003ch3\u003eSend OTP for email verification or password reset\u003c/h3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/auth/resend-otp` endpoint.\n\n```http\nPOST http://example.com/api/auth/resend-otp\nContent-Type: application/json\n\n{\n\t\"email\": \"lipapad224@wiroute.com\",\n\t\"otpType\": \"passwordReset\"\n}\n```\n\n**otpType** key can accept two values.\n\nUse `passwordReset` when the OTP is to validate user for password reset.\n\nUse `emailVerification` the email of the user needs to be verified (during first signup)\n\n\u003c/details\u003e\n\n\u003c!-- VALIDATE OTP --\u003e\n\u003cdetails\u003e\n\u003csummary id=\"verify-otp\"\u003e\u003ch3\u003eVerify the OTP sent to the user's email id\u003c/h3\u003e\u003c/summary\u003e\n\nSend a `POST` request to the `/api/auth/verify-otp` endpoint.\n\n```http\nPOST http://example.com/api/auth/verify-otp\nContent-Type: application/json\n\n{\n \t\"email\": \"email@domain.com\",\n \t\"otp\": \"anOtP\",\n\t\"otpType\": \"passwordReset\"\n}\n\n```\n\n**otpType** key can accept two values.\n\nUse `passwordReset` when you want to validate the OTP sent to reset the password.\n\nUse `emailVerification` when you want to validate the OTP sent to verify the user's email id.\n\n\u003c/details\u003e\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalgaur%2Fyatra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalgaur%2Fyatra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalgaur%2Fyatra/lists"}