Migrating from API Marketplace to Zyla Hub: Travel API Guide

Zyla Hub can significantly enhance your application's capabilities, especially in the travel category. This guide will walk you through the migration process, focusing on the essential APIs available in the Zyla Hub, including the Travel Planning API, Trip Planner API, Trip Directions API, Route Planning API, Route Optimization API, Airline Flights Tracking API, Search Flight Prices API, and Flight Tracking API with Call Signs.
Understanding the Migration Process
Step 1: Account Setup
Zyla Hub. This unified platform allows you to manage multiple APIs under a single account, simplifying the integration process. Once your account is set up, you can access the comprehensive documentation for each API, which provides detailed information on endpoints, request parameters, and response structures.
Step 2: Authentication Changes
Step 3: SDK Compatibility
Step 4: Endpoint Mapping
Travel Planning API
Travel Planning API is designed to help developers create applications that assist users in planning their travel itineraries. This API analyzes user preferences, destinations, and the number of days to generate personalized travel plans.
Key Features and Capabilities
Get Plan endpoint. This endpoint allows developers to generate a travel plan by specifying the destination and the number of days.
Example Response for Get Plan
{
"plan": [
{
"day": 1,
"activities": [
{
"time": "9:00 AM",
"description": "Arrive in Azores and check-in to hotel"
}
]
},
{
"day": 2,
"activities": [
{
"time": "10:00 AM",
"description": "Explore Ponta Delgada"
}
]
}
],
"key": "10-azores",
"_id": "678028b5e4eff1162be21702"
}
- plan: An array of daily itineraries.
- day: The day number of the itinerary.
- activities: An array of activities planned for that day, including time and description.
- key: A unique identifier for the travel plan.
- _id: The unique ID of the response.
Trip Planner API
Trip Planner API allows users to discover their perfect itinerary tailored to their desired number of days and location. This innovative tool combines AI intelligence with user travel preferences to recommend top attractions and accommodations.
Key Features and Capabilities
Get Planning endpoint. This endpoint generates a trip plan based on the specified number of days and destination.
Example Response for Get Planning
{
"plan": [
{
"day": 1,
"activities": [
{
"time": "9:00 AM",
"description": "Arrive in Skardu and check-in to hotel"
},
{
"time": "1:00 PM",
"description": "Visit Shangrila Resort for lunch"
}
]
},
{
"day": 2,
"activities": [
{
"time": "9:00 AM",
"description": "Visit Shigar Fort and Amburiq Mosque"
}
]
}
],
"key": "3- ",
"_id": "679446cfa1736959cd9b6bef"
}
Trip Directions API
Trip Directions API provides efficient routing and detailed turn-by-turn directions for various modes of transportation, including driving, cycling, walking, and public transportation.
Key Features and Capabilities
Get Directions endpoint. This endpoint calculates the route between provided waypoints and includes turn-by-turn directions.
Example Response for Get Directions
{
"routes": [
{
"distance": 7767,
"duration": 630.783,
"steps": [
{
"instruction": {
"text": "Drive north on Ggginger Strae."
},
"distance": 1581,
"duration": 114.754
},
{
"instruction": {
"text": "Turn right onto Schertlinstrae."
},
"distance": 1307,
"duration": 141.6
}
]
}
]
}
- routes: An array of calculated routes.
- distance: The total distance of the route in meters.
- duration: The estimated travel time in seconds.
- steps: An array of turn-by-turn directions, including distance and duration for each step.
Route Planning API
Route Planning API allows users to find the optimal route between stops using various transportation modes.
Key Features and Capabilities
Get Route endpoint. This endpoint calculates the route between provided waypoints and includes turn-by-turn directions.
Example Response for Get Route
{
"features": [
{
"type": "Feature",
"properties": {
"mode": "drive",
"waypoints": [
{
"location": [10.87474, 48.34364],
"original_index": 0
},
{
"location": [10.90925, 48.37073],
"original_index": 1
}
],
"distance": 7767,
"time": 630.783,
"legs": [
{
"distance": 7767,
"time": 630.783,
"steps": [
{
"from_index": 0,
"to_index": 88,
"distance": 1581,
"time": 114.754,
"instruction": {
"text": "Drive north on Ggginger Strae."
}
}
]
}
]
}
}
]
}
- features: An array of calculated route features.
- mode: The mode of transportation used for the route.
- waypoints: An array of waypoints for the trip.
- distance: The total distance of the route in meters.
- time: The estimated travel time in seconds.
- legs: An array of legs for the route, including distance and time for each leg.
Route Optimization API
Route Optimization API allows users to calculate the optimal route for various transportation modes.
Key Features and Capabilities
Route Planning endpoint. This endpoint calculates the optimal route between provided waypoints, including turn-by-turn directions.
Example Response for Route Planning
{
"features": [
{
"type": "Feature",
"properties": {
"mode": "drive",
"waypoints": [
{
"location": [10.87474, 48.34364],
"original_index": 0
},
{
"location": [10.90925, 48.37073],
"original_index": 1
}
],
"distance": 7767,
"time": 630.779,
"legs": [
{
"distance": 7767,
"time": 630.779,
"steps": [
{
"from_index": 0,
"to_index": 88,
"distance": 1581,
"time": 114.746,
"instruction": {
"text": "Drive north on Ggginger Strae."
}
}
]
}
]
}
}
]
}
Airline Flights Tracking API for Real-Time Flight Status
Airline Flights Tracking API provides real-time flight status updates for airline flights. This API enables developers to integrate comprehensive flight tracking functionality into their applications.
Key Features and Capabilities
Get Flights endpoint. This endpoint retrieves all active flights based on the IATA code of any airline, providing current position, heading, course, speed, altitude, and more.
Example Response for Get Flights
{
"success": true,
"output": {
"count": 84,
"data": [
{
"latitude": 23.5445,
"longitude": -74.8629,
"id": "368d8b33",
"icao_24bit": "E494F1",
"heading": 302,
"altitude": 40000,
"ground_speed": 469,
"squawk": "",
"aircraft_code": "A339",
"registration": "PR-ANX",
"time": 1723231420,
"origin_airport_iata": "CNF",
"destination_airport_iata": "FLL",
"number": "AD8732",
"airline_iata": "AD",
"on_ground": 0,
"vertical_speed": 0,
"callsign": "AZU8732",
"airline_icao": "AZU"
}
]
}
}
- success: Indicates whether the request was successful.
- output: Contains the flight data.
- count: The number of active flights returned.
- data: An array of flight details, including latitude, longitude, altitude, and more.
Search Flight Prices API
Search Flight Prices API allows users to check fares for any flight, making it an essential tool for travel agencies and booking platforms.
Key Features and Capabilities
Get Prices endpoint. This endpoint retrieves, monitors, and explores a wide range of flight options, allowing users to search for flights between specified origin and destination, including pricing details.
Example Response for Get Prices
{
"itineraries": {
"buckets": [
{
"id": "Best",
"name": "Best",
"items": [
{
"id": "13554-2209211735--32332-1-9828-2209212205",
"price": {
"raw": 105,
"formatted": "$105"
},
"legs": [
{
"id": "13554-2209211735--32332-1-9828-2209212205",
"origin": {
"id": "LHR",
"name": "London Heathrow",
"displayCode": "LHR",
"city": "London",
"isHighlighted": false
},
"destination": {
"id": "BER",
"name": "Berlin Brandenburg",
"displayCode": "BER",
"city": "Berlin",
"isHighlighted": false
},
"durationInMinutes": 210,
"stopCount": 1,
"isSmallestStops": true,
"departure": "2022-09-21T17:35:00",
"arrival": "2022-09-21T22:05:00"
}
]
}
]
}
]
}
}
- itineraries: Contains the flight options available.
- buckets: An array of pricing categories (e.g., Best).
- items: An array of flight details, including price, legs, and duration.
Flight Tracking API with Call Signs for Real-Time Flight Status
Flight Tracking API with Call Signs provides real-time flight status updates, delivering accurate information on flight departures, arrivals, delays, and cancellations.
Key Features and Capabilities
Get Flights endpoint. This endpoint retrieves all flights currently in the air, providing IATA codes, current position, speed, heading, departure and arrival airports, and callsign.
Example Response for Get Flights
{
"success": true,
"output": {
"count": 1500,
"data": [
{
"id": "306cca05",
"icao_24bit": "ACE75A",
"latitude": 40.7651,
"longitude": -122.9614,
"heading": 345,
"altitude": 56900,
"ground_speed": 4,
"squawk": "N/A",
"aircraft_code": "BALL",
"registration": "N930TH",
"time": 1686597234,
"origin_airport_iata": "N/A",
"destination_airport_iata": "N/A",
"number": "N/A",
"airline_iata": "N/A",
"on_ground": 0,
"vertical_speed": 0,
"callsign": "HBAL628",
"airline_icao": "N/A"
}
]
}
}
- success: Indicates whether the request was successful.
- output: Contains the flight data.
- count: The number of flights returned.
- data: An array of flight details, including latitude, longitude, altitude, and more.
Common Pitfalls and Migration Scripts
Improvements Users Can Expect
- Lower Latency: Zyla Hub's infrastructure is designed for high performance, ensuring faster response times for API calls.
- Better Documentation: Comprehensive and clear documentation is available for each API, making it easier for developers to implement and troubleshoot.
- Enhanced Support: Zyla Hub offers dedicated support to assist developers with any issues they may encounter during integration.
Conclusion
Zyla Hub can significantly enhance your travel application's capabilities. By leveraging the powerful APIs available in the Zyla Hub, developers can provide users with personalized travel experiences, real-time flight tracking, and optimized routing solutions. Follow the steps outlined in this guide to ensure a seamless migration process, and take advantage of the benefits that Zyla Hub has to offer.
Read our technical guides for implementation tips.
Check out the API documentation to get started.
Visit the developer docs for complete API reference.
Read our technical guides for implementation tips.
Check out the API documentation to get started.
Check out the API documentation to get started.
View the integration guide for step-by-step instructions.
View the integration guide for step-by-step instructions.