Error handling

Successful requests

On successful requests, the endpoints return a 200 HTTP status.

Unauthorized requests

Unauthorized requests are both invalid API keys and not authorized accesses on building blocks. The response will have a 401 HTTP error. The response can be as follows:

{ "error": "Not Authorized" }
{ "message": "unauthorized" }

Address or building block not found

If the address or the related building block was not found the API returns a 422 HTTP error. The body in this case is empty for PDF and CSV formats. The JSON response can be as follows:

{ "error": "Address or coordinate not found" }
{ "error": "Building block not found" }

Invalid requests

For endpoints containing a validation step, the API returns a 422 HTTP error for an invalid request, describing the missing parameter in a JSON.

  "errors": {
    "field": [
      "Bitte füllen Sie das obere Feld aus"

Internal Server Error

If other errors occur an internal server error will be triggered (HTTP error 500). The QUIS team will be notified and the body could be ignored in this case.