documentation

Patient Vault v3 API

Address

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

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

REST API for managing patient physical addresses in the Patient Vault. Provides full CRUD operations for patient address records including Google Address Validation integration for address standardization.

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.

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.

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.
useStringYesAddress use type.
line1StringYesStreet address line 1.
line2StringYesApt, suite, unit, floor.
cityStringYesCity or municipality.
stateStringYesState / province / region code.
postalCodeStringYesZIP 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.

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.
useStringYesAddress use type.
line1StringYesStreet address line 1.
line2StringYesApt, suite, unit, floor.
cityStringYesCity or municipality.
stateStringYesState / province / region code.
postalCodeStringYesZIP 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.

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.
useStringYesAddress use type.
line1StringYesStreet address line 1.
line2StringYesApt, suite, unit, floor.
cityStringYesCity or municipality.
stateStringYesState / province / region code.
postalCodeStringYesZIP 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.

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.
useStringYesAddress use type.
line1StringYesStreet address line 1.
line2StringYesApt, suite, unit, floor.
cityStringYesCity or municipality.
stateStringYesState / province / region code.
postalCodeStringYesZIP 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.

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