Classification events
Classification events fire only for support files uploaded via the v2 endpoint with support_file_code omitted. (For v1 uploads, your system already knew the document type — there's nothing for DVS to classify.)
After upload, RCM:
- Calls DVS asynchronously to classify the document.
- Emits one of
DOCUMENT_CLASSIFICATION_COMPLETEDorDOCUMENT_CLASSIFICATION_FAILED. - If classification completed, RCM then runs validation and emits a
DOCUMENT_VALIDATION_*event afterwards.
So the typical happy-path sequence is:
POST /rcm/v2/support-files/upload → 202 Accepted
▼ (async, ~5-15s later)
webhook: DOCUMENT_CLASSIFICATION_COMPLETED → document type detected + associated
▼ (async, ~10-30s later)
webhook: DOCUMENT_VALIDATION_COMPLETED → rules evaluated, content approved
Classification events are emitted best-effort: a failure to publish the webhook never rolls back the classification/association of the document in RCM.
The envelope is the same for all events (see the envelope). For classification events, entity_type is support_document and entity_id is the document id. Classification events carry no metadata — metadata is always null.
Until August 2026 these two events shipped their payload keys in camelCase (documentId, supportFileCode, dvsDocumentType, originEventId, chargeCode, agreementCode, invoiceNumber, fileName, classifiedAt, associatedAt) while the envelope was snake_case. They are now snake_case, matching the envelope and the validation events, as documented below.
Timestamps also changed shape: they used to include the zone id (2026-07-31T19:00:39.534247Z[GMT]), which is not valid ISO-8601. They are now emitted as 2026-07-31T19:00:39.534Z.
If your receiver was built against the camelCase names, accept both spellings during the cutover and then drop the camelCase branch.
DOCUMENT_CLASSIFICATION_COMPLETED
Fired when DVS successfully classified and associated the support file.
Header
| Header | Value |
|---|---|
X-RCM-Event-Type | DOCUMENT_CLASSIFICATION_COMPLETED |
Payload
{
"event_id": "c1d2e3f4-a5b6-7890-abcd-ef1234567890",
"event_type": "DOCUMENT_CLASSIFICATION_COMPLETED",
"entity_type": "support_document",
"entity_id": "9a8b7c6d-5e4f-3210-abcd-ef0987654321",
"payload": {
"document_id": "9a8b7c6d-5e4f-3210-abcd-ef0987654321",
"support_file_code": "SF-2025-001234",
"dvs_document_type": "INVOICE",
"origin_event_id": "evt-0001-abcd-1234",
"charge_code": "CHG-0001",
"agreement_code": "AGR-0001",
"invoice_number": "F-12345",
"file_name": "factura.pdf",
"classified_at": "2026-06-25T15:33:58.789-06:00",
"associated_at": "2026-06-25T15:34:00.123-06:00"
},
"metadata": null,
"created_at": "2026-06-25T15:34:00.500-06:00"
}
Field reference
| Path | Type | Optional | Description |
|---|---|---|---|
payload.document_id | string (UUID) | No | RCM's internal ID of the document. Same value as entity_id. |
payload.support_file_code | string | Yes | Code of the support file. |
payload.dvs_document_type | string | Yes | The document type DVS classified (e.g. INVOICE). |
payload.origin_event_id | string | Yes | Identifier of the inbound event that originated the document, when available. |
payload.charge_code | string | Yes | Charge the document is associated to, when applicable. |
payload.agreement_code | string | Yes | The provider-payer agreement code. |
payload.invoice_number | string | Yes | Invoice number the document was associated to, when applicable. |
payload.file_name | string | Yes | Original filename. |
payload.classified_at | string (ISO-8601) | No | When DVS produced the classification result. |
payload.associated_at | string (ISO-8601) | No | When RCM associated the classified document. |
Optional fields are present with a null value, not omitted — this event's payload is serialised from a map, so absent data arrives as an explicit null. Model them as nullable.
DOCUMENT_CLASSIFICATION_FAILED
Fired when DVS could not classify/associate the support file (unrecognised document type, association error, or an unexpected error).
Header
| Header | Value |
|---|---|
X-RCM-Event-Type | DOCUMENT_CLASSIFICATION_FAILED |
Payload
{
"event_id": "d2e3f4a5-b6c7-8901-bcde-f10987654321",
"event_type": "DOCUMENT_CLASSIFICATION_FAILED",
"entity_type": "support_document",
"entity_id": "8b7c6d5e-4f3a-2109-bcde-f10987654321",
"payload": {
"document_id": "8b7c6d5e-4f3a-2109-bcde-f10987654321",
"origin_event_id": "evt-0002-efgh-5678",
"agreement_code": "AGR-0002",
"file_name": "documento.pdf",
"failed_at": "2026-06-25T15:34:09.123-06:00",
"error_code": "UNKNOWN_DOCUMENT_TYPE",
"error_reason": "The document could not be classified.",
"attempts": 3
},
"metadata": null,
"created_at": "2026-06-25T15:34:12.000-06:00"
}
Field reference
| Path | Type | Optional | Description |
|---|---|---|---|
payload.document_id | string (UUID) | No | RCM's internal ID of the document. Same value as entity_id. |
payload.origin_event_id | string | Yes | Identifier of the inbound event that originated the document, when available. |
payload.agreement_code | string | Yes | The provider-payer agreement code. |
payload.file_name | string | Yes | Original filename. |
payload.failed_at | string (ISO-8601) | No | When the classification failed. |
payload.error_code | string | Yes | Machine-readable failure code from DVS. Match against this, not the message text. |
payload.error_reason | string | Yes | Human-readable explanation of the failure. |
payload.attempts | integer | Yes | Number of attempts made, when available. |
Optional fields are present with a null value, not omitted — this event's payload is serialised from a map, so absent data arrives as an explicit null. Model them as nullable.
What happens after each event
| Event | Next step from RCM |
|---|---|
DOCUMENT_CLASSIFICATION_COMPLETED | RCM runs validation next. A DOCUMENT_VALIDATION_* event follows shortly after. |
DOCUMENT_CLASSIFICATION_FAILED | RCM does nothing further for this upload. No validation event will be emitted. |