documentation

Patient Vault v3 API

Address

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

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

APIs for managing patient physical addresses. Supports creating, listing, updating, and deactivating address records with automatic address validation.

Endpoints

EndpointMethodDescription
/v3/patient/{patientId}/addressGETList patient addresses
/v3/patient/{patientId}/addressPOSTAdd a new address to a patient
/v3/patient/{patientId}/address/{addressId}GETGet a specific patient address
/v3/patient/{patientId}/address/{addressId}PUTFully update a patient address
/v3/patient/{patientId}/address/{addressId}PATCHPartially update a patient address
/v3/patient/{patientId}/address/{addressId}DELETEDeactivate a patient address

GET/v3/patient/{patientId}/address

List patient addresses

Overview

Returns all active addresses for a patient. Supports optional filtering by primary status and use type. Returns an array of address records (possibly empty). Only active (non-deleted) addresses are returned. Use ?primary=true to get only the primary address. Use ?use=home to filter by address use type.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.

Query Parameters

ParameterTypeRequiredDefaultDescription
primaryBooleanNoFilter by primary status. When true, returns only the primary address.
useStringNoFilter by address use type.

Responses

200 OK

List of patient addresses.

DTO: PatientAddressListResponseDTO

{
  "addresses": [
    {}
  ]
}
FieldTypeNullableDescription
addressesListNoList of patient address records.

400 Bad Request

Invalid use filter value.

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/address" \
  -H "Authorization: Bearer $TOKEN"

POST/v3/patient/{patientId}/address

Add a new address to a patient

Overview

Appends a new physical address to the patient record. Old addresses are preserved for audit trail. The address is validated against the Google Address Validation API. Creates a new address record — existing addresses are not modified. If primary is set to true, any existing primary address is automatically unset. If this is the patient's first address and primary is not specified, it is automatically set as primary. Address validation is performed automatically. The validationStatus field indicates the result: verified, unverified, or unknown. If validation returns unverified, candidate suggestions may be included in validationCandidates. Addresses are never rejected on validation grounds — the record is always created. effectiveFrom defaults to the current date if not provided. country defaults to United States if not provided. Requires authentication. Required fields: line1, city, state, postalCode. use defaults to work if not provided.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

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

Request Body

Content-Type: application/json · DTO: PatientAddressRequestDTO

{
  "use": "example-value",
  "line1": "example-value",
  "line2": "example-value",
  "city": "example-value",
  "state": "example-value",
  "postalCode": "example-value",
  "country": "example-value",
  "primary": true,
  "effectiveFrom": "example-value",
  "effectiveTo": "example-value"
}
FieldTypeRequiredConstraintsDescription
usestringYesallowableValues: home, work, billing, mailing, temporaryAddress use type.
line1stringYesStreet address line 1. Cannot be cleared.
line2stringNoApt, suite, unit, floor. Optional; clear with n/a.
citystringYesCity or municipality. Cannot be cleared.
statestringYesState / province / region code. Cannot be cleared.
postalCodestringYesZIP or postal code. Cannot be cleared.
countrystringNoCountry name. Valid country names available from /v2/public/countries.
primarybooleanNoMark as primary address. Only one can be primary at a time. Send false to unset (another address must already be primary).
effectiveFromstringNoformat: dateWhen this address became valid in YYYY-MM-DD format. Defaults to current date.
effectiveTostringNoformat: dateWhen this address stopped being valid in YYYY-MM-DD format. Null means current. Send 1970-01-01 to clear the end date (address treated as currently effective).

Responses

201 Created

Address created successfully.

DTO: PatientAddressResponseDTO

{
  "id": 1001,
  "use": "example-value",
  "line1": "example-value",
  "line2": "example-value",
  "city": "example-value",
  "state": "example-value",
  "postalCode": "example-value",
  "country": "example-value",
  "primary": true,
  "effectiveFrom": "2024-01-15",
  "effectiveTo": "2024-01-15",
  "validationStatus": "example-value",
  "validationCandidates": [
    {}
  ]
}
FieldTypeNullableDescription
idLongNoAddress record ID.
useStringNoAddress use type.
line1StringNoStreet address line 1.
line2StringYesApt, suite, unit, floor.
cityStringNoCity or municipality.
stateStringNoState / province / region code.
postalCodeStringNoZIP or postal code.
countryStringYesCountry name.
primaryBooleanYesWhether this is the primary address.
effectiveFromLocalDateYesWhen this address became valid.
effectiveToLocalDateYesWhen this address stopped being valid. Null means current.
validationStatusStringYesAddress validation status.
validationCandidatesList<Map<String, String>>YesCandidate addresses suggested by the validation service. Only populated when validationStatus is 'unverified'.

400 Bad Request

Invalid request. Possible causes: A required field (line1, city, state, postalCode) is missing, blank, or set to n/a; Invalid use value; Invalid date format for effectiveFrom or effectiveTo; 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/address" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"use": "example-value", "line1": "example-value", "line2": "example-value", "city": "example-value", "state": "example-value", "postalCode": "example-value", "country": "example-value", "primary": true, "effectiveFrom": "example-value", "effectiveTo": "example-value"}'

