Symptom / Error
When pushing a patient record to Sunwave EMR, you receive an error similar to:
failed Client error: POST https://emr.sunwavehealth.com/SunwaveEMR/api/opportunity/new resulted in a 422 Unprocessable Entity response: {"code":"VALIDATION_ERROR","docs":"https://emr.sunwavehealth.com/SunwaveEMR/swagger/", "detail":"One or more fields (truncated...)⚠️ Note: The error message is often truncated, making it difficult to identify the specific validation issue without contacting Sunwave support.
Cause
422 errors in Sunwave EMR integrations are commonly caused by:
Missing or incorrect Legacy ID configuration for service facilities
Improper facility mapping between different Sunwave realms (e.g., NJ vs. FL)
Integration pointing to the wrong realm where patient records should be created
Missing required field mappings in EMR settings
Solution
Step 1 — Check Legacy ID Configuration
Log into your Sunwave EMR instance
Navigate to Practice Set Up → Service Facilities
Confirm each facility has a numeric Legacy ID value (the number after the "/" sign)
If any facilities are missing Legacy IDs, add a unique numeric value (e.g., 930)
Step 2 — Verify Facility Mappings
Identify which Sunwave realm should receive the patient records
Confirm the integration is configured to push to the correct realm
Verify that facility names in Dazos match exactly with facility names in the target Sunwave realm
Step 3 — Review Integration Configuration
In Dazos, navigate to Settings → CRM Settings → Integrations → EMR Settings
Verify the Sunwave configuration points to the intended realm (NJ vs. FL)
Confirm API credentials match the target realm
Step 4 — Contact Sunwave Support for Full Error Details
If the issue persists after checking facility configurations:
Contact Sunwave Support with your account ID
Request the full un-truncated error message from their backend logs
Provide the specific payload that is failing validation
Ask them to identify which fields are causing the validation error
Escalation
Contact Dazos Support if:
Legacy IDs are properly configured but 422 errors persist
You need assistance accessing Sunwave facility configuration settings
Sunwave support identifies backend configuration issues requiring technical intervention
When contacting support, provide:
Your CRM instance URL
The complete error message and payload
Screenshots of your Sunwave service facilities configuration
Confirmation of which realm should receive the patient records