VALIDATION_ERROR
What Does a "VALIDATION_ERROR" Mean?
A "VALIDATION_ERROR" occurs when the validation information provided in your Hotel-X request does not match the information set for your account or is invalid for that specific request.
What Can I Do If I Receive a "VALIDATION_ERROR"?
Since this error indicates a discrepancy or issue with the validation process, check the following:
- Verify Access Status
- Check My Connections to ensure the access set in your request has been configured for your account (status "working") and is active. If inactive, activate it before running requests via our platform.
- Verify Access Type (Test/Live)
- Ensure that the "testMode" tag in your request matches the Test/Live settings for that specific access.
- Verify Client
- The client specified in your request must be active and configured for your account. If you’ve set custom permissions for a client (e.g., limited access to specific accesses), ensure the client used in your request aligns with those permissions. Otherwise, update either your request or the client configuration accordingly. More details on Hotel-X Clients can be found here.
- Verify Supplier
- The supplier specified in your request must be active and configured for your account. You can review this information in the My Connections section.
- Verify API Key
- Ensure the API key in your request matches the one configured for your account. You can find more information on your API settings here.
- Verify User
- Ensure the user making the request has the necessary permissions. For instance, a Viewer user cannot make reservations via the B2B Virtual Agency since Viewers only have permissions for searches and quotes. More details on user roles can be found here.
- Verify Context
- The context code in your request should match the expected mapping:
- Single Mode request: Use the Supplier context (available in My Connections) or your own Client context (uploaded mapping to SFTP).
- Multi-mode request: Use your own Client context.
- The context code in your request should match the expected mapping:
- Verify Criteria
- Ensure your request criteria are valid. For example, avoid using check-in or check-out dates in the past, and ensure you're using the correct
optionRefIdfor each method. Also, ensure compliance with the supplier's specifications as outlined in their Metadata.
- Ensure your request criteria are valid. For example, avoid using check-in or check-out dates in the past, and ensure you're using the correct
- Verify Settings
- Check that your request settings don't exceed the limits allowed for that method. For instance, ensure that the
optionsQuotavalue in the request (or in default settings) is lower than the maximum allowed.
- Check that your request settings don't exceed the limits allowed for that method. For instance, ensure that the
VALIDATION_ERROR Examples
1. Incorrect Hotel-X Credentials (e.g., Access, Client, API Key)
- "ACCESS_ERROR"; "VALIDATION_ERROR"
{
"data": {
"hotelX": {
"search": {
"auditData": {
"transactions": []
},
"context": "xxxx",
"options": null,
"errors": [
{
"code": "ACCESS_ERROR",
"type": "VALIDATION_ERROR",
"description": "No valid accesses found"
}
],
"warnings": null
}
}
}
}
{
"data" : {
"hotelX" : {
"search" : {
"auditData" : null,
"context" : "xxx",
"options" : null,
"errors" : [
{
"code" : "ACCESS_ERROR",
"type" : "VALIDATION_ERROR",
"description" : "this group does not have execution permission over src"
}
],
"warnings" : null
}
}
}
}
2. Too Many Options to Return (Quota Exceeded)
- "QUOTA_EXCEEDED"; "VALIDATION_ERROR" (more information about OptionsQuota here)
{
"data": {
"hotelX": {
"search": {
"auditData": null,
"context": "xxx",
"options": null,
"errors": [
{
"code": "QUOTA_EXCEEDED",
"type": "VALIDATION_ERROR",
"description": "Too many options to return"
}
],
"warnings": null
}
}
}
}
3. Incorrect Criteria
- "WRONG_FIELD"; "VALIDATION_ERROR"
{
"data": {
"hotelX": {
"search": {
"auditData": null,
"context": "xxx",
"options": null,
"errors": [
{
"code": "WRONG_FIELD",
"type": "VALIDATION_ERROR",
"description": "Check-in date must be from now on"
}
],
"warnings": null
}
}
}
}
"errors": [
{
"code": "WRONG_FIELD",
"type": "VALIDATION_ERROR",
"description": "invalid optionRefIdserialized string cannot be nil or empty"
}
]
"errors": [
{
"code": "WRONG_FIELD",
"description": "invalid optionRefIdOptionId from search found, quote OptionId expected",
"type": "VALIDATION_ERROR"
}
]
{
"warnings": [
{
"code": "WRONG_FIELD",
"type": "VALIDATION_ERROR",
"description": "Access: 'xxx' Maximum optionsQuota allowed(200) has been exceeded, you are sending 300"
}
]
}
tip
If you continue experiencing this error after reviewing the above information, contact our Customer Support team. We are here to help! 🚀