Response Codes

Status codes when building APIs for the first time and how to fix errors.

Success Codes

Guesty Open API will respond with one of the following response codes:

CodeMeaningDescription
200OKThe request was successful.
201CreatedThe request has been fulfilled, and a new resource has been created.
204No contentThe server has completed the request but does not need to return an entity-body.

Error Codes

The Guesty Open API returns the following error codes in related cases:

Error CodeMeaningDescription
400Bad RequestYour request is invalid. This implies that you did not correctly format your API request. If no additional error information is given in the response body, you have to check the docs. You could be missing a query parameter, a field in the request body, or an incorrect header field. It could also be that some of your request data might have incorrect syntax.
401UnauthorizedYour Access Token is expired. Please refresh your token using your Client Credentials. For most APIs, you need to sign up and get an API key. This key is then used in an HTTP header field when you send a request, identifying you to the API.
403ForbiddenYour account is inactive, or you do not have permission to access this resource. This also occurs when you have an authentication issue, such as using the wrong API key or trying to access features your subscription plan doesn't allow, which is why you will encounter this error with the Open API.
404Not FoundThe specified resource could not be found. This is by far the most common HTTP status code you can get. It indicates that the URL you used in your request doesn't exist on the API server or the origin server. The best course of action is to check if you have a typo in your client code before checking if the API has issues
405Method Not AllowedYou've tried to access a resource with an invalid method.
406Not AcceptableYou requested a format that is not JSON.
410GoneThe related resource has been removed from our servers.
429Too Many RequestsYou are performing too many requests. Please see the rate limits. If you're sending too many requests too quickly, consider throttling them in your client. This response can also indicate that you hit a per-second, per-minute, per-hour, or per-day limit on your account. Without implementing API analytics, it's possible to reach these limits without receiving a push notification or email alert. Guesty API response headers include your remaining rate limits, providing you with a starting point for self-monitoring. Click here for more information.
500Internal Server ErrorThere was a problem with our server. Please try again later. It could also have been caused by an issue with your API call. Double-check the docs to make sure you did everything right: query fields, body fields, headers, and format. If that didn't fix the problem, it might also have been related to an API update that introduced buggy code, or data the API loaded from an upstream service. In that case, your only cause of action is to contact your Account Manager or Guesty Customer Experience.
503Service UnavailableWe're temporarily offline for maintenance. Please try again later. If it fits your use case, you can make your client more resilient to this error by waiting to send another request. But if the error code keeps showing up, please contact Customer Experience.

Contacting Support

When a status code response doesn't match the expected output, and you can confirm that the resource is available to you, and that your credentials and access token are valid, please contact our Customer Experience team and provide them with the following information:

  • The full URL of your request.
  • The response error code and any included messages.
  • The x-request-id value found in the response header.