Skip to main content

HTTP Errors

Our API follows a predictable HTTP error code format:
  • 400 - Bad Request: The request cannot be processed
  • 401 - Unauthorized: The API key token is missing, invalid, or expired.
  • 403 - Forbidden: The API key token cannot access the specified resource.
  • 404 - Not Found: The request resource cannot be found.
  • 500 - Internal Server Error: Failure to process the request.

Error Structure

Errors are always returned in JSON format. Each error includes a code and a message, indicating the general reason for the error, as well as a type to categorize the issue. Additionally, a details array provides more specific information about the error condition. For example:
{
    "code": 2001,
    "details": [
        {
            "message": "check_in_date is not less than check_out_date. Please check reservation dates."
        }
    ],
    "message": "Unable to process your request. Missing or invalid request parameters.",
    "request_id": "9a15bee6-43c7-40b1-8b52-dd28daf9134b",
    "type": "VALIDATION"
}

Detailed Error Codes List

Application Error

CodeHTTP StatusMessageCorrective Action
1002500 Internal Server ErrorUnable to process the payment.Retry the request. If the problem persists, contact Selfbook support.
1004400 Bad RequestRate validation failureRefresh the rate by re-running rate verification before submitting the reservation.
1005400 Bad RequestRate validation failureEnsure rate.price.base_price, total_taxes, and total_price in the create request match the values returned by rate verification.
1006500 Internal Server ErrorAn internal error has occurred.Retry the request. If the error persists, contact Selfbook support.

Validation

CodeHTTP StatusMessageCorrective Action
2001400 Bad RequestUnable to process your request. Missing or invalid request parameters.Review the details array in the response for the specific field(s) that failed validation and correct them before retrying.
2002400 Bad RequestUnable to process the payment.Re-tokenize the guest payment method and retry with new token.
2003400 Bad RequestUnable to make requested modification.Check the modification rules for this reservation (e.g. rate policy, check-in window) and adjust the request accordingly.
2005400 Bad RequestMissing TripAdvisor IDsVerify the TripAdvisor IDs supplied are valid and mapped to properties in the Selfbook catalog.
2009400 Bad RequestUnable to process your request. The custom_data object has errors.Review the details array for specific custom_data field errors and correct them.
2010400 Bad RequestThis reservation is non-cancellable.This reservation cannot be cancelled. The rate is non-refundable. No further action is possible via the API.
2010400 Bad RequestInvalid coordinates or radiusProvide valid latitude and longitude values in decimal degree format.
2011400 Bad RequestInvalid search radiusSet the search radius to a value between 0.1 and 25 kilometers.
2012400 Bad RequestSearch radius too largeReduce the search radius to 25 kilometers or less.
2013400 Bad RequestInvalid filter parametersReview the filter combinations in your request; certain filters cannot be combined. Consult the API reference for supported combinations.
2014400 Bad RequestInvalid pagination parametersEnsure page and page_size are positive integers.

Payment Processing Error

CodeHTTP StatusMessageCorrective Action
3101400 Bad RequestUnable to process the payment.Retry the request. If the error persists, contact Selfbook support.
3102400 Bad RequestUnable to process the payment.Check the details array for the refusal reason. Ask the guest to use a different payment method or contact their card issuer.
3201400 Bad RequestErrorRetry the request. If the error persists, contact Selfbook support.
3501400 Bad RequestUnable to process the payment.Verify the payment token is valid and retry. If the error persists, contact Selfbook support.
3502400 Bad RequestUnable to process the payment.The payment token could not be processed. Ask the guest to re-enter payment details.
3503400 Bad RequestUnable to process the payment.Retry the request. If the error persists, contact Selfbook support.
3504400 Bad RequestErrorRetry the request. If the error persists, ask the guest to re-enter payment details.
3505400 Bad RequestErrorRetry the request. If the error persists, contact Selfbook support.

Booking Creation Error

CodeHTTP StatusMessageCorrective Action
4002400 Bad RequestBooking ExceptionThe booking request could not be completed. Please retry. If the error persists, contact Selfbook support.
4003400 Bad RequestBooking FailureIndicates the booking failed. Retry the booking request. If the error persists, contact Selfbook support.

Booking Cancellation Error

CodeHTTP StatusMessageCorrective Action
4004400 Bad RequestCancellation ExceptionRetry the cancellation request. If the error persists, contact Selfbook support to confirm the cancellation status.
4005400 Bad RequestCancellation FailureRetry the cancellation request. If the error persists, contact Selfbook support to confirm the cancellation status.

Availability Search Error

CodeHTTP StatusMessageCorrective Action
4006400 Bad RequestAvailability Search ExceptionRetry the availability search.
4007400 Bad RequestAvailability Search FailureRetry the availability search.
4008404 Not FoundNo properties found for availability search.Verify the property identifier is correct. The property may not be available through this channel.
4107500 Internal Server ErrorAvailability Search FailureRetry the availability search. If the error persists, contact Selfbook support.

Booking Modification Error

CodeHTTP StatusMessageCorrective Action
4009400 Bad RequestModification FailureRetry the modification request. If the error persists, contact Selfbook support.

Hotel Rate Verification Failure

CodeHTTP StatusMessageCorrective Action
4010400 Bad RequestThe hotel offer may have expired, or no longer exists.Re-run availability search and rate verification to obtain a fresh offer, then retry.

Supplier Authentication Error

CodeHTTP StatusMessageCorrective Action
4011500 Internal Server ErrorSupplier Authentication failure.Contact Selfbook support.

Hotel Offer Not Found Failure

CodeHTTP StatusMessageCorrective Action
4012404 Not FoundThe hotel offer was not found.The offer has expired or does not exist. Re-run availability search to obtain a new offer.

Supplier Connection Error

CodeHTTP StatusMessageCorrective Action
4030502 Bad GatewayUnable to reach service.Retry. If the error persists, contact Selfbook support.

Not Found Error

CodeHTTP StatusMessageCorrective Action
4040404 Not FoundThe requested resource could not be foundVerify the resource ID in your request is correct.