documentation

Patient Vault v3 API

Alias

/v3/patient/{patientId}/alias endpoint reference.

URL: https://demo.1health.io/api/v3/patient/{patientId}/alias

APIs for managing patient name aliases. Supports creating, listing, updating, and deactivating alternate name records (maiden names, nicknames, legal changes, etc.).

Endpoints

EndpointMethodDescription
/v3/patient/{patientId}/aliasGETList patient name aliases
/v3/patient/{patientId}/aliasPOSTAdd a new name alias to a patient
/v3/patient/{patientId}/alias/{aliasId}GETGet a specific patient name alias
/v3/patient/{patientId}/alias/{aliasId}PUTFully update a patient name alias
/v3/patient/{patientId}/alias/{aliasId}PATCHPartially update a patient name alias
/v3/patient/{patientId}/alias/{aliasId}DELETEDeactivate a patient name alias

GET/v3/patient/{patientId}/alias

List patient name aliases

Overview

Returns all active name aliases for a patient. Returns an array of alias records (possibly empty). Only active (non-deleted) aliases are returned.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.

Responses

200 OK

List of patient name aliases.

DTO: PatientAliasListResponseDTO

{
  "aliases": [
    {}
  ]
}
FieldTypeNullableDescription
aliasesListNoList of name alias records.

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient not found.

Example

curl -X GET "https://demo.1health.io/api/v3/patient/1001/alias" \
  -H "Authorization: Bearer $TOKEN"

POST/v3/patient/{patientId}/alias

Add a new name alias to a patient

Overview

Creates a new name alias record for a patient. Used to track alternate names such as maiden names, nicknames, legal name changes, or preferred names. Creates a new alias record — existing aliases are not modified. At least one of alias, firstName, lastName, or fullName must be provided. type is required and must be one of: maiden, nickname, preferred, previous, legal_change, alias. Requires authentication.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient to add an alias to.

Request Body

Content-Type: application/json · DTO: PatientAliasRequestDTO

{
  "type": "example-value",
  "alias": "example-value",
  "firstName": "example-value",
  "lastName": "example-value",
  "fullName": "example-value",
  "effectiveFrom": "example-value",
  "effectiveTo": "example-value"
}
FieldTypeRequiredConstraintsDescription
typestringYesallowableValues: maiden, nickname, preferred, previous, legal_change, aliasType of name alias.
aliasstringNoAlias or nickname.
firstNamestringNoAlternate first name.
lastNamestringNoAlternate last name.
fullNamestringNoFull alternate name for mononyms or cultural formats.
effectiveFromstringNoformat: dateWhen this name was in use in YYYY-MM-DD format.
effectiveTostringNoformat: dateWhen this name stopped being used in YYYY-MM-DD format.

Responses

201 Created

Alias created successfully.

DTO: PatientAliasResponseDTO

{
  "id": 1001,
  "type": "example-value",
  "alias": "example-value",
  "firstName": "example-value",
  "lastName": "example-value",
  "fullName": "example-value",
  "effectiveFrom": "2024-01-15",
  "effectiveTo": "2024-01-15"
}
FieldTypeNullableDescription
idLongNoAlias record ID.
typeStringNoType of name alias.
aliasStringYesAlias or nickname.
firstNameStringYesAlternate first name.
lastNameStringYesAlternate last name.
fullNameStringYesFull alternate name.
effectiveFromLocalDateYesWhen this name was in use.
effectiveToLocalDateYesWhen this name stopped being used.

400 Bad Request

Invalid request. Possible causes: Missing required field (type), No name field provided (alias, firstName, lastName, or fullName), Invalid type value, effectiveTo is before effectiveFrom

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient not found.

Example

curl -X POST "https://demo.1health.io/api/v3/patient/1001/alias" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"type": "example-value", "alias": "example-value", "firstName": "example-value", "lastName": "example-value", "fullName": "example-value", "effectiveFrom": "example-value", "effectiveTo": "example-value"}'

GET/v3/patient/{patientId}/alias/{aliasId}

Get a specific patient name alias

Overview

Returns a single name alias record for a patient. Requires authentication. Returns 404 if the alias ID is not found for this patient.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
aliasIdLongYesThe ID of the alias record.

Responses

200 OK

Alias record found.

DTO: PatientAliasResponseDTO

{
  "id": 1001,
  "type": "example-value",
  "alias": "example-value",
  "firstName": "example-value",
  "lastName": "example-value",
  "fullName": "example-value",
  "effectiveFrom": "2024-01-15",
  "effectiveTo": "2024-01-15"
}
FieldTypeNullableDescription
idLongNoAlias record ID.
typeStringNoType of name alias.
aliasStringYesAlias or nickname.
firstNameStringYesAlternate first name.
lastNameStringYesAlternate last name.
fullNameStringYesFull alternate name.
effectiveFromLocalDateYesWhen this name was in use.
effectiveToLocalDateYesWhen this name stopped being used.

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Alias not found — re-fetch the list to find the current record.

Example

curl -X GET "https://demo.1health.io/api/v3/patient/1001/alias/1001" \
  -H "Authorization: Bearer $TOKEN"

PUT/v3/patient/{patientId}/alias/{aliasId}

Fully update a patient name alias

Overview

Replaces all fields of an existing alias record. The type field and at least one name field are required. All required fields must be present in the request. Fields not provided will be cleared. Requires authentication. Returns 404 if the alias does not exist for this patient.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
aliasIdLongYesThe ID of the alias record to update.

Request Body

Content-Type: application/json · DTO: PatientAliasRequestDTO