GET/v3/patient/{patientId}/address/{addressId}

Get a specific patient address

Overview

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

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
addressIdLongYesThe ID of the address record.

Responses

200 OK

Address record found.

DTO: PatientAddressResponseDTO

{
  "id": 1001,
  "use": "example-value",
  "line1": "example-value",
  "line2": "example-value",
  "city": "example-value",
  "state": "example-value",
  "postalCode": "example-value",
  "country": "example-value",
  "primary": true,
  "effectiveFrom": "2024-01-15",
  "effectiveTo": "2024-01-15",
  "validationStatus": "example-value",
  "validationCandidates": [
    {}
  ]
}
FieldTypeNullableDescription
idLongNoAddress record ID.
useStringNoAddress use type.
line1StringNoStreet address line 1.
line2StringYesApt, suite, unit, floor.
cityStringNoCity or municipality.
stateStringNoState / province / region code.
postalCodeStringNoZIP or postal code.
countryStringYesCountry name.
primaryBooleanYesWhether this is the primary address.
effectiveFromLocalDateYesWhen this address became valid.
effectiveToLocalDateYesWhen this address stopped being valid. Null means current.
validationStatusStringYesAddress validation status.
validationCandidatesList<Map<String, String>>YesCandidate addresses suggested by the validation service. Only populated when validationStatus is 'unverified'.

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

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

Example

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

PUT/v3/patient/{patientId}/address/{addressId}

Fully update a patient address

Overview

Replaces all fields of an existing address record. All required fields must be provided. Re-validation is triggered if address data has changed or the current status is unknown. If primary is changed to true, the previous primary address is automatically unset. Address validation is re-triggered when address fields change or the current validationStatus is unknown. Requires authentication. Returns 404 if the address does not exist for this patient.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
addressIdLongYesThe ID of the address record to update.

Request Body

Content-Type: application/json · DTO: PatientAddressRequestDTO

{
  "use": "example-value",
  "line1": "example-value",
  "line2": "example-value",
  "city": "example-value",
  "state": "example-value",
  "postalCode": "example-value",
  "country": "example-value",
  "primary": true,
  "effectiveFrom": "example-value",
  "effectiveTo": "example-value"
}
FieldTypeRequiredConstraintsDescription
usestringYesallowableValues: home, work, billing, mailing, temporaryAddress use type.
line1stringYesStreet address line 1. Cannot be cleared.
line2stringNoApt, suite, unit, floor. Optional; clear with n/a.
citystringYesCity or municipality. Cannot be cleared.
statestringYesState / province / region code. Cannot be cleared.
postalCodestringYesZIP or postal code. Cannot be cleared.
countrystringNoCountry name. Valid country names available from /v2/public/countries.
primarybooleanNoMark as primary address. Only one can be primary at a time. Send false to unset (another address must already be primary).
effectiveFromstringNoformat: dateWhen this address became valid in YYYY-MM-DD format. Defaults to current date.
effectiveTostringNoformat: dateWhen this address stopped being valid in YYYY-MM-DD format. Null means current. Send 1970-01-01 to clear the end date (address treated as currently effective).

Responses

200 OK

Address updated successfully.

DTO: PatientAddressResponseDTO

{
  "id": 1001,
  "use": "example-value",
  "line1": "example-value",
  "line2": "example-value",
  "city": "example-value",
  "state": "example-value",
  "postalCode": "example-value",
  "country": "example-value",
  "primary": true,
  "effectiveFrom": "2024-01-15",
  "effectiveTo": "2024-01-15",
  "validationStatus": "example-value",
  "validationCandidates": [
    {}
  ]
}
FieldTypeNullableDescription
idLongNoAddress record ID.
useStringNoAddress use type.
line1StringNoStreet address line 1.
line2StringYesApt, suite, unit, floor.
cityStringNoCity or municipality.
stateStringNoState / province / region code.
postalCodeStringNoZIP or postal code.
countryStringYesCountry name.
primaryBooleanYesWhether this is the primary address.
effectiveFromLocalDateYesWhen this address became valid.
effectiveToLocalDateYesWhen this address stopped being valid. Null means current.
validationStatusStringYesAddress validation status.
validationCandidatesList<Map<String, String>>YesCandidate addresses suggested by the validation service. Only populated when validationStatus is 'unverified'.

400 Bad Request

Invalid request. Possible causes: A required field (line1, city, state, postalCode) is missing, blank, or set to n/a; Invalid use value; Invalid date format for effectiveFrom or effectiveTo; effectiveTo is before effectiveFrom; Cannot unset primary without setting another address as primary first

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient or address not found.

Example

curl -X PUT "https://demo.1health.io/api/v3/patient/1001/address/1001" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"use": "example-value", "line1": "example-value", "line2": "example-value", "city": "example-value", "state": "example-value", "postalCode": "example-value", "country": "example-value", "primary": true, "effectiveFrom": "example-value", "effectiveTo": "example-value"}'

PATCH/v3/patient/{patientId}/address/{addressId}

Partially update a patient address

Overview

Updates only the fields provided in the request body. Fields not included are left unchanged. Re-validation is triggered if address fields change or the current status is unknown. Only non-null fields are applied. Existing values for omitted fields are preserved. Sending null (or omitting a field) leaves it unchanged, so an optional field is cleared by sending the default value for its type: Text (line2) — send n/a; Date (effectiveTo) — send 1970-01-01 to clear the end date so the address is treated as currently effective; Boolean (primary) — send false to unset it (allowed only when another address is already primary); effectiveFrom cannot be emptied; sending it blank resets it to the current date; line1, city, state and postalCode are required and cannot be cleared.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
addressIdLongYesThe ID of the address record to partially update.

Request Body

Content-Type: application/json · DTO: PatientAddressRequestDTO

{
  "use": "example-value",
  "line1": "example-value",
  "line2": "example-value",
  "city": "example-value",
  "state": "example-value",
  "postalCode": "example-value",
  "country": "example-value",
  "primary": true,
  "effectiveFrom": "example-value",
  "effectiveTo": "example-value"
}
FieldTypeRequiredConstraintsDescription
usestringYesallowableValues: home, work, billing, mailing, temporaryAddress use type.
line1stringYesStreet address line 1. Cannot be cleared.
line2stringNoApt, suite, unit, floor. Optional; clear with n/a.
citystringYesCity or municipality. Cannot be cleared.
statestringYesState / province / region code. Cannot be cleared.
postalCodestringYesZIP or postal code. Cannot be cleared.
countrystringNoCountry name. Valid country names available from /v2/public/countries.
primarybooleanNoMark as primary address. Only one can be primary at a time. Send false to unset (another address must already be primary).
effectiveFromstringNoformat: dateWhen this address became valid in YYYY-MM-DD format. Defaults to current date.
effectiveTostringNoformat: dateWhen this address stopped being valid in YYYY-MM-DD format. Null means current. Send 1970-01-01 to clear the end date (address treated as currently effective).

Responses

200 OK

Address partially updated successfully.

DTO: PatientAddressResponseDTO

{
  "id": 1001,
  "use": "example-value",
  "line1": "example-value",
  "line2": "example-value",
  "city": "example-value",
  "state": "example-value",
  "postalCode": "example-value",
  "country": "example-value",
  "primary": true,
  "effectiveFrom": "2024-01-15",
  "effectiveTo": "2024-01-15",
  "validationStatus": "example-value",
  "validationCandidates": [
    {}
  ]
}
FieldTypeNullableDescription
idLongNoAddress record ID.
useStringNoAddress use type.
line1StringNoStreet address line 1.
line2StringYesApt, suite, unit, floor.
cityStringNoCity or municipality.
stateStringNoState / province / region code.
postalCodeStringNoZIP or postal code.
countryStringYesCountry name.
primaryBooleanYesWhether this is the primary address.
effectiveFromLocalDateYesWhen this address became valid.
effectiveToLocalDateYesWhen this address stopped being valid. Null means current.
validationStatusStringYesAddress validation status.
validationCandidatesList<Map<String, String>>YesCandidate addresses suggested by the validation service. Only populated when validationStatus is 'unverified'.

400 Bad Request

Invalid request. Possible causes: Invalid use value; Invalid date format for effectiveFrom or effectiveTo; effectiveTo is before effectiveFrom; Attempting to clear a required field (line1, city, state, postalCode); Cannot unset primary without setting another address as primary first

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient or address not found.

Example

curl -X PATCH "https://demo.1health.io/api/v3/patient/1001/address/1001" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" -d '{"use": "example-value", "line1": "example-value", "line2": "example-value", "city": "example-value", "state": "example-value", "postalCode": "example-value", "country": "example-value", "primary": true, "effectiveFrom": "example-value", "effectiveTo": "example-value"}'

DELETE/v3/patient/{patientId}/address/{addressId}

Deactivate a patient address

Overview

Soft-deletes an address record. The address is deactivated but preserved for audit trail. Requires authentication. Cannot delete a primary address — first set another address as primary. Returns 404 if the address does not exist.

Authorization

Bearer JWT required. See the authentication guide.

Path Parameters

ParameterTypeRequiredDescription
patientIdLongYesThe ID of the patient.
addressIdLongYesThe ID of the address record to deactivate.

Responses

200 OK

Address deactivated successfully.

DTO: OneHealthResponseDTO

{
  "id": 1001,
  "name": "example-value",
  "message": "example-value"
}
FieldTypeNullableDescription
idLongYes
nameStringYesDTO containing name
messageStringYes

400 Bad Request

Cannot delete primary address — set another as primary first.

401 Unauthorized

Not authenticated — valid session required.

404 Not Found

Patient or address not found.

Example

curl -X DELETE "https://demo.1health.io/api/v3/patient/1001/address/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