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 price. List of parameters for creating the transports. The price 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 “price” see list of transport type codes |
| description | NO | string | Add the included or not included services. This information will appear in the budget |
| package | NO | object | It is automatically generated when adding a “price” type transport. You can modify it from packages. |
| dnd_order | NO | integer | This card (transport type price) must always be at the end of each package.) |
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":"price",
"description": "Add the included or not included services. This information will appear in the budget",
}
Response to the request
{
"id": 3805,
"package_code": "FIVE",
"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>"
},
"transport_type": {
"id": 26,
"code": "price",
"name": "Precios",
"icono": ".",
"imagen": null,
"icon": "<svg class=\\"w-4 h-4\\" xmlns=\\"<http://www.w3.org/2000/svg\\>" viewBox=\\"0 0 320 512\\"><!--!Font Awesome Free 6.7.1 by @fontawesome - <https://fontawesome.com> License - <https://fontawesome.com/license/free> Copyright 2024 Fonticons, Inc.--><path d=\\"M160 0c17.7 0 32 14.3 32 32l0 35.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11l0 33.4c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-34.9c-.4-.1-.9-.1-1.3-.2l-.2 0s0 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7s0 0 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11L128 32c0-17.7 14.3-32 32-32z\\"/></svg>",
"icono_rojo": null,
"is_old": false,
"divider": false,
"is_hidden": false,
"orden": 25,
"new_order": 21
},
"order": 1,
"dnd_order": 1,
"is_active": true,
"description": "Add the included or not included services. This information will appear in the budget",
"package": {
"id": 270,
"transport": 3805,
"name": "PRICE FIVE",
"expiration_date": null,
"payment_link": "",
"price_total": "0.00",
"rate": "0.00",
"discount": "0.00",
"final_price": "0.00",
"comment": null,
"order": 5,
"currency": null,
"is_accepted": false
},
"slug": "3805",
"user": {
"id": 615,
"first_name": "Lenin",
"last_name": "Espinoza Cueva",
"email": "[email protected]",
"username": "leninesc"
}
}
Note: Any transport type above the "price" price is considered part of the package. You can add up to 10 "price" transport types in one view.