0% found this document useful (0 votes)
8 views12 pages

Travel & Tourism API

The Travel & Tourism API (v1.0.0) provides access to travel information, including destinations, accommodations, flights, and booking services. It allows users to search for destinations and accommodations, manage bookings, and retrieve flight information, with various authorization methods available. The API is licensed under Apache 2.0 and offers detailed responses in JSON format for each endpoint.

Uploaded by

aharxict
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views12 pages

Travel & Tourism API

The Travel & Tourism API (v1.0.0) provides access to travel information, including destinations, accommodations, flights, and booking services. It allows users to search for destinations and accommodations, manage bookings, and retrieve flight information, with various authorization methods available. The API is licensed under Apache 2.0 and offers detailed responses in JSON format for each endpoint.

Uploaded by

aharxict
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Travel & Tourism API (v1.0.

0)
Download OpenAPI specification: Download

Wanderlust Travel Co.: dev@wanderlust.example.com | URL: https://wanderlust.example.com/api-support


License: Apache 2.0

API for accessing travel information, including destinations, accommodations, flights, and booking services.

Destinations

Discover and explore travel destinations.

Search for travel destinations


AUTHORIZATIONS: apiKey or oauth2

QUERY PARAMETERS

query string
Search query (e.g., city name, country, landmark)

region string
Filter by geographical region (e.g., Europe, Southeast Asia)

interests Array of strings


Comma-separated list of interests (e.g., beach, adventure, culture)

Responses

200 A list of matching destinations.

default An unexpected error occurred.

GET /destinations
Response samples

200 default

Content type
application/json

Copy Expand all Collapse all


[
- {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Paris, France",
"countryCode": "FR",
"shortDescription": "The city of lights, known for its art, fashion, and cultur
"thumbnailUrl": "https://cdn.example.com/paris_thumb.jpg",
"averageRating": 4.8
}
]

Get details for a specific destination


AUTHORIZATIONS: apiKey or oauth2

PATH PARAMETERS

destinationId string <uuid>


required
Unique identifier for the destination

Responses

200 Detailed information about the destination.

404 The requested resource was not found.

default An unexpected error occurred.

GET /destinations/{destinationId}

Response samples
200 404 default

Content type
application/json

Copy Expand all Collapse all


{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Paris, France",
"countryCode": "FR",
"shortDescription": "The city of lights, known for its art, fashion, and culture.",
"thumbnailUrl": "https://cdn.example.com/paris_thumb.jpg",
"averageRating": 4.8,
"longDescription": "Paris offers iconic landmarks like the Eiffel Tower and Louvre
- "images": [
"string"
],
"timeZone": "Europe/Paris",
"currency": "EUR",
"bestTimeToVisit": "Spring (April-June) or Fall (September-October)",
- "attractions": [
+ { … }
],
"localLanguage": "French"
}

Accommodations

Find and manage accommodation bookings.

Search for accommodations


AUTHORIZATIONS: apiKey or oauth2

REQUEST BODY SCHEMA: application/json

destinationId
string <uuid>
required

checkInDate
string <date>
required
checkOutDate
string <date>
required

numberOfAdults integer >= 1


required

numberOfChildren integer >= 0


Default: 0

accommodationType string or null


Enum: "hotel" "apartment" "guesthouse" "hostel" "resort"
"villa"

minStarRating integer or null [ 1 .. 5 ]

amenities Array of strings or null

Responses

200 A list of available accommodations matching the criteria.

400 The request was malformed or invalid.

default An unexpected error occurred.

POST /accommodations/search

Request samples

Payload

Content type
application/json

Copy Expand all Collapse all


{
"destinationId": "destination-uuid-paris",
"checkInDate": "2024-09-15",
"checkOutDate": "2024-09-20",
"numberOfAdults": 2,
"numberOfChildren": 0,
"accommodationType": "hotel",
"minStarRating": 1,
- "amenities": [
"wifi",
"pool",
"parking"
]
}

Response samples

200 400 default

Content type
application/json

Copy Expand all Collapse all


[
- {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Grand Parisian Hotel",
"type": "hotel",
"starRating": 4,
+ "pricePerNight": { … },
"address": "123 Rue de Rivoli, 75001 Paris, France",
"thumbnailUrl": "string",
+ "location": { … }
}
]

Get details for a specific accommodation


AUTHORIZATIONS: apiKey or oauth2

PATH PARAMETERS

accommodationId string <uuid>


required
Unique identifier for the accommodation

Responses

200 Detailed information about the accommodation.

404 The requested resource was not found.


