Create a Batch Message
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"
}
]
}'
{ "id": "string", "name": "string", "status": "CREATED", "channel": "SMS", "subject": "string", "content": "string" }
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'
{ "id": "string", "name": "string", "status": "CREATED", "channel": "SMS", "subject": "string", "content": "string" }
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'
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'
{ "id": "string", "name": "string", "status": "CREATED", "channel": "SMS", "subject": "string", "content": "string" }
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'
{ "data": [ { … } ], "count": 0 }
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'
Defines if the message will be sent on via Hero's comms tools, and by what method
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).
Flags if the message should be written to the EHR record post-approval
Flags if the message should be encrypted
Flags if the message should be encrypted
Flags if the message should be encrypted
SNOMED code to be attached to the EHR record entry. Default value applied if not passed and write_to_record is true
SNOMED term to be attached to the EHR record entry. Default value applied if not passed and write_to_record is true
Param only considered if API key permissions allow. Automatically writes to the EHR record without requiring Hero admin approval
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"
}'
{ "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" }
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'
{ "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" } }
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'
{ "data": [ { … } ] }
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"
}'
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'
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'