This document outlines the upcoming changes to the Survey API as part of our migration to the CXP platform.
Endpoint Migration Summary
| Endpoint | Request changes | Response changes | Notes |
| GET /api/hotels/reviews | profile_id and visit_id query arguments not supported |
Different id for questions
|
Returns reviews based on request args |
|
|
No changes |
Different id for all question mappings category_questions is merged into custom_questions |
Returns mappings for questions (uuid to human readable string) |
|
|
No changes | Different id for opt_out_id | Returns guest emails which unsubscribed from survey invites |
| GET /api/mailing/integration |
survey_type query argument is now mandatory:
|
Survey url to be shared with guest | Link builder for survey invites with guest data |
General requirement for usage:
- API user must have an Survey in the migration to CXP system
Migration Details
/api/hotels/reviews
Migration Approach: Proxy to CXP with new database storage
- Unsupported query args
- profile_id
- visit_id
- Question ids are different from the previous TrustYou version
- The response schema remains unchanged.
Example:
{
"meta": {
"code": "200",
"status": "Success"
},
"response": {
"count": 23,
"limit": 100,
"offset": 0,
"reviews": [
{
"hotel_id": "fa54298e-5892-425d-84e7-6650d4dc36f3",
"review_id": "26462ca5-5226-409b-a645-d5c6e0dbb1af",
"profile_id": "21345675",
"visit_id": "visit-67890",
"creation_time": "2025-07-29T07:14:44+00:00",
"overall_score": 4.0,
"review_title": "",
"review_text": "",
"detected_language": "en",
"guest_type": null,
"guest_age": null,
"guest_nationality": null,
"hotel_recommendation": null,
"visit_month": "2025-07",
"net_promoter_score": null,
"guest_name": "john",
"guest_email": "john.doe@trustyou.com",
"privacy_level": "public",
"custom_questions": {
"04ed8ade-0491-5f07-80a1-236b613ee3bc": null,
"0f1ab491-9c95-568f-b717-3a716c603734": null,
"10c7deea-bc78-56fd-a359-b917c4235d40": 5,
"235b0545-de1e-5322-945c-3d6f8b5afd77": null,
"24fd9854-6628-597b-ab80-93d09348d56a": 4.5,
"493d925e-c039-5ca4-b407-0b8a0002cfd0": null,
"507420a2-a71f-58d6-8e32-32e2522266a2": 1,
"5b75a4b1-6acc-5340-adad-087175d5cb7c": null,
"5ce665be-34f3-5ac8-a7e0-07ff2582539d": null,
"7136161a-3906-5d03-9ead-92d75bb99178": null,
"787774fb-9b9f-5191-a6d0-92d637ea9346": null,
"7a2ef7f4-a24f-58ac-8f66-5a94fa4b0ede": null,
"81ab1094-99e0-53bd-844f-efc78f15c812": 2.5,
"88da1d16-85d9-5e13-84ba-38155bffdc72": null,
"88f4b146-d00c-5553-ade6-a256a705f2db": null,
"89a3a2d1-3e01-540e-a88a-a22e076f751d": null,
"8a482f80-f4c0-50ad-973f-851560301eda": "test fav part",
"8e96a7d7-e7ec-5e70-a342-fc0c04effe63": null,
"9f911276-b68e-5adf-9caf-f6c54da9db7b": null,
"aa786433-70f7-5e1c-8354-2bd16cb3e2cb": null,
"aed2ab87-49ce-5ae3-bbdb-5980c7c506b7": null,
"b1d0d943-f02f-5694-85be-bfdcfe969f48": 3.5,
"b26bbf57-ce50-56ef-84cd-265ac185cf79": true,
"c60dfa10-74d2-5900-a5cb-1f2e846383be": null,
"c9859f58-f790-5296-bed0-9a4186523df0": true,
"d56ede61-9333-5136-a01a-a8264da9e071": null,
"fad6a7c1-067c-5093-8c1c-0a232835e386": null,
"fcdb8926-ed26-58de-90bc-e897337a49cb": null
},
"guest_language": "en",
"guest_arrival_date": "2025-07-10",
"guest_departure_date": "2025-07-25",
"guest_first_name": "John",
"guest_last_name": "Doe",
"category_scores": [],
"management_response": {
"public": null,
"private": null
},
"salutation": null,
"rate_code": null,
"reservation_id": "visit-67890",
"room_number": "101",
"market_code": null,
"nationality": null,
"source_code": null,
"hotel_name": null,
"country": null,
"room_type": null
},
… more reviews…
]
}
}
Action Required:
- Reset any stored data locally as the question ids will be different from the previous TrustYou version
/api/hotels/mapping
Migration Approach: Proxy to CXP with new database storage
- Question ids are different from the previous TrustYou version
- category_questions is merged into custom_questions
- The response schema remains unchanged.
Example:
{
"meta": {
"code": 200,
"status": "Success"
},
"response": {
"basic_questions": {
"score": "Your overall score",
"review": "Your review",
"title": "Title"
},
"category_questions": {},
"custom_questions": {
"04ed8ade-0491-5f07-80a1-236b613ee3bc": "Do you have any additional comments?",
"0f1ab491-9c95-568f-b717-3a716c603734": "Tiles have the right amount of information.",
"10c7deea-bc78-56fd-a359-b917c4235d40": "Overall look and feel of the new layout?",
"15cf2c72-306d-536b-80c0-d65f7af39450": "Name",
"235b0545-de1e-5322-945c-3d6f8b5afd77": "The portfolio and/or comparison reflects progressive, leading edge design.",
"24fd9854-6628-597b-ab80-93d09348d56a": "Overall layout and organization",
"493d925e-c039-5ca4-b407-0b8a0002cfd0": "Typography (lettering, headings, titles) is attractive.",
"507420a2-a71f-58d6-8e32-32e2522266a2": "Ease of use",
"5b75a4b1-6acc-5340-adad-087175d5cb7c": "List what screens were confusing and why?",
"5ce665be-34f3-5ac8-a7e0-07ff2582539d": "Ease of use",
"7136161a-3906-5d03-9ead-92d75bb99178": "Filtering options are intuitive.",
"787774fb-9b9f-5191-a6d0-92d637ea9346": "Do you have any additional comments?",
"7a2ef7f4-a24f-58ac-8f66-5a94fa4b0ede": "Is there anything you feel is missing?",
"81ab1094-99e0-53bd-844f-efc78f15c812": "Able to complete tasks as requested.",
"88da1d16-85d9-5e13-84ba-38155bffdc72": "Will the new functionalities and design increase your usage?",
"88f4b146-d00c-5553-ade6-a256a705f2db": "I can get to information quickly.",
"89a3a2d1-3e01-540e-a88a-a22e076f751d": "What would you change? What needs improvement?",
"8a482f80-f4c0-50ad-973f-851560301eda": "What were your favorite parts and why?",
"8e96a7d7-e7ec-5e70-a342-fc0c04effe63": "Are the namings and labelings of the tiles clear?",
"9f911276-b68e-5adf-9caf-f6c54da9db7b": "It is easy to remember where to find things.",
"aa786433-70f7-5e1c-8354-2bd16cb3e2cb": "Is the review inbox inviting to use?",
"aed2ab87-49ce-5ae3-bbdb-5980c7c506b7": "Overall look and feel of the new layout?",
"b1d0d943-f02f-5694-85be-bfdcfe969f48": "Colors used throughout the site are attractive.",
"b26bbf57-ce50-56ef-84cd-265ac185cf79": "Yes, I have read the <a data-test-selector=\"privacy-link\" href=\"https://analytics.trustyou.com/surveys/static/guest-privacy-policy-en.pdf\" target=\"_blank\">Data Privacy Information</a>",
"b8ae4ff1-d161-5fee-ac94-5b967b24d062": "Email",
"c60dfa10-74d2-5900-a5cb-1f2e846383be": "How often do you use the reviews tab?",
"c9859f58-f790-5296-bed0-9a4186523df0": "Yes, I have read and agree with the <a data-test-selector=\"tc-link\" href=\"https://analytics.trustyou.com/surveys/static/guest-terms-of-use-en.pdf\" target=\"_blank\">Terms and Conditions</a>",
"d56ede61-9333-5136-a01a-a8264da9e071": "Is the new layout inviting to use?",
"fad6a7c1-067c-5093-8c1c-0a232835e386": "Able to navigate through the site?",
"fcdb8926-ed26-58de-90bc-e897337a49cb": "I can get to information quickly.",
"88641fbc-c869-5b56-9081-7e82b7384c4c": "Email"
}
}
}
Action Required:
- Reset any stored data locally as all question_ids will be different from the previous TrustYou version
/api/hotels/opt_outs
Migration Approach: Proxy to CXP with new database storage
- opt_out_id will be different from the previous TrustYou version
- The response schema remains unchanged.
Example:
{
"meta": {
"code": 200,
"status": "Success"
},
"response": {
"count": 3,
"limit": 1000,
"offset": 0,
"optouts": [
{
"cluster_id": "fa54298e-5892-425d-84e7-6650d4dc36f3",
"profile_id": null,
"visit_id": null,
"opt_out_id": "6bed8aef-a59a-5b31-ac8a-cc2f6c78c6e4",
"opt_out_time": "2024-11-01T12:20:37"
},
{
"cluster_id": "fa54298e-5892-425d-84e7-6650d4dc36f3",
"profile_id": null,
"visit_id": null,
"opt_out_id": "b1bebac9-3106-5935-aff5-b65faae689df",
"opt_out_time": "2024-10-31T18:02:21"
},
{
"cluster_id": "fa54298e-5892-425d-84e7-6650d4dc36f3",
"profile_id": null,
"visit_id": null,
"opt_out_id": "64af667f-4f28-52ec-b538-3aea1ea89177",
"opt_out_time": "2024-11-05T12:42:50"
}
]
}
}
Action Required:
- Reset any stored data locally as all opt_out_id will be different from the previous TrustYou version
/api/mailing/integration
Migration Approach: Proxy to CXP with new database storage
- The response schema remains unchanged.
- survey_type becomes mandatory query argument (explicitly state the type of survey to be used)
- Pre-populated answers for questions are not supported
Before:
GET /api/mailing/integration?api_key=<api-key>&data=<guest-encrypted-data-with-hotel-id>
After:
GET /api/mailing/integration?api_key=<api-key>&data=<guest-encrypted-data-with-hotel-id>&survey_type=<survey-type>
Example:
{"url":"https://feedback.cxp.trustyou.com/survey/e2f61860-17c1-4793-bdf0-89e544b5f7bd/fa54298e-5892-425d-84e7-6650d4dc36f3/f19a649f-1bda-5314-b3a2-111d952d51bb?outbound_id=81590f74-48f4-5311-ac41-1f139ec3aec1"}
Action Required:
- Update the request to specify the survey_type in case it’s not set
-
Ask TY to assist in configuring guest_data datapoints, in case there are custom datapoints not covered by the predefined ones
-
Each organization in CXP includes a default set of predefined data points:
- Any additional datapoint in guest data, provide TY with the following
- Used key in API
- Type of data (number, date, text, etc)
- Which question should use it as input
- Any additional datapoint in guest data, provide TY with the following
-
Each organization in CXP includes a default set of predefined data points:
Support
If you have any questions or concerns during this transition:
- Email: cxp-support@trustyou.com