JouloDocs

Errors

HTTP error codes and error response format returned by the Joulo API

The Joulo API uses standard HTTP status codes to indicate the success or failure of a request.

Error response format

Error responses return a JSON body with an error field:

{
  "error": "Missing or invalid API token"
}

When an OAuth2 token lacks the required scope, the response includes the missing scope:

{
  "error": "Insufficient scope",
  "required_scope": "sessions:read"
}

Status codes

StatusDescriptionHow to handle
401Missing or invalid API token.Check that your Authorization header is formatted as Bearer YOUR_TOKEN, or that the token query parameter is correct.
403Token is valid but lacks the required scope.Ensure your OAuth2 token was granted the scope listed in required_scope. Legacy API tokens have full access and never receive 403.
404The requested path does not exist.Check the endpoint path. Available endpoints: /chargers, /sessions, /energy.
405HTTP method not allowed.The API only supports GET requests.
429Rate limit exceeded.Back off and retry after the period indicated in the Retry-After header.
500Unexpected server error.Retry with exponential backoff. If the issue persists, contact [email protected].

Example responses

401 Unauthorized

{
  "error": "Missing or invalid API token"
}

403 Forbidden (OAuth2 scope)

{
  "error": "Insufficient scope",
  "required_scope": "chargers:read"
}

404 Not Found

{
  "error": "Not found. Available endpoints: /chargers, /sessions, /energy"
}

405 Method Not Allowed

{
  "error": "Method not allowed"
}