default An unexpected error occurred.

GET /accommodations/{accommodationId}

Response samples

200 404 default

Content type
application/json

Copy Expand all Collapse all


{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Grand Parisian Hotel",
"type": "hotel",
"starRating": 4,
- "pricePerNight": {
"amount": 450,
"currency": "USD"
},
"address": "123 Rue de Rivoli, 75001 Paris, France",
"thumbnailUrl": "string",
- "location": {
"latitude": 0,
"longitude": 0
},
"description": "string",
- "images": [
"string"
],
- "amenities": [
"string"
],
"checkInTime": "15:00",
"checkOutTime": "11:00",
"policies": "Cancellation policy: Free cancellation up to 7 days before arrival.",
- "reviews": [
+ { … }
]
}
Flights

Search for and book flights.

Search for flights


AUTHORIZATIONS: apiKey or oauth2

REQUEST BODY SCHEMA: application/json

originAirportCode string^[A-Z]{3}$
required

destinationAirportCode
string^[A-Z]{3}$
required

departureDate
string <date>
required

returnDate string or null <date>

numberOfAdults
integer >= 1
required

numberOfChildren integer >= 0


Default: 0

numberOfInfants integer >= 0


Default: 0

cabinClass string
Default: "economy"
Enum: "economy" "premium_economy" "business" "first"

flexibleDates boolean
Default: false

Responses

200 A list of available flights matching the criteria.

400 The request was malformed or invalid.


default An unexpected error occurred.

POST /flights/search

Request samples

Payload

Content type
application/json

Copy
{
"originAirportCode": "CDG",
"destinationAirportCode": "JFK",
"departureDate": "2024-10-01",
"returnDate": "2024-10-15",
"numberOfAdults": 1,
"numberOfChildren": 0,
"numberOfInfants": 0,
"cabinClass": "economy",
"flexibleDates": false
}

Response samples

200 400 default

Content type
application/json

Copy Expand all Collapse all


[
- {
"id": "string",
+ "segments": [ … ],
+ "totalPrice": { … },
"refundable": true,
"baggageAllowance": "1 checked bag, 1 carry-on"
}
]
Bookings

Manage travel bookings.

Create a new booking


AUTHORIZATIONS: apiKey or oauth2

REQUEST BODY SCHEMA: application/json

travelerInfo object (TravelerInfo)


required

paymentDetails
object
required

items
Array of BookingItemFlight (object) or BookingItemAccommodation (object) non-empty
required

Responses

201 Booking created successfully.

400 The request was malformed or invalid.

402 Payment is required to complete the action.

default An unexpected error occurred.

POST /bookings

Request samples

Payload

Content type
application/json

Copy Expand all Collapse all


{
- "travelerInfo": {
"firstName": "string",
"lastName": "string",
"email": "user@example.com",
"phone": "string",
"dateOfBirth": "2019-08-24"
},
- "paymentDetails": {
"paymentToken": "tok_abcdef123456"
},
- "items": [
+ { … }
]
}

Response samples

201 400 402 default

Content type
application/json

Copy Expand all Collapse all


{
"bookingId": "9a471128-954e-4e64-bde9-e8147015df89",
"status": "confirmed",
- "totalAmount": {
"amount": 450,
"currency": "USD"
},
- "bookedItems": [
+ { … }
],
"createdAt": "2019-08-24T14:15:22Z"
}

Get booking details


AUTHORIZATIONS: apiKey or oauth2

PATH PARAMETERS

bookingId string <uuid>


required
Unique identifier for the booking
Responses

200 Detailed information about the booking.

404 The requested resource was not found.

default An unexpected error occurred.

GET /bookings/{bookingId}

Response samples

200 404 default

Content type
application/json

Copy Expand all Collapse all


{
"bookingId": "9a471128-954e-4e64-bde9-e8147015df89",
"status": "confirmed",
- "totalAmount": {
"amount": 450,
"currency": "USD"
},
- "bookedItems": [
+ { … }
],
"createdAt": "2019-08-24T14:15:22Z"
}

Cancel a booking
AUTHORIZATIONS: apiKey or oauth2

PATH PARAMETERS

bookingId string <uuid>


required
Unique identifier for the booking to cancel
Responses

— 204 Booking cancelled successfully.

404 The requested resource was not found.

409 Conflict with the current state of the resource.

default An unexpected error occurred.

DELETE /bookings/{bookingId}

Response samples

404 409 default

Content type
application/json

Copy
{
"code": "DESTINATION_NOT_FOUND",
"message": "string",
"details": "string"
}

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy