https://github.com/harshitvarshneyv/travel-api-using-resttemplate
https://github.com/harshitvarshneyv/travel-api-using-resttemplate
api api-integration java javascript mvc-architecture reactjs restful-api resttemplate
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/harshitvarshneyv/travel-api-using-resttemplate
- Owner: HarshitVarshneyv
- Created: 2025-07-04T17:50:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-30T11:36:14.000Z (11 months ago)
- Last Synced: 2025-08-10T12:27:12.175Z (11 months ago)
- Topics: api, api-integration, java, javascript, mvc-architecture, reactjs, restful-api, resttemplate
- Language: JavaScript
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MyBiz Travel Request API Integration (Spring Boot)
[Note : This is the project in which the main focus is calling the external api through RestTemplate of Make my trip i.e, request goes to one server to another server ].
This project integrates with MakeMyTrip's **myBiz Travel Request API**, enabling seamless travel requisition, approval, and booking synchronization between a third-party platform and myBiz.
---
## 🚀 Features
* Create travel requests and redirect users to myBiz
* Receive itineraries pushed by myBiz
* Send approval/rejection of services
* Receive booking details & vouchers after successful booking
---
## 📁 Project Structure
```
com.example.travelintegration
└── config
└── RestTemplateConfig.java
└── controller
└── TravelController.java
└── service
└── TravelService.java
└── TravelServiceImpl.java
└── dto
├── TravelRequest.java
├── ApprovalRequest.java
├── BookingPushPayload.java
└── ItineraryPushPayload.java
```
---
## ⚙️ Configuration
Update your `application.properties`:
```properties
mybiz.api.key=your-partner-api-key
mybiz.client.code=your-client-code
```
---
## 🔗 API Endpoints
### 1. Create Travel Request
```
POST /api/travel/create-itinerary
```
* Sends trip data to myBiz
* Receives requisitionId and redirect URL
### 2. Receive Itinerary Push (from myBiz)
```
POST /api/travel/receive-itinerary
```
* myBiz calls this with full itinerary JSON after request creation
### 3. Send Approval
```
PUT /api/travel/send-approval
```
* Sends manager-level approvals or rejections
### 4. Receive Booking Details
```
POST /api/travel/receive-booking
```
* Receives booking info & vouchers after myBiz confirms booking
---
## 🧰 Technologies Used
* Java 17+
* Spring Boot 3+
* Spring Web (RestTemplate)
* Lombok
---
## 📦 Sample Payloads
Sample DTOs for each API interaction are defined in the `dto` package. Refer to:
* `TravelRequest` for outbound travel initiation
* `ItineraryPushPayload` for receiving itinerary
* `ApprovalRequest` to send approvals
* `BookingPushPayload` for booking data
---
## ✅ Running the App
1. Clone the repo
2. Add your credentials to `application.properties`
3. Run the Spring Boot application
4. Use Postman or your frontend to test the APIs
---
## 🙋 Support
Raise an issue or reach out if you need help customizing the integration.
Contact => Email : harshitvarshneyv2@gmail.com