Request urls API | Method GET
[<https://content.view-travel.com/v3/api/views/>](<https://content.view-travel.com/v3/api/views/>)
List of parameters to perform filters and searches
| PARAMETERS | MANDATORY | TYPE | VALUES THAT CAN BE TAKEN | |
|---|---|---|---|---|
| search | NO | string | To search for matches in titles, subtitles, descriptions | |
| type_view | NO | string | To filter views by destination, cruise, or cruise_stay type | |
| username | NO | string | To filter views by username | |
| code | Only when you want to get the detail of the view | string | View code |
Include in headers
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': Bearer YOUR_TOKEN_REFRESH' ,
}
Only parameters to send the request
<https://content.view-travel.com/v3/api/views/?username=leninesc>
Response to the request
{
"count": 532,
"current": 1,
"page_size": 50,
"total_pages": 11,
"page_numbers": [
1,
2,
3
],
"next_page_exist": true,
"next_page_number": 2,
"back_page_exist": false,
"back_page_number": null,
"results": [
{
"code": "4855E0995075",
"title": "Viewtravel V3",
"subtitle": "Sub title of Viewtravel",
"type_view": "destination",
"thematic": {
"id": 430,
"name": "Bali Spa",
"group": {
"id": 10,
"name": "Relax"
}
},
"description": "Description your trip",
"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/4855E0995075>",
"url_mytrip": "<https://view-travel.com/mytrip/4855E0995075>"
},
.
.
.
],
}
The response shows us all the views that belong to the agency to which the user belongs.