Guestfolio API Documentation
« back to overviewResponseSets [1.1]
Methods for viewing guest survey response set information
index
Get the list of all response sets for a hotel's survey optionally filtered by dates between check in from and to (these values default to show the last month of records)
URL
GET /api/hotels/:id/surveys/:id/response-setsOptional Parameters
-
page
String
Page number requested
-
per_page
String
Results to be shown per page
-
search
Hash
- Date
-
from_check_in
- Date
-
to_check_in
- Integer
-
from_score
- Integer
-
to_score
- DateTime
-
from_completed_at
- DateTime
-
to_completed_at
- String
-
rate_code
Response Object
-
Array of response set details
Examples
(Optional)
"search": [
"from_check_in": "2012-12-01T08:00:00-08:00",
"to_check_in": "2012-12-02T08:00:00-08:00",
"from_score": 80
]
Response
{
"total_count": 3,
"total_pages": 3,
"response_sets": [
{
"id": 1,
"survey_id": 1,
"reservation_id": 1
"score": 90,
"started_at": "2013-01-05T15:19:05-08:00",
"completed_at": "2013-01-025T15:19:11-08:00",
"_links": {
"self": {
"href": "https://guestfolio.net/api/hotels/1/surveys/1/response-sets/1"
},
"reservation": {
"href": "https://guestfolio.net/api/hotels/1/reservation/1"
},
"survey": {
"href": "https://guestfolio.net/api/hotels/1/surveys/1"
}
}
},
{
"id": 2,
"survey_id": 1,
"reservation_id": 2
"score": 75,
"started_at": "2013-01-05T16:48:05-08:00",
"completed_at": "2013-01-025T16:49:11-08:00",
"_links": {
"self": {
"href": "https://guestfolio.net/api/hotels/1/surveys/1/response-sets/2"
},
"reservation": {
"href": "https://guestfolio.net/api/hotels/1/reservation/2"
},
"survey": {
"href": "https://guestfolio.net/api/hotels/1/surveys/1"
}
}
],
"_links": {
"self": {
"href": "https://guestfolio.net/api/hotels/1/surveys/1/response-sets?page=2"
}
"previous": {
"href": "https://guestfolio.net/api/hotels/1/surveys/1/response-sets?page=1"
}
"next": {
"href": "https://guestfolio.net/api/hotels/1/surveys/1/response-sets?page=3"
}
}
}
The response sets array includes a hash of basic response set information and links to additional associated permitted API resources
show
Get a specific response set details
URL
GET /api/hotels/:id/surveys/:id/response-sets/:idResponse Object
-
The response set details
Examples
{
"id": 1,
"survey_id": 1,
"reservation_id": 2,
"score": 90,
"started_at": "2013-01-05T15:19:05-08:00",
"completed_at": "2013-01-025T15:19:11-08:00",
"responses": [
{
"question": { text: "Would you consider staying with us again?", max_weight: 1 },
"answer": { text: "Yes", weight: 1 }
},
{
"question": { text: "Did our check in staff make you feel welcome?" },
"answer": { text: "Yes" }
}
],
"_links": {
"self": {
"href": "https://guestfolio.net/api/hotels/1/surveys/1/response-sets/1"
},
"reservation": {
"href": "https://guestfolio.net/api/hotels/1/reservations/1"
},
"survey": {
"href": "https://guestfolio.net/api/hotels/1/surveys/1"
}
}
}
The response set hash includes full response set information, individual responses with each question and answer and links to additional associated permitted API resources