Skip to main content
All SNH AI APIs use conventional HTTP response codes and return structured error information. These conventions apply to every service.

HTTP Status Codes

Response Envelope

All successful responses use a standard envelope:
Include the correlation_id when contacting support.

Error Response Format

All error responses follow a consistent format:
For validation errors with multiple issues:

Common Error Scenarios

Authentication Errors (401)

Resolution: Get a new token from /auth/token. See Authentication.

Validation Errors (400, 422)

Validation errors return field-level details so you can fix the request without guessing.
Resolution: Fix the request payload. Do not retry — these are not transient errors.

Partial Success (206)

When a processing stage degrades or fails, the API returns HTTP 206 with partial results:
  • data.status: "partial"
  • data.errors[] — error messages from the failed stage
  • data.degradation — per-stage status
  • data.decision — whatever decisions could still be produced

Server Errors (500)

Resolution: Retry with exponential backoff. See Retry Logic. For service-specific error scenarios (e.g., cases count mismatch on /evaluate), see Troubleshooting.