SkyAgent Booking API Documentation
Complete API documentation for SkyAgent booking system.
📚 Documentation Sections
1. Authentication
OAuth 2.0 authentication and user profile management.
Endpoints:
- Login (OAuth Token)
- Get Profile
2. Booking Flows
Complete booking workflow from search to ticket issuance.
Endpoints:
- Get Airports
- Search Flights
- Create Booking Session
- Get Services
- Select Services & Seats
- HOLD Booking
- ISSUE Ticket
3. Manage Booking (MMB)
Manage My Booking operations for existing bookings.
Endpoints:
- List Bookings
- Get Booking Details
- Payment (HOLD → ISSUED)
- Update Services
- Buy Seat
- Update Journey
- Send VJ Email
- Cancel Journey
- Add Journey
- Update Passenger
- Send SkyAgent Email
- Download Itinerary PDF
- Split Passenger
🚀 Quick Start
Step 1: Authentication
POST /oauth/token
{
"grant_type": "password",
"email": "your-email@example.com",
"password": "your-password",
"client_id": "your-client-id",
"client_secret": "your-client-secret"
}
Step 2: Use Access Token
Add to all subsequent requests:
Authorization: Bearer {access_token}
Step 3: Start Booking
Follow the Booking Flows documentation for complete workflow.
🔧 Testing Tools
Postman Collection
Import ready-to-use Postman collection:
- 22 pre-configured API requests
- Auto-saved variables
- Test scripts included
See: st-booking-examples/postman/
Example Flows
Run complete booking scenarios:
cd st-booking-examples
npm install
npm run flow booking-full-oneway
📖 API Base URLs
- Production:
https://apis.st.9solutions.vn - Local Development:
http://localhost:3000
🌐 Socket.IO
Flight search uses Socket.IO for real-time results:
- Socket URL (Local):
http://localhost:5001 - Socket URL (Production):
https://api.booking.st.9solutions.vn - Event:
flight_search_result
📝 Documentation Standards
All documentation follows these standards:
- ✅ Request/Response examples from real API calls
- ✅ Complete workflow explanations
- ✅ Error handling guidance
- ✅ Field descriptions and validations
🔗 Related Resources
Last Updated: November 2025
Version: 1.0.0