Request urls API | Method POST
[<https://content.view-travel.com/v3/api/transports/>](<https://content.view-travel.com/v3/api/transports/>)
There are a variety of transport types. In this example, we'll take flight. List of parameters for creating the transports. The flight transport type
| PARAMETERS | MANDATORY | TYPE | VALUES THAT CAN BE TAKEN |
|---|---|---|---|
| my_view | YES | string | view code to which you want to add transports |
| transport_type | YES | string | Transport type code see list of transport type codes |
| origin | YES | string | City IATA code see list of IATA codes |
| arrival | YES | string | City IATA code see list of IATA codes |
| departure_date | NO | string | Flight departure date in the format "yyyy-mm-dd” |
| departure_time | NO | string | Flight departure time in the format "HH:MM” |
| arrival_date | NO | string | Flight arrival date in the format "yyyy-mm-dd” |
| arrival_time | NO | string | Flight arrival time in the format "HH:MM” |
| airline | NO | string | Airline id or airline code see list of airlines |
| flight_number | NO | string | Flight number |
| flight_class | NO | string | Flight class id. See list of flight class |
| photo | NO | integer | |
| video | NO | integer | |
| price | Only when no price package is used | float | Price of your transport |
Include in headers
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': Bearer YOUR_TOKEN_REFRESH' ,
}
Parameters to send the request
{
"my_view": "TXnmRVrt",
"transport_type":"flight",
"origin": "LIM",
"arrival": "BCN",
"departure_date":"2025-05-21",
"departure_time":"12:30",
"arrival_date":"2025-05-30",
"arrival_time":"15:30",
"airline":"AF",
"flight_number":"KJSK-38938",
"flight_class":1
}
Response to the request
{
"id": 3779,
"package_code": "ONE",
"title": null,
"my_view": {
"code": "TXnmRVrt",
"title": "Un view completo con fechas",
"subtitle": "",
"type_view": "destination",
"thematic": null,
"description": "",
"is_photoview": false,
"is_videoview": true,
"agency": {
"id": 8,
"name": "Viewtravel Custom"
},
"user": {
"id": 615,
"first_name": "Lenin",
"last_name": "Espinoza Cueva",
"email": "[email protected]",
"username": "leninesc"
},
"price": null,
"currency": null,
"reservation_number": null,
"ticket_issued": null,
"theme": {
"id": 1,
"name": "Viewtravel Version 3"
},
"is_active": true,
"edit_url": "<https://view-travel.com/allinone/edit/TXnmRVrt>",
"url_mytrip": "<https://view-travel.com/mytrip/TXnmRVrt>"
},
"origin": {
"id": 2540,
"code": "LIM",
"name": "Lima",
"country": {
"id": 170,
"code": "PE",
"name": "Peru",
"prefix_code": "51"
},
"citydescription": {
"id": 708,
"short_description": "Lima es la ciudad capital de la República del Perú. Se encuentra situada en la costa central del país, a orillas del océano Pacífico, conformando una extensa y populosa área urbana conocida como Lima Metropolitana, flanqueada por el desierto costero y extendida sobre los valles de los ríos Chillón, Rímac y Lurín. Según el censo peruano de 2007, Lima contaba con más de 7,6 millones de habitantes; mientras que su aglomeración urbana contaba con más de 8,5 millones de habitantes, el 30% de la población peruana, cifras que la convierten en la ciudad más poblada del país."
}
},
"arrival": {
"id": 381,
"code": "BCN",
"name": "Barcelona",
"country": {
"id": 60,
"code": "ES",
"name": "España",
"prefix_code": "34"
},
"citydescription": {
"id": 111,
"short_description": "Barcelona es una ciudad española, capital de la comunidad autónoma de Cataluña, de la comarca del Barcelonés y de la provincia homónima."
}
},
"photo": null,
"transport_type": {
"id": 6,
"code": "flight",
"name": "Vuelo",
"icono": "<i class=\\"fa fa-plane fa-lg\\" aria-hidden=\\"true\\"></i>",
"imagen": "<http://localhost:8000/media/transportes/airport.png>",
"icon": "<svg class=\\"h-4 w-4\\" xmlns=\\"<http://www.w3.org/2000/svg\\>" viewBox=\\"0 0 640 512\\">\\r\\n <path\\r\\n d=\\"M256 0c-35 0-64 59.5-64 93.7v84.6L8.1 283.4c-5 2.8-8.1 8.2-8.1 13.9v65.5c0 10.6 10.2 18.3 20.4 15.4l171.6-49 0 70.9-57.6 43.2c-4 3-6.4 7.8-6.4 12.8v42c0 7.8 6.3 14 14 14c1.3 0 2.6-.2 3.9-.5L256 480l110.1 31.5c1.3 .4 2.6 .5 3.9 .5c6 0 11.1-3.7 13.1-9C344.5 470.7 320 422.2 320 368c0-60.6 30.6-114 77.1-145.6L320 178.3V93.7C320 59.5 292 0 256 0zM640 368a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zm-76.7-43.3c6.2 6.2 6.2 16.4 0 22.6l-72 72c-6.2 6.2-16.4 6.2-22.6 0l-40-40c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0L480 385.4l60.7-60.7c6.2-6.2 16.4-6.2 22.6 0z\\" />\\r\\n</svg>",
"icono_rojo": "<http://localhost:8000/media/transportes/rojo/airport.png>",
"is_old": true,
"divider": false,
"is_hidden": false,
"orden": 1,
"new_order": 3
},
"airline": {
"id": 84,
"code": "AF",
"nombre": "Air France",
"nombre_corto": "Air France (AF)",
"website": "<https://wwws.airfrance.fr/en/contact>",
"license": false
},
"flight_number": "KJSK-38938",
"flight_class": {
"id": 1,
"code": "Y",
"nombre": "Economy ",
"aerolinea": null,
"order": 2
},
"other_value": null,
"departure_date": "2025-05-21",
"arrival_date": "2025-05-30",
"departure_time": "12:30:00",
"arrival_time": "15:30:00",
"price": null,
"order": 1,
"dnd_order": 1,
"comment": null,
"is_active": true,
"name": null,
"video": null,
"description": null,
"supplements": [],
"slug": "none",
"user": {
"id": 615,
"first_name": "Lenin",
"last_name": "Espinoza Cueva",
"email": "[email protected]",
"username": "leninesc"
}
}