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 activities. List of parameters for creating the transports. The activities 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 “acitivities” see list of transport type codes |
| arrival | YES | string | City IATA code see list of IATA codes |
| departure_date | NO | string | Flight arrival date in the format "yyyy-mm-dd” |
| departure_time | NO | string | Flight arrival 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” |
| photo | NO | integer | |
| video | NO | integer | |
| price | Only when no price package is used | float | Price of your transport |
| dnd_order | NO | integer | To order transports |
| comment | NO | string | To add a comment to the transport |
Include in headers
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': Bearer YOUR_TOKEN_REFRESH' ,
}
Parameters to send the request and perform a post method
{
"my_view": "TXnmRVrt",
"transport_type": "destination",
"arrival": "MEX",
"departure_date": "2025-05-12",
"departure_time": "16:30",
"arrival_date": "2025-05-12",
"arrival_time": "16:30"
}
Response to the request
{
"id": 3795,
"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,
"is_new": true,
"edit_url": "<https://view-travel.com/allinone/edit/TXnmRVrt>",
"url_mytrip": "<https://view-travel.com/mytrip/TXnmRVrt>"
},
"arrival": {
"id": 926,
"code": "MEX",
"name": "Ciudad de Mexico",
"country": {
"id": 147,
"code": "MX",
"name": "Mexico",
"prefix_code": "52"
},
"citydescription": {
"id": 266,
"short_description": "La Ciudad de México, es una de las 32 entidades federativas de México, así como la capital de los Estados Unidos Mexicanos. Se localiza en el Valle de México, a una altitud media de 2,240 msnm. Tiene una superficie de 1,495 km, y se divide administrativamente en 16 delegaciones. Su población es de 8.9 millones de habitantes aproximadamente. Sin embargo, cuando se considera también la Zona Metropolitana del Valle de México, suma entonces una población total de más de 21 millones de habitantes, lo que la coloca en el noveno puesto de las aglomeraciones urbanas más grandes y más pobladas del mundo, y con ello la más grande del continente americano y del mundo hispanohablante."
}
},
"photo": null,
"transport_type": {
"id": 22,
"code": "destination",
"name": "Destino",
"icono": ".<i class=\\"fa-solid fa-location-dot\\"></i>",
"imagen": "<http://localhost:8000/media/transportes/destination.png>",
"icon": "<svg class=\\"h-4 w-4\\" xmlns=\\"<http://www.w3.org/2000/svg\\>" viewBox=\\"0 0 384 512\\"><path d=\\"M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z\\"/></svg>",
"icono_rojo": "<http://localhost:8000/media/transportes/rojo/destination_start.png>",
"is_old": false,
"divider": false,
"is_hidden": false,
"orden": 1,
"new_order": 1
},
"departure_date": "2025-05-12",
"arrival_date": "2025-05-12",
"departure_time": "16:30:00",
"arrival_time": "16:30:00",
"price": null,
"order": 1,
"dnd_order": 1,
"comment": null,
"is_active": true,
"name": null,
"video": null,
"supplements": [],
"slug": "none",
"user": {
"id": 615,
"first_name": "Lenin",
"last_name": "Espinoza Cueva",
"email": "[email protected]",
"username": "leninesc"
}
}