When your Surveys move from Classic, our previous platform, to CXP, the Survey API keeps the same endpoints and the same response format. Some things work differently, though: IDs, time zones, paging, and a few fields. This guide lists every difference and tells you what to check in your integration.
What Changed in This Update (November 2026)
We reviewed this guide against how the Survey API behaves today. If you already followed an earlier version, check these points:
- Dates and times are in UTC on CXP (Berlin time on Classic). New section: Dates and Time Zones.
- Choice answers return the option's internal id, not its position in the list.
- The reviews page size is capped at 200, without an error. New section on paging.
- Request one page and one hotel at a time, and wait and retry if you get HTTP 429 or 503.
-
departure_dateis now required in survey links. Links without it don't open the survey. -
Prefilled overall score is supported with
bq[score]. Earlier versions said no prefilled answers were supported. -
survey_typeis optional. If you don't send it, we use the post stay survey. -
reservation_idreturns your PMS reservation number where we have it (since July 2026). -
Opt out
to_dateworks differently on CXP: the named day isn't included. -
creation_timehas no time zone suffix. The previous example showed+00:00by mistake.
Your Migration Checklist
- Reset stored question ids and opt out ids. They're all new on CXP.
- Treat all times as UTC and adjust any reporting by day. See Dates and Time Zones.
- Fix your paging loop so it moves forward by the number of reviews you received. See Get a List of Reviews.
- Ask support for your option list if you turn choice answers into labels.
-
Read the recommend answer from
custom_questions.hotel_recommendationis alwaysnull. -
Remove
profile_idandvisit_idfilters from your reviews requests. -
Add
departure_dateto every survey link, and sendsurvey_typefor any survey other than post stay. -
Refetch and overwrite the reviews you store on a schedule. See Keep Your Stored Copy Up to Date.
Endpoints at a Glance
Base URL for all calls: https://analytics.trustyou.com/surveys/
| Endpoint | What's different on CXP | Action required |
|---|---|---|
GET /api/hotels/reviews |
New question ids. Times in UTC. profile_id and visit_id aren't filters. hotel_recommendation answer moves to custom_questions. |
Yes |
GET /api/hotels/mapping |
New question ids. category_questions is empty; category questions are in custom_questions. |
Yes |
GET /api/hotels/opt_outs |
New opt out ids. Times in UTC. to_date doesn't include the named day. |
Yes |
GET /api/mailing/integration |
departure_date required. Only bq[score] can be prefilled. The guest's browser picks the survey language. |
Yes, if you build survey links |
You'll find the full OpenAPI specification for reading reviews and opt outs and for building survey links. If the specification and this guide differ, follow this guide.
Dates and Time Zones
| Platform | Time zone of dates and times | Opt outs: is the to_date day included? |
|---|---|---|
| CXP | UTC (the same as London time in winter) | No |
| Classic | Berlin time: one hour ahead of UTC in winter, two hours ahead in summer | Yes |
Example: A guest in Paris submits a review at 00:30 on August 10. On CXP, creation_time is 2026-08-09T22:30:00, so the review falls on August 9. On Classic, it was 2026-08-10T00:30:00.
To report by the hotel's local day:
- Request one extra day before and after the period. For opt outs, add one more day at the end.
- Convert each time to the hotel's local time.
- Group the results by local day.
Note: Times are text in ISO 8601 format with no time zone suffix (for example 2026-06-19T19:39:00). Read them as UTC on CXP. from_date and to_date use the same time zone, in the format YYYY-MM-DD. Adding a time or a time zone returns an error.
Get a List of Reviews (/api/hotels/reviews)
Filters. Use hotel_id, from_date, to_date, survey_types, and lang. profile_id and visit_id aren't filters for reviews. Both still come back as fields in each review.
-
to_dateincludes the whole day you name.to_date=2026-08-10includes reviews created on August 10. -
langmatches the language the survey form was shown in, not the language of the review text. Values are case sensitive (en, notEN). An unknown value is ignored and you get unfiltered results, without an error. Accepted values:ar bg cs da de el en es fi fr he hr hu id in it iw ja ko ms nl pl pt pt-BR ro ru se sk sl sr sv th tr vi yue zh zht. -
survey_typestakes one or more values separated by commas, no spaces:hotel_post_stay,hotel_on_site,hotel_pre_stay,wellness_and_spa,attraction,restaurant,ess. An unknown value returns an error.
Paging. limit defaults to 100 and the maximum is 200. If you ask for more, you get 200 and no warning.
- Move
offsetforward by the number of reviews you actually received. If you ask for 1,000, receive 200, and jump ahead by 1,000, you'll miss 80% of your reviews. - Stop when
offsetreachescount, or when a page comes back empty. A page past the end returns an empty list, not an error. - For regular syncs, use
from_dateto fetch only what's new since your last run. - Request one page at a time, and wait for each response before you ask for the next one. Parallel requests for the same hotel don't get you results faster, and they can make requests fail.
- If you sync several hotels, go through them one after another.
- If a request fails with HTTP 429 or 503, wait and try again. See Responses and Errors.
Reviews come back newest first.
Fields that work differently on CXP:
-
Question ids in
custom_questionsare new. Reset any ids you stored from Classic, and use/api/hotels/mappingto match ids to question texts. -
hotel_recommendationis alwaysnull. If your survey asks whether the guest would recommend the hotel, the answer is incustom_questionsastrueorfalse. -
visit_monthis the month the review was created, asYYYY-MM. -
reservation_idreturns your own PMS reservation number where we have it, and thevisit_idfrom your visit data where we don't (since July 2026). If you match reviews to bookings with this field, check that your logic still works. -
detected_languageis usually empty on your first fetch. We add it every three hours, for up to 30 days after the review is created. -
overall_scoreis a decimal from 0 to 5, converted from the survey's own scale and rounded down to the nearest 0.5. -
category_scoreswith a score of0.0means the guest didn't rate that category (they only left a comment, or marked it not applicable). It doesn't mean a score of zero.
Choice answers. Dropdown, radio, checkbox, and button questions return an array with the internal id of each chosen option. The id isn't the option's position in the list. Ids can start at 0 or 1, don't always follow the order shown in the survey, and can be text (for example ["Female"]), so accept both numbers and text.
| Question | How ids are numbered |
|---|---|
| Created in the survey editor | First option is 1; each new option gets the highest id + 1 |
| Migrated from Classic | 0, 1, 2, and so on, in the original order |
| Standard age group and gender identity questions | Start at 0 |
| Age and gender questions migrated from Classic | Text ids, for example "Female" or "18 to 24" |
| Single choice questions, on accounts with prefilled answers enabled | Ids can be set by hand in the survey editor |
Ids stay the same when you reorder options. To turn ids into option labels, ask our support team for your account's option list (the mapping endpoint doesn't return options yet). Ask again whenever you add or change options.
Example response (shortened):
{
"meta": { "code": "200" },
"response": {
"count": 100,
"limit": 50,
"offset": 0,
"reviews": [
{
"hotel_id": "1a96f32e-a89c-463b-8327-5bde9312f2c3",
"review_id": "98ee300c-a193-4321-89b1-7f1b12f14c8a",
"profile_id": "ABC",
"visit_id": "ABC1",
"creation_time": "2026-06-19T19:39:00",
"overall_score": 4.5,
"review_title": "Great stay",
"review_text": "Friendly staff and a quiet room.",
"detected_language": "en",
"hotel_recommendation": null,
"visit_month": "2026-06",
"net_promoter_score": 9.0,
"guest_language": "en",
"guest_arrival_date": "2026-06-15",
"guest_departure_date": "2026-06-18",
"guest_first_name": "John",
"guest_last_name": "Doe",
"guest_email": "john.doe@example.com",
"privacy_level": "public",
"custom_questions": {
"dffd704f-d4f9-458a-8168-55cc39358e3d": 4.0,
"af2c87b5-e315-4f58-b589-eb163c49b7d3": [3],
"06ca32f0-694d-447b-b260-91bf39429d3b": ["Spa", "Restaurant"],
"81201bec-590d-45d2-a957-dc76db65d1a3": null
},
"category_scores": [
{ "category": "244", "text": "Very clean", "score": 4.0 },
{ "category": "15", "text": "Check in was slow", "score": 0.0 }
],
"management_response": { "public": null, "private": null },
"rate_code": "BAR",
"reservation_id": "PMS-458812",
"room_number": "101"
}
]
}
}Note: Extended visit data fields (like rate_code or room_number) depend on what's set up for your account. Read whatever fields arrive instead of expecting a fixed list.
Get the Question Mapping (/api/hotels/mapping)
- All question ids are new. Reset any mappings you stored from Classic.
-
category_questionsis always an empty object. Category questions are now incustom_questions, which can also include contact fields and section headings. - The mapping returns question texts only, not answer options. Questions removed from a survey aren't included.
{
"meta": { "code": 200 },
"response": {
"basic_questions": {
"score": "Your overall score",
"title": "Title",
"review": "Your review"
},
"category_questions": {},
"custom_questions": {
"5b75a4b1-6acc-5340-adad-087175d5cb7c": "Room",
"dffd704f-d4f9-458a-8168-55cc39358e3d": "Custom question a"
}
}
}
Get Opt Out Decisions (/api/hotels/opt_outs)
-
All
opt_out_idvalues are new. Reset any ids you stored from Classic. -
to_datedoesn't include the named day on CXP. To include August 10, sendto_date=2026-08-11. -
The order of results isn't guaranteed. Use
opt_out_idto remove duplicates between pages. -
limitdefaults to 10,000, which is also the maximum. A larger value returns an error. - You can filter by
profile_idorvisit_idhere.
{
"meta": { "code": 200 },
"response": {
"count": 1,
"limit": 10000,
"offset": 0,
"optouts": [
{
"cluster_id": "1a96f32e-a89c-463b-8327-5bde9312f2c3",
"profile_id": "ABC",
"visit_id": "ABC1",
"opt_out_id": "98ee300c-a193-4321-89b1-7f1b12f14c8a",
"opt_out_time": "2024-11-01T12:20:37"
}
]
}
}
Build Survey Links (/api/mailing/integration)
Use this endpoint if your own system (a CRM, for example) sends survey invitations instead of TrustYou.
-
departure_dateis required in the encrypteddataparameter, asYYYY-MM-DD. If it's missing, the survey doesn't open. -
survey_typeis optional for post stay surveys. If you don't send it, we usehotel_post_stay. For any other survey type, you must send it, and the hotel needs a survey of that type. Otherwise the guest sees an error. -
Only
bq[score]can be prefilled. Add it to open the survey with the overall score already selected, on the survey's own scale (for example 1 to 5). Otherbq[...]values are ignored. -
The guest's browser picks the survey language. The survey opens in the browser language if it's available, otherwise in the survey's default language. The
langvalue is saved with the guest's data and returned asguest_language, but it doesn't change the survey language. Read more about how we choose the survey language.
Before:
GET /api/mailing/integration?api_key=<api-key>&data=<encrypted-guest-data>
After (for a survey type other than post stay):
GET /api/mailing/integration?api_key=<api-key>&data=<encrypted-guest-data>&survey_type=hotel_on_site
When the link is valid, the guest goes straight to their personalized survey (HTTP 302 redirect). Test every new link template with a test hotel before you send it to guests.
Extended data points. If you send guest data beyond the standard fields, ask us to set those data points up for your Organization. Data points that aren't set up are ignored. Send us:
- The key you use in the API
- The type of data (number, date, text, and so on)
- Which question should use it as input
Note: Our earlier Python code sample used Python 2 and no longer runs. Contact our support team for current samples in Java, Python 3, and JavaScript.
Keep Your Stored Copy Up to Date
If you store reviews on your own systems, adding new reviews isn't enough. Reviews can change after you first fetch them:
- We add
detected_languagelater. - A management response can be added at any time.
- Personal data can be erased. The review either disappears, or stays with the same
review_idand empty personal details. There's no flag or notification.
We recommend refetching all reviews from the last 31 days every day, and checking your full history every week or month. Overwrite every field, and remove reviews that no longer come back. Your process needs to do both. Otherwise you may keep personal data we were legally required to erase.
Responses and Errors
- Every response has a
metaobject. The reviews endpoint returnsmeta.codeas text ("200"); mapping and opt outs return a number (200). Accept both. - Invalid parameters, like an unknown
survey_typesvalue or a date with a time zone, return HTTP 400. - An unknown
api_keyreturns HTTP 401. -
HTTP 429 (too many requests) and 503 (temporarily unavailable) mean the service is busy, not that your request is wrong. Send the same request again, waiting longer after each failure (for example 10 seconds, then 30, then 60). If the response has a
Retry-Afterheader, wait at least that many seconds. Stop after a few attempts and try again on your next scheduled run. - HTTP 500, 502, and 504 can also be temporary. Retry them the same way, and contact us if they keep happening.
- A successful response with
count: 0means no reviews matched. It doesn't confirm the survey type exists for that property. If you keep getting 0 results where you expect data, contact us.
Need Help?
Questions about your migration? Email us at cxp-support@trustyou.com.