Error Codes

When interacting with our API it is possible that you may encounter the following error codes in response to your requests. This list may change in future and so your integration should be built to handle additional error codes as and when they are introduced.

Where possible, the system will return helpful human-readable error messages in addition to the error codes below to indicate the nature of the problem.

Error Codes

HTTP Status Error Code Error Type Explanation

400

1001 CompletedButFailedToRespond

The operation completed but there was an error generating the response. Resubmitting a request in this case may result in a duplicate booking.

400

1002 CompletedWithErrors

The operation completed with some non-fatal errors. Please contact Stuba to confirm the status of the booking.

400

2001 InvalidRequest

The request was in an invalid format.

400

2002 MissingParameter

The request was missing a required parameter / element.

400

2003 InvalidParameterValue

The request contained a parameter / element with an illegal value.

500

4001 SystemError

General system error.

400

4002 UserError

General user error. The error message should give sufficient details of the problem to enable it to be corrected.

400

4003 BookingAccessFailed

Could not access requested booking. You may not have permission to view this booking Id.

400

4004 OperationFailed

Operation failed.

400

4005 OperationPreviouslyPerformed

OperationPreviouslyPerformed. This booking could not be cancelled. To cancel please contact the booking support team. Thanks

400

4006 QuoteDoesNotMatchBooking

The details you have provided when attempting to book do not match those on the quote. For example – the pax counts differ. The booking cannot be made in this situation.

503

4007 SiteUnavailable

This means Stuba has disabled the HAPI interface, and generally indicates the system is undergoing maintenance or is temporarily
offline. Please check with Stuba for further information.

408

4008 Timeout

Timeout: the request exceeded the time-limit for generating a response. If the request was a search, you might like to retry it with more restrictive parameters.

401

4009 TokenAuthentication

Authentication is needed and has failed or has not yet been provided.

401

4010 InvalidIP

Invalid IP address

429

4011 TooManyRequests 

The user has sent too many requests in each amount of time.

406

4012 MissingEncodingParameter

This error occurs when needed parameters are empty or missing from the request.

406

4013 InvalidEncoding 

This error occurs when the Accept-Encoding header has an invalid or unsupported value.
The accepted values are gzip and br. Any other or incorrectly formatted value will trigger this error.

401

4014 TokenInvalidOrInactive

The authentication token is invalid belongs to an inactive user.

401

4015 TokenExpired

The authentication token provided has expired.

400

6007 PriceChargeableDisagree

The price in the booking request doesn’t match the system price.

400

6008 BookingPermissionDenied

You don’t have permission to make this booking.

410

7001 QuotePriceChanged

The quoted price has changed since it was generated.

410

7002 QuoteAccessDenied

Could not access requested quote. Either you do not have permission, or the quote Id was incorrect.

410

7002 QuoteAccessFailed

Unable to retrieve or access the quote information. 

410

7003 QuoteNotAvailable

The specified quote is no longer available.

XML Response Samples

Samples

Copy
{ "Nationality": "GB", "Timeout": 30, "HotelIds": [ {{HotelId}} ], "ArrivalDate": "{{arrivaldate}}", "Nights": 2, "Rooms": [] }
{ "Code": 2001, "Description": "InvalidRequest: Paxes/Room Count required." }
Copy
{ "Nationality": "GB", "Timeout":30, "HotelIds": [{{HotelId}}], "ArrivalDate": "{{arrivaldate}}", "Nights": 2, "Rooms": [ { "Adult": 2, "Child": [ { "Age": 19 } ] } ] }
{ "Code": 4002, "Description": "UserError: Child ages must be 18 or less! [6609987/4/17615]" }
Copy
{ "BookingId": "910000029" }
{ "Code": 4005, "Description": "OperationPreviouslyPerformed: This booking is already cancelled [6609987/1/17605]" }
Copy
{ "QuoteId": "1090225991-5" }
{ "Code": 7002, "Description": "QuoteAccessDenied: No items found for the quote. This may have been caused by an invalid QuoteId. [6609987/2/17612]" }
Copy
{ "Nationality": "GB", "Timeout":30, "HotelIds": [{{HotelId}}], "ArrivalDate": "{{arrivaldate}}", "Nights": 2, "Rooms": [ { "Adult": 2, "Child": [ { "Age": 7 } ] }, { "Adult": 2, "Child": [ { "Age": 9 } ] } ] }
{ "Code": 4009, "Description": "TokenAuthentication: Authentication failed. Please verify your credentials and try again." }