Hero Health Public API (1.0.0)

Download OpenAPI description
Languages
Servers
Mock server
https://developer.herohealth.net/_mock/apis/public-api/openapi/
Staging
https://api.staging.htech.app/
Production
https://api.herohealth.net/

Practice Group

Operations

Admin

Operations

Booking

Operations

Utilities

Operations

Messages

Operations

Create a Batch Message

Request

Create a Batch Message

Bodyapplication/jsonrequired
namestringrequired
channelstringrequired
Enum"SMS""EMAIL""NHS_APP"
subjectstring

The subject is required when channel = EMAIL

contentstringrequired
recipientsArray of objects or objectsrequired
One of:
recipients[].​nhs_numberstringrequired
recipients[].​dobstring or null(date-time)required
curl -i -X POST \
  https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/batch_message \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE' \
  -d '{
    "name": "string",
    "channel": "SMS",
    "subject": "string",
    "content": "string",
    "recipients": [
      {
        "nhs_number": "string",
        "dob": "2019-08-24T14:15:22Z"
      }
    ]
  }'

Responses

Ok

Bodyapplication/json
idstringrequired
namestringrequired
statusstringrequired
Enum"CREATED""PENDING""SENDING""COMPLETED"
channelstringrequired
Enum"SMS""EMAIL""NHS_APP"
subjectstring
contentstringrequired
Response
application/json
{ "id": "string", "name": "string", "status": "CREATED", "channel": "SMS", "subject": "string", "content": "string" }

List Batch Messages

Request

List Batch Messages

Query
page_sizeinteger
page_indexinteger
statusstring
Enum"CREATED""ENRICHMENT_ERROR""ENRICHED""INVALID_PAYLOAD""QUEUED"
curl -i -X GET \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/batch_message?page_index=0&page_size=0&status=CREATED' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
idstringrequired
namestringrequired
statusstringrequired
Enum"CREATED""PENDING""SENDING""COMPLETED"
channelstringrequired
Enum"SMS""EMAIL""NHS_APP"
subjectstring
contentstringrequired
Response
application/json
{ "id": "string", "name": "string", "status": "CREATED", "channel": "SMS", "subject": "string", "content": "string" }

Send a Batch Message

Request

Send a Batch Message

Path
idstringrequired
curl -i -X PATCH \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/batch_message/{id}/send' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Response
No content

Get a Batch Message

Request

Get a Batch Message

Path
idstringrequired
curl -i -X GET \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/batch_message/{id}' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
idstringrequired
namestringrequired
statusstringrequired
Enum"CREATED""PENDING""SENDING""COMPLETED"
channelstringrequired
Enum"SMS""EMAIL""NHS_APP"
subjectstring
contentstringrequired
Response
application/json
{ "id": "string", "name": "string", "status": "CREATED", "channel": "SMS", "subject": "string", "content": "string" }

List Batch Message Recipients

Request

List Batch Message Recipients

Path
idstringrequired
Query
page_sizeinteger
page_indexinteger
statusstring
Enum"CREATED""ENRICHMENT_ERROR""ENRICHED""INVALID_PAYLOAD""QUEUED"
curl -i -X GET \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/batch_message/{id}/recipients?page_index=0&page_size=0&status=CREATED' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
dataArray of objectsrequired
data[].​enrichment_statusstringrequired
Enum"CREATED""ENRICHMENT_ERROR""ENRICHED""INVALID_PAYLOAD""QUEUED"
data[].​first_namestring
data[].​last_namestring
data[].​nhs_numberstring
data[].​mobilestring
data[].​emailstring
countnumberrequired
Response
application/json
{ "data": [ {} ], "count": 0 }

List Batch Message Sends

Request

List Batch Message Sends

Path
idstringrequired
Query
page_sizeinteger
page_indexinteger
statusstring
Enum"CREATED""QUEUED""SENT""ERROR""SUCCESS"
curl -i -X GET \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/batch_message/{id}/messages?page_index=0&page_size=0&status=CREATED' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
dataArray of objectsrequired
data[].​idstringrequired
data[].​statusstringrequired
data[].​subjectstring or null
data[].​recipientstringrequired
data[].​channelstringrequired
Enum"SMS""EMAIL""NHS_APP"
data[].​contentstringrequired
data[].​sent_atstring or null(date-time)required
data[].​created_atstring or null(date-time)required
countnumberrequired
Response
application/json
{ "data": [ {} ], "count": 0 }

