Skip to contents

Status codes

HTTP status codes returned by the Statsnet API.

View as Markdown

The API returns an appropriate HTTP status code indicating whether the request was successful (e.g., 200 OK) or failed (e.g., 403 Forbidden). If a request fails, check the API response for more information.

Success Codes

CodeStatusDescription
200OKThe request was successful.
201CreatedThe resource was successfully created.
204No ContentThe request was successful but there is no content to return.

Client Error Codes

CodeStatusDescription
400Bad RequestThe request was malformed or contains invalid parameters.
401UnauthorizedAuthentication is required. The API key is missing.
403ForbiddenThe API key is invalid or does not have permission to access the resource.
404Not FoundThe requested resource does not exist.
409ConflictThe request conflicts with the current state of the resource.
422Unprocessable EntityThe request body contains semantic errors.
429Too Many RequestsRate limit exceeded. Slow down and retry after the period indicated in the Retry-After header.

Server Error Codes

CodeStatusDescription
500Internal Server ErrorAn unexpected error occurred on the server.
502Bad GatewayThe server received an invalid response from an upstream server.
503Service UnavailableThe server is temporarily unavailable. Retry the request later.

Error Response Format

When a request fails, the API returns a JSON object with error details:

Error response example