{
  "type": "example-value",
  "alias": "example-value",
  "firstName": "example-value",
  "lastName": "example-value",
  "fullName": "example-value",
  "effectiveFrom": "example-value",
  "effectiveTo": "example-value"
}
FieldTypeRequiredConstraintsDescription
typestringYesallowableValues: maiden, nickname, preferred, previous, legal_change, aliasType of name alias.
aliasstringNoAlias or nickname.
firstNamestringNoAlternate first name.
lastNamestringNoAlternate last name.
fullNamestringNoFull alternate name for mononyms or cultural formats.
effectiveFromstringNoformat: dateWhen this name was in use in YYYY-MM-DD format.
effectiveTostringNoformat: dateWhen this name stopped being used in YYYY-MM-DD format.

Responses

200 OK

Alias updated successfully.

DTO: PatientAliasResponseDTO

{
  "id": 1001,
  "type": "example-value",
  "alias": "example-value",
  "firstName": "example-value",
  "lastName": "example-value",
  "fullName": "example-value",
  "effectiveFrom": "2024-01-15",
  "effectiveTo": "2024-01-15"
}
FieldTypeNullableDescription
idLongNoAlias record ID.
typeStringNoType of name alias.
aliasStringYesAlias or nickname.
firstNameStringYesAlternate first name.
lastNameStringYesAlternate last name.
fullNameStringYesFull alternate name.
effectiveFromLocalDateYesWhen this name was in use.
effectiveToLocalDateYesWhen this name stopped being used.

400 Bad Request

Invalid request. Possible causes: Missing required field (type), No name field provided (alias, firstName, lastName, or fullName), Invalid type value, Invalid date format for effectiveFrom or effectiveTo, effectiveTo is before effectiveFrom

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient or alias not found.

Example

curl -X PUT "https://demo.1health.io/api/v3/patient/1001/alias/1001" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"type": "example-value", "alias": "example-value", "firstName": "example-value", "lastName": "example-value", "fullName": "example-value", "effectiveFrom": "example-value", "effectiveTo": "example-value"}'

PATCH/v3/patient/{patientId}/alias/{aliasId}

Partially update a patient name alias

Overview

Updates only the fields provided in the request body. Fields not included are left unchanged. Only non-null fields are applied. Existing values for omitted fields are preserved. Requires authentication. Returns 404 if the alias does not exist for this patient.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
aliasIdLongYesThe ID of the alias record to partially update.

Request Body

Content-Type: application/json · DTO: PatientAliasRequestDTO

{
  "type": "example-value",
  "alias": "example-value",
  "firstName": "example-value",
  "lastName": "example-value",
  "fullName": "example-value",
  "effectiveFrom": "example-value",
  "effectiveTo": "example-value"
}
FieldTypeRequiredConstraintsDescription
typestringYesallowableValues: maiden, nickname, preferred, previous, legal_change, aliasType of name alias.
aliasstringNoAlias or nickname.
firstNamestringNoAlternate first name.
lastNamestringNoAlternate last name.
fullNamestringNoFull alternate name for mononyms or cultural formats.
effectiveFromstringNoformat: dateWhen this name was in use in YYYY-MM-DD format.
effectiveTostringNoformat: dateWhen this name stopped being used in YYYY-MM-DD format.

Responses

200 OK

Alias partially updated successfully.

DTO: PatientAliasResponseDTO

{
  "id": 1001,
  "type": "example-value",
  "alias": "example-value",
  "firstName": "example-value",
  "lastName": "example-value",
  "fullName": "example-value",
  "effectiveFrom": "2024-01-15",
  "effectiveTo": "2024-01-15"
}
FieldTypeNullableDescription
idLongNoAlias record ID.
typeStringNoType of name alias.
aliasStringYesAlias or nickname.
firstNameStringYesAlternate first name.
lastNameStringYesAlternate last name.
fullNameStringYesFull alternate name.
effectiveFromLocalDateYesWhen this name was in use.
effectiveToLocalDateYesWhen this name stopped being used.

400 Bad Request

Invalid request. Possible causes: Invalid type value, Invalid date format for effectiveFrom or effectiveTo, effectiveTo is before effectiveFrom

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient or alias not found.

Example

curl -X PATCH "https://demo.1health.io/api/v3/patient/1001/alias/1001" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"type": "example-value", "alias": "example-value", "firstName": "example-value", "lastName": "example-value", "fullName": "example-value", "effectiveFrom": "example-value", "effectiveTo": "example-value"}'

DELETE/v3/patient/{patientId}/alias/{aliasId}

Deactivate a patient name alias

Overview

Soft-deletes an alias record. The alias is deactivated but preserved for audit trail. Requires authentication. Returns 404 if the alias does not exist for this patient.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
aliasIdLongYesThe ID of the alias record to deactivate.

Responses

200 OK

Alias deactivated successfully.

DTO: PatientAliasDeleteResponseDTO

{
  "id": 1001,
  "active": true,
  "deletedAt": "2024-01-15T09:30:00Z"
}
FieldTypeNullableDescription
idLongNoThe ID of the deactivated alias.
activebooleanNoWhether the alias is active.
deletedAtLocalDateTimeNoTimestamp when the alias was deactivated.

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient or alias not found.

Example

curl -X DELETE "https://demo.1health.io/api/v3/patient/1001/alias/1001" \
  -H "Authorization: Bearer $TOKEN"

Parent: https://agents.1health.io/public/demo/api/v3/patient/_patientId_/agents.md · Site guide: https://agents.1health.io/public/demo/api/agents.md