Skip to content

Errors ​

Every non-2xx response uses the same envelope:

json
{
  "error": {
    "code": "invalid_request",
    "message": "Unknown field: foo"
  }
}
FieldTypeDescription
codestringStable, machine-readable error code.
messagestringHuman-readable description.
detailsobjectOptional extra context. Present only for some errors.

Codes ​

StatusCodeWhen
400invalid_requestUnknown field, missing/empty required field, malformed JSON body, invalid date, or checkoutDate before checkinDate.
401unauthorizedMissing or incorrect bearer token.
404not_foundNo route matches the method and path.
404place_not_found/v1/places/:placeId — no such place.
404event_not_found/v1/events/:eventId — no such event.
422hotel_not_resolvedThe hotel could not be confidently resolved to a place with coordinates.
429rate_limitedThe sandbox key exceeded its request quota (10,000/day or 100/min). Production limits are negotiated per key.
502upstream_unavailableAn upstream dependency failed.
504upstream_timeout / request_timeoutA dependency timed out, or the request exceeded its budget.
500internal_errorUnexpected server failure.

invalid_request ​

The message names the offending field:

json
{
  "error": {
    "code": "invalid_request",
    "message": "Unknown field: hotelId"
  }
}
json
{
  "error": {
    "code": "invalid_request",
    "message": "Missing required field: checkinDate"
  }
}
json
{
  "error": {
    "code": "invalid_request",
    "message": "checkoutDate must be on or after checkinDate"
  }
}

A body that is not valid JSON:

json
{
  "error": {
    "code": "invalid_request",
    "message": "Malformed JSON body"
  }
}

unauthorized ​

Returned when the Authorization header is missing, is not a Bearer token, or carries the wrong token:

json
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid bearer token"
  }
}

not_found ​

Returned for any request that does not match a known route:

json
{
  "error": {
    "code": "not_found",
    "message": "No route for GET /v1/unknown"
  }
}

place_not_found / event_not_found ​

Returned with 404 by a detail route when the id is valid but unknown. A dependency outage is never reported as a 404 — that is a 502/504 — so a caller can tell "no such place" apart from "we're down".

json
{
  "error": {
    "code": "place_not_found",
    "message": "Place not found"
  }
}

hotel_not_resolved ​

Returned with 422 when no confident hotel match is found. The details object carries the candidates that were considered, so the caller can see what the resolver saw:

json
{
  "error": {
    "code": "hotel_not_resolved",
    "message": "Could not resolve the hotel for this request",
    "details": {
      "candidates": [
        {
          "placeId": "…",
          "name": "Some Other Hotel",
          "label": "Some Other Hotel, Portland, ME, USA",
          "address": "123 Main St",
          "locality": "Portland",
          "region": "ME",
          "lat": 43.65,
          "lng": -70.25
        }
      ]
    }
  }
}

To improve the chance of resolution, send the most complete hotelName, hotelAddress, hotelCity, and hotelState you have.

rate_limited ​

Returned when a sandbox key exceeds its request quota: 10,000 requests per day or 100 requests per minute, counted per key. Requests are rejected until the window clears. Production limits are negotiated per key.

json
{
  "error": {
    "code": "rate_limited",
    "message": "Rate limit exceeded for this API consumer"
  }
}

internal_error ​

Returned for unexpected failures. The message is deliberately generic; the server log carries the underlying error.

json
{
  "error": {
    "code": "internal_error",
    "message": "Failed to process request"
  }
}

Overlook Hospitality API