NeuralRevNeuralRevDocs
API Reference

Patients

Create or update patient records with optional insurance information via the Integration API.

Create or update patient records with optional primary, secondary, and tertiary insurance information.

Upsert Patient

POST /integration/patients

Creates or updates a patient by id. Optionally upserts primary, secondary, and tertiary insurance records.

Request Body

FieldTypeRequiredDescription
idstringYesYour unique identifier for this patient
first_namestringYesPatient's first name
last_namestringYesPatient's last name
date_of_birthstring (ISO 8601)YesDate of birth
genderstringNomale, female, or other
phonestringNoPhone number
emailstringNoEmail address
ssn_last4stringNoLast 4 digits of SSN
address_line_1stringNoStreet address
address_line_2stringNoApartment, suite, etc.
citystringNoCity
statestringNoState code (2 characters)
zip_codestringNoZIP code
countrystringNoCountry code (default: US)
primary_insuranceobjectNoPrimary insurance details
secondary_insuranceobjectNoSecondary insurance details
tertiary_insuranceobjectNoTertiary insurance details

Insurance Object

Each insurance object accepts the following fields:

FieldTypeRequiredDescription
payer_idstringYesID of the payer (must exist)
policy_numberstringNoInsurance policy number
group_numberstringNoGroup number
effective_datestring (ISO 8601)NoCoverage start date
termination_datestring (ISO 8601)NoCoverage end date
subscriber_idstringNoSubscriber ID (if different from patient)
subscriber_first_namestringNoSubscriber's first name
subscriber_last_namestringNoSubscriber's last name
subscriber_relationshipstringNoRelationship to subscriber (self, spouse, child, other)
subscriber_date_of_birthstring (ISO 8601)NoSubscriber's date of birth
subscriber_address_line_1stringNoSubscriber's street address
subscriber_citystringNoSubscriber's city
subscriber_statestringNoSubscriber's state
subscriber_zip_codestringNoSubscriber's ZIP code
subscriber_countrystringNoSubscriber's country

Example Request

curl -X POST https://api.neuralrev.ai/integration/patients \
  -H "x-api-key: nrev_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "PAT-001",
    "first_name": "Jane",
    "last_name": "Doe",
    "date_of_birth": "1990-01-15T00:00:00Z",
    "gender": "female",
    "phone": "5551234567",
    "email": "jane.doe@example.com",
    "ssn_last4": "1234",
    "address_line_1": "123 Main St",
    "city": "Springfield",
    "state": "IL",
    "zip_code": "62701",
    "primary_insurance": {
      "payer_id": "PAYER-001",
      "policy_number": "POL-12345",
      "group_number": "GRP-100",
      "effective_date": "2024-01-01T00:00:00Z",
      "subscriber_first_name": "Jane",
      "subscriber_last_name": "Doe",
      "subscriber_relationship": "self",
      "subscriber_address_line_1": "123 Main St",
      "subscriber_city": "Springfield",
      "subscriber_state": "IL",
      "subscriber_zip_code": "62701",
      "subscriber_country": "US"
    }
  }'

Response

200 OK — Patient upserted successfully:

{
  "success": true,
  "message": "Patient upserted successfully"
}

400 Bad Request — Validation error or referenced payer not found:

{
  "error": "Payer not found for id: PAYER-999"
}

Notes

  • The payer_id in insurance objects must reference a payer that has already been created via the /integration/payers endpoint.
  • Sending a patient request without insurance fields will not remove existing insurance records. To update insurance, include the insurance object with updated values.
  • Only ssn_last4 (last 4 digits) is accepted — full SSN is never stored.

On this page