> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# E/M Coding API Error Messages

> Look up JSON error codes and messages returned by standalone E/M Coding API endpoints, with causes and recommended fixes

This page lists error messages returned by the standalone E/M Coding APIs:

* `POST /api/v1/em-codes`
* `GET /api/v1/em-codes/{session_id}/status`
* `GET /api/v1/em-codes/{session_id}`

Common SDP errors (token, scope, SBAC, provider registration) use the same patterns as other Partner APIs and are omitted here. Responses use the standard SDP JSON body:

```json JSON theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
{
  "code": 3,
  "message": "sections must not be empty",
  "details": []
}
```

The `code` field in the JSON body is a numeric status code. Suki maps it to the HTTP status on the response. See [Status code to HTTP mapping](#status-code-to-http-mapping).

Each table row lists an **error id**: a stable name you can use in client code. The live API returns the **message** string (not the snake\_case id). Match the message exactly or by prefix when you handle errors.

Categories

<ul>
  <li>
    Session
  </li>

  <li>
    Validation
  </li>

  <li>
    HTTP mapping
  </li>
</ul>

Reset

No error messages match your search or filters.

## E/M coding session errors

Errors returned when starting a session, checking status, or retrieving codes.

| Error id | Code | Description | Actual message |
| :- | :- | :- | :- |
| `invalid_request` | 400 | Request body failed validation (see validation table) | validation text as-is |
| `invalid_session_id_format` | 400 | `session_id` is missing or not a UUID | `session_id: cannot be blank.` / `session_id: invalid UUID format: …` |
| `invalid_em_coding_session_id` | 404 | Session not found, or id is not a `CODE_GENERATION` session | `invalid em coding session id` |
| `em_codes_retention_exceeded` | 404 | Session older than 30 days | `em codes for session older than 30 days is not available` |
| `error_creating_em_coding_session` | 500 | Start session, job write, or trigger publish failed | `error in starting em coding session` |
| `error_fetching_em_coding_session` | 500 | Failed to load the session job | `internal error in fetching em coding session` |
| `error_fetching_em_codes` | 500 | Failed to load generated codes | `internal error in fetching em codes` |

## `invalid_request` validation (`POST /api/v1/em-codes`)

| Error id | Code | Description / message |
| :- | :- | :- |
| `sections_must_not_be_empty` | 400 | `sections must not be empty` |
| `sections_entry_must_not_be_nil` | 400 | `sections entry must not be nil` |
| `sections_loinc_required` | 400 | `sections loinc is required` |
| `sections_content_required` | 400 | `sections content is required` |
| `unsupported_sections_content_type` | 400 | `unsupported sections content type value (only TEXT)` |
| `sections_must_have_content` | 400 | `at least one section must have content` |
| `invalid_patient_dob_format` | 400 | `patient dob must be in YYYY-MM-DD format` |
| `patient_dob_in_future` | 400 | `patient dob must not be in the future` |
| `invalid_patient_sex` | 400 | `invalid patient sex` |
| `invalid_patient_type` | 400 | `invalid patient_type: …` (`NEW_PATIENT` / `ESTABLISHED_PATIENT`) |
| `patient_mrn_too_long` | 400 | `patient mrn cannot exceed 64 characters` |
| `insurance_coverages_entry_must_not_be_nil` | 400 | `insurance coverages entry must not be nil` |
| `provider_npi_too_long` | 400 | `provider npi cannot exceed 64 characters` |
| `invalid_visit_type` | 400 | `invalid visit type: …` |
| `invalid_date_of_service_format` | 400 | `date of service must be in YYYY-MM-DD format` |
| `date_of_service_in_future` | 400 | `date of service must not be in the future` |
| `invalid_total_time_minutes` | 400 | `encounter total time minutes must be greater than 0` |
| `encounter_csn_too_long` | 400 | `encounter csn cannot exceed 64 characters` |
| `diagnosis_must_have_only_one_code` | 400 | `diagnosis must have only one code` |
| `invalid_diagnosis_code` | 400 | `each diagnosis must have only a valid code` |

## Status code to HTTP mapping

| JSON `code` | HTTP status | Typical meaning |
| :- | :- | :- |
| 3 | 400 | Invalid argument / validation |
| 5 | 404 | Not found |
| 16 | 401 | Unauthenticated |
| 13 | 500 | Internal |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.