Skip to content

Register a Patient using PDS

Request

Register a patient by tracing them against the NHS Spine via PDS (Personal Demographics Service). Provide an NHS number and date of birth, or alternatively a combination of forename, surname, DOB, and postcode.

If the patient already exists in Hero for this practice group, their existing patient_id is returned. If not found, Hero will create a new patient record using the demographics retrieved from PDS.

Common use case: Call this endpoint before sending a message or creating a booking to obtain the Hero patient_id.

Security
apiKeyAuth and practiceGroupId
Bodyapplication/jsonrequired
One of:
nhs_numberstringrequired

A valid NHS number

dobstring or null, (date-time)required
ehr_partnerstring, non-empty
ehr_partner_idstring, non-empty
curl -i -X POST \
  https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/patients/register_pds \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE' \
  -d '{
    "nhs_number": "string",
    "dob": "2019-08-24T14:15:22Z",
    "ehr_partner": "string",
    "ehr_partner_id": "string"
  }'

Responses

Ok

Bodyapplication/json
One of:
patient_idstring^\d+$required
Response
{ "patient_id": "string" }