Skip to content

Commit 3a14462

Browse files
authored
Merge pull request #246 from amadeus4dev/remove-trip-parser
Remove Trip Parser guides
2 parents dd383d8 + f578e6a commit 3a14462

File tree

4 files changed

+2
-135
lines changed

4 files changed

+2
-135
lines changed

docs/examples/code-example.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -887,26 +887,6 @@ By Id
887887
--8<-- "https://github.com/amadeus4dev/amadeus-code-examples/raw/master/city_search/v1/get/Java%20SDK/CitySearch.java"
888888
```
889889

890-
### Trip Parser
891-
892-
=== "Python"
893-
894-
```python
895-
--8<-- "https://github.com/amadeus4dev/amadeus-code-examples/raw/master/trip_parser/v3/post/Python%20SDK/trip_parser.py"
896-
```
897-
898-
=== "Node"
899-
900-
``` javascript
901-
--8<-- "https://github.com/amadeus4dev/amadeus-code-examples/raw/master/trip_parser/v3/post/Node%20SDK/trip_parser.js"
902-
```
903-
904-
=== "Java"
905-
906-
```java
907-
--8<-- "https://github.com/amadeus4dev/amadeus-code-examples/raw/master/trip_parser/v3/post/Java%20SDK/TripParser.java"
908-
```
909-
910890
### Trip Purpose Prediction
911891

912892
=== "Python"

docs/resources/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ In this section, you'll discover a comprehensive collection of tutorials for eac
66
| ----------- | ----------- |
77
| [Destination Experiences](./destination-experiences.md) | <ul><li>[Points of Interest](https://developers.amadeus.com/self-service/category/destination-content/api-doc/points-of-interest/api-reference){:target="\_blank"}</li><li>[Tours and Activities](https://developers.amadeus.com/self-service/category/destination-content/api-doc/tours-and-activities/api-reference){:target="\_blank"}</li></ul> |
88
| [Flights](./flights.md) | <ul><li>[Flight Offers Search](https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-search){:target="\_blank"}</li><li>[Flight Offers Price](https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-price){:target="\_blank"}</li><li>[Flight Create Orders](https://developers.amadeus.com/self-service/category/air/api-doc/flight-create-orders){:target="\_blank"}</li><li>[Flight Order Management](https://developers.amadeus.com/self-service/category/air/api-doc/flight-order-management){:target="\_blank"}</li><li>[Seatmap Display](https://developers.amadeus.com/self-service/category/air/api-doc/seatmap-display){:target="\_blank"}</li><li>[Branded Fares Upsell](https://developers.amadeus.com/self-service/category/air/api-doc/branded-fares-upsell){:target="\_blank"}</li><li>[Flight Price Analysis](https://developers.amadeus.com/self-service/category/air/api-doc/flight-price-analysis){:target="\_blank"}</li><li>[Flight Choice Prediction](https://developers.amadeus.com/self-service/category/air/api-doc/flight-choice-prediction){:target="\_blank"}</li><li>[Flight Inspiration Search](https://developers.amadeus.com/self-service/category/air/api-doc/flight-inspiration-search){:target="\_blank"}</li><li>[Flight Cheapest Date Search](https://developers.amadeus.com/self-service/category/air/api-doc/flight-cheapest-date-search){:target="\_blank"}</li><li>[Flight Availabilities Search](https://developers.amadeus.com/self-service/category/air/api-doc/flight-availabilities-search){:target="\_blank"}</li><li>[Travel Recommendations](https://developers.amadeus.com/self-service/category/trip/api-doc/travel-recommendations){:target="\_blank"}</li><li>[On Demand Flight Status](https://developers.amadeus.com/self-service/category/air/api-doc/on-demand-flight-status){:target="\_blank"}</li><li>[Flight Delay Prediction](https://developers.amadeus.com/self-service/category/air/api-doc/flight-delay-prediction){:target="\_blank"}</li><li>[Airport & City Search](https://developers.amadeus.com/self-service/category/air/api-doc/airport-and-city-search){:target="\_blank"}</li><li>[Airport Nearest Relevant](https://developers.amadeus.com/self-service/category/air/api-doc/airport-nearest-relevant){:target="\_blank"}</li><li>[Airport Routes API](https://developers.amadeus.com/self-service/category/air/api-doc/airport-routes){:target="\_blank"}</li><li>[Airport On-Time Performance](https://developers.amadeus.com/self-service/category/air/api-doc/airport-on-time-performance){:target="\_blank"}</li><li>[Flight Check-in Links](https://developers.amadeus.com/self-service/category/air/api-doc/flight-check-in-links){:target="\_blank"}</li><li>[Airline Code Lookup](https://developers.amadeus.com/self-service/category/air/api-doc/airline-code-lookup){:target="\_blank"}</li> <li>[Airline Routes](https://developers.amadeus.com/self-service/category/air/api-doc/airline-routes){:target="\_blank"}</li></ul> |
9-
| [Hotels](./hotels.md) | <ul><li>[Hotel List](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-list/api-reference){:target="\_blank"}</li><li>[Hotel Ratings](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-ratings/api-reference){:target="\_blank"}</li><li>[Hotel Search](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-search/api-reference){:target="\_blank"}</li><li>[Hotel Booking](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-booking/api-reference){:target="\_blank"}</li><li>[Hotel Name Autocomplete API](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-name-autocomplete/api-reference){:target="\_blank"}</li></ul> |
10-
| [Itinerary Management](./itinerary-managment.md) | <ul><li>[Trip Parser](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-parser/api-reference){:target="\_blank"}</li><li>[Trip Purpose Prediction](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-purpose-prediction/api-reference){:target="\_blank"}</li><li>[City Search](https://developers.amadeus.com/self-service/category/trip/api-doc/city-search){:target="\_blank"}</li></ul> |
9+
| [Hotels](./hotels.md) | <ul><li>[Hotel List](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-list/api-reference){:target="\_blank"}</li><li>[Hotel Ratangs](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-ratings/api-reference){:target="\_blank"}</li><li>[Hotel Search](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-search/api-reference){:target="\_blank"}</li><li>[Hotel Booking](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-booking/api-reference){:target="\_blank"}</li><li>[Hotel Name Autocomplete API](https://developers.amadeus.com/self-service/category/hotel/api-doc/hotel-name-autocomplete/api-reference){:target="\_blank"}</li></ul> |
10+
| [Itinerary Management](./itinerary-managment.md) | <ul><li>[Trip Purpose Prediction](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-purpose-prediction/api-reference){:target="\_blank"}</li><li>[City Search](https://developers.amadeus.com/self-service/category/trip/api-doc/city-search){:target="\_blank"}</li></ul> |
1111
| [Market insights](./market-insight.md) | <ul><li>[Flight Most Traveled Destinations](https://developers.amadeus.com/self-service/category/air/api-doc/flight-most-traveled-destinations/api-reference){:target="\_blank"}</li><li>[Flight Most Booked Destinations](https://developers.amadeus.com/self-service/category/air/api-doc/flight-most-booked-destinations/api-reference){:target="\_blank"}</li><li>[Flight Busiest Traveling Period](https://developers.amadeus.com/self-service/category/air/api-doc/flight-busiest-traveling-period/api-reference){:target="\_blank"}</li><li>[Location Score](https://developers.amadeus.com/self-service/category/destination-content/api-doc/location-score/api-reference){:target="\_blank"}</li></ul> |

docs/resources/itinerary-managment.md

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -7,120 +7,8 @@ In the **Itinerary Management** category, you can give travelers a simple and pe
77

88
| APIs | Description |
99
|------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
10-
| [Trip Parser](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-parser/api-reference){:target="\_blank"} | Build a single itinerary with information from different booking confirmation emails. |
1110
| [Trip Purpose Prediction](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-purpose-prediction/api-reference){:target="\_blank"} | Analyze a flight itinerary and predict whether the trip is for business or leisure. |
1211
| [City Search](https://developers.amadeus.com/self-service/category/trip/api-doc/city-search){:target="\_blank"} | Finds cities that match a specific word or string of letters. |
13-
14-
## Parse the email confirmation into JSON
15-
16-
The [Trip Parser API](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-parser/api-reference){:target="\_blank"} helps to extract information from different booking confirmation emails and compile it into a single structured `JSON` itinerary. This API can parse information from `flight`, `hotel`, `rail`, and `rental car` confirmation emails. It provides the result of your parsing immediately, thanks to our algorithm.
17-
18-
19-
### Encode your booking confirmation in Base64
20-
21-
The first step to parsing is to encode your booking confirmation file in `Base64` format. This will give you the base of your API request. You should not add formatting or any other elements to your booking confirmation as it will affect the parsing.
22-
23-
There are many tools and software that you can use for Base64 encoding. Some programming languages implement encoding and decoding functionalities in their standard library. In `python`, for example, it will look similar to this:
24-
25-
```py
26-
import base64
27-
with open("booking.pdf", "rb") as booking_file:
28-
encoded_string = base64.b64encode(booking_file.read())
29-
print(encoded_string)
30-
```
31-
32-
### Get the parsing results
33-
34-
Next, add the encoded booking confirmation to the body of a `POST` request to the endpoint
35-
36-
```bash
37-
POST https://test.api.amadeus.com/v3/travel/trip-parser
38-
```
39-
40-
```json
41-
{
42-
"payload": "your Base64 code here",
43-
"metadata": {
44-
"documentType": "PDF",
45-
"name": "BOOKING_DOCUMENT",
46-
"encoding": "BASE_64"
47-
}
48-
}
49-
```
50-
51-
- `documentType` : pdf, xml, json or jpg
52-
- `encoding` : BASE_64 or BASE_64_URL
53-
54-
This will extract all the relevant data from the booking information into a structured JSON format, just like the example below.
55-
56-
```json
57-
{
58-
"data": {
59-
"trip": {
60-
"reference": "JUPDRM",
61-
"stakeholders": [
62-
{
63-
"name": {
64-
"firstName": "MIGUEL",
65-
"lastName": "TORRES"
66-
}
67-
}
68-
],
69-
"products": [
70-
{
71-
"air": {
72-
"departure": {
73-
"localDateTime": "2021-06-16T08:36:00"
74-
},
75-
"arrival": {
76-
"localDateTime": "2021-06-17T00:00:00"
77-
},
78-
"marketing": {
79-
"flightDesignator": {
80-
"carrierCode": "CM",
81-
"flightNumber": "644"
82-
}
83-
}
84-
}
85-
},
86-
{
87-
"air": {
88-
"departure": {
89-
"localDateTime": "2021-06-16T11:21:00"
90-
},
91-
"arrival": {
92-
"localDateTime": "2021-06-17T00:00:00"
93-
},
94-
"marketing": {
95-
"flightDesignator": {
96-
"carrierCode": "CM",
97-
"flightNumber": "426"
98-
}
99-
}
100-
}
101-
},
102-
{
103-
"air": {
104-
"departure": {
105-
"localDateTime": "2021-06-20T18:56:00"
106-
},
107-
"arrival": {
108-
"localDateTime": "2021-06-21T00:00:00"
109-
},
110-
"marketing": {
111-
"flightDesignator": {
112-
"carrierCode": "CM",
113-
"flightNumber": "645"
114-
}
115-
}
116-
}
117-
}
118-
]
119-
}
120-
}
121-
}
122-
123-
```
12412

12513

12614
## Predict the trip purpose from a flight

docs/test-data.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ The table below details the available test data for each Self-Service API:
8181

8282
| **API** | **Test data** |
8383
| ----------- | ----------- |
84-
| [Trip Parser](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-parser){:target="\_blank"} | No data restrictions in test. |
8584
| [Trip Purpose Prediction](https://developers.amadeus.com/self-service/category/trip/api-doc/trip-purpose-prediction){:target="\_blank"} | No data restrictions in test. |
8685

8786
### Market insights

0 commit comments

Comments
 (0)