Send a Message

Request

Sends a message for a given patient to Hero. It has optional parameters relating to the message being sent.

Bodyapplication/jsonrequired
patient_idstring^\d+$required

The Hero patient the message relates to

message_typestringrequired

Defines if the message will be sent on via Hero's comms tools, and by what method

Enum"hero""sms""email""nhs_app"
message_stringstringnon-emptyrequired

Message content to be sent from Hero

recipient_contact_detailstring

Where the message will be sent (e.g. patient@email.com or +44 79000000000). If no value is provided a default will be picked from the patients record (for that contact method, SMS/Email).

fallback_contact_detailstring
fallback_message_typestring
Enum"sms""email"
write_to_recordboolean

Flags if the message should be written to the EHR record post-approval

Default false
encryptedboolean or string

Flags if the message should be encrypted

Default false
One of:

Flags if the message should be encrypted

boolean

Flags if the message should be encrypted

Default false
snomed_codestring

SNOMED code to be attached to the EHR record entry. Default value applied if not passed and write_to_record is true

snomed_termstring

SNOMED term to be attached to the EHR record entry. Default value applied if not passed and write_to_record is true

auto_write_to_recordboolean

Param only considered if API key permissions allow. Automatically writes to the EHR record without requiring Hero admin approval

Default false
task_idstring

Task ID to be attached to a task

attachment_uuidstringnon-empty
short_link_idstringnon-empty
assignee_idnumber

Optional. ID of the Admin or AdminTeam assigned to the message

assignee_typestring

Type of the assignee, either Admin or AdminTeam, assigned to the message

send_atstring(date-time)

Specifies the scheduled date and time to send the message.

curl -i -X POST \
  https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/messages/send \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE' \
  -d '{
    "patient_id": "string",
    "message_type": "hero",
    "message_string": "string",
    "recipient_contact_detail": "string",
    "fallback_contact_detail": "string",
    "fallback_message_type": "sms",
    "write_to_record": false,
    "encrypted": false,
    "snomed_code": "string",
    "snomed_term": "string",
    "auto_write_to_record": false,
    "task_id": "string",
    "attachment_uuid": "string",
    "short_link_id": "string",
    "assignee_id": 0,
    "assignee_type": "string",
    "send_at": "2019-08-24T14:15:22Z"
  }'

Responses

Ok

Bodyapplication/json
message_idstringrequired
contentstringrequired
created_atstringrequired
snomed_codestring or null
write_to_recordbooleanrequired
auth_tokenstring or null
confirm_write_to_record_urlstring or null
submitted_bystring or null
send_atstring or null(date-time)
Response
application/json
{ "message_id": "string", "content": "string", "created_at": "string", "snomed_code": "string", "write_to_record": true, "auth_token": "string", "confirm_write_to_record_url": "string", "submitted_by": "string", "send_at": "2019-08-24T14:15:22Z" }

Get Message Status

Request

Retrieve message write to record and send status

Path
idstringrequired
curl -i -X GET \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/messages/{id}/status' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
idstringrequired
scheduled_send_atstring or null(date-time)required
write_to_recordbooleanrequired
statusobjectrequired
status.​write_to_record_atstring or null(date-time)required
status.​sent_atstring or null(date-time)required
status.​responsestringrequired
Enum"delivered""declined""sent""pending""retry""fatal"
status.​failure_reasonstring or nullrequired
errorsobjectrequired
errors.​write_to_recordstring or nullrequired
errors.​sendstring or nullrequired
Response
application/json
{ "id": "string", "scheduled_send_at": "2019-08-24T14:15:22Z", "write_to_record": true, "status": { "write_to_record_at": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "response": "delivered", "failure_reason": "string" }, "errors": { "write_to_record": "string", "send": "string" } }

List Assignee Collection

Request

Retrieve a list of all assignees including Admin or AdminTeam for the requesting practice group and admin

curl -i -X GET \
  https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/messages/assignee/collection \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
dataArray of objectsrequired
data[].​labelstringrequired
data[].​valuenumber or nullrequired
data[].​typestringrequired
data[].​keystringrequired
Response
application/json
{ "data": [ {} ] }

Validate a SNOMED Code

Request

Bodyapplication/jsonrequired
codestringrequired
curl -i -X POST \
  https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/snomed/validate \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE' \
  -d '{
    "code": "string"
  }'

Responses

Ok

Bodyapplication/json
validbooleanrequired
Response
application/json
{ "valid": true }

List Templates

Request

Retrieves a list of message templates for the requesting practice group.

Query
has_follow_upboolean
curl -i -X GET \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/templates?has_follow_up=true' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
dataArray of objectsrequired
data[].​idstringrequired
data[].​namestringrequired
data[].​contentstringrequired
data[].​linkstring
Default "no_link"
Enum"no_link""booking""form"
data[].​typestring
Default "hero"
Enum"hero""external""user"
data[].​sms_snomed_codestring or null
data[].​sms_follow_up_1_snomed_codestring or null
data[].​sms_follow_up_2_snomed_codestring or null
data[].​email_snomed_codestring or null
data[].​email_follow_up_1_snomed_codestring or null
data[].​email_follow_up_2_snomed_codestring or null
data[].​send_follow_up_oneboolean
Default false
data[].​send_follow_up_twoboolean
Default false
data[].​reminder_timenumber or null
countnumberrequired
Response
application/json
{ "data": [ {} ], "count": 0 }

List Sent Messages

Request

Retrieves a list of all sent messages.

Query
page_indexstring
page_sizestring
order_bystring
Enum"patient_first_name""patient_last_name""patient_full_name""created_at""sent_at"
order_descendingboolean
patient_first_namestring
patient_last_namestring
patient_full_namestring
patient_idstring
recipient_contact_detailstring
write_to_record_statusstring
Enum"success""failed""not_written"
message_typestring or Array of strings
One of:
string
Enum"nhs_app""email""hero""sms"
short_link_idstring
short_link_typestring
campaign_idstring
statusstring or Array of strings
One of:
string
Enum"delivered""declined""sent""pending""retry""fatal"
scheduledboolean
sent_bystring
sent_at[]Array of strings
scheduled_at[]Array of strings
curl -i -X GET \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v2/sent_messages?campaign_id=string&message_type=nhs_app&order_by=patient_first_name&order_descending=true&page_index=string&page_size=string&patient_first_name=string&patient_full_name=string&patient_id=string&patient_last_name=string&recipient_contact_detail=string&scheduled=true&scheduled_at%5B%5D=string&sent_at%5B%5D=string&sent_by=string&short_link_id=string&short_link_type=string&status=delivered&write_to_record_status=success' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
dataArray of objectsrequired
data[].​idstring or null^\d+$
data[].​patientobjectrequired
data[].​patient.​idstring^\d+$required
data[].​patient.​titlestring or nullrequired
Enum"Baron""Baroness""Brigadier""Count""Colonel""Countess""Captain""Dame""The Dowager Viscountess""Dr"
data[].​patient.​first_namestringrequired
data[].​patient.​last_namestringrequired
data[].​write_to_recordobjectrequired
data[].​write_to_record.​write_to_record_atstring or null(date-time)required
data[].​write_to_record.​statusstring or nullrequired
data[].​write_to_record.​failure_reasonstring or nullrequired
data[].​short_linkobject or nullrequired
data[].​short_link.​idstring or null^\d+$
data[].​short_link.​typestring or null
data[].​short_link.​namestring or null
data[].​short_link.​statusstring or null
data[].​campaignobject or nullrequired
data[].​campaign.​idstring or null^\d+$
data[].​campaign.​namestring or null
data[].​created_atstring or null(date-time)required
data[].​sent_atstring or null(date-time)required
data[].​scheduled_atstring or null(date-time)required
data[].​statusstringrequired
data[].​sent_bystringrequired
data[].​recipient_contact_detailstringrequired
data[].​message_typestringrequired
countnumberrequired
Response
application/json
{ "data": [ {} ], "count": 0 }

Care Navigation

Operations

Form

Operations

Form Response

Operations

Invoicing

Operations

Patients

Operations

Prescription

Operations

Task

Operations

Webhooks

Operations

Prescriptions

Operations