Employment Hero LogoEmployment Hero

Emergency Contact

This endpoint retrieves a paginated list of all emergency contacts for a specific employee.

GET
https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

employee_iduuidrequired

The ID of the employee.

Query Parameters

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100

Response Body

A paginated list of the emergency contacts belonging to the employee. If there are no more emergency contacts, the resulting array will be empty.

dataobject
itemsobject[]
iduuid

Unique identifier for the emergency contact.

contact_namestring

The name of the emergency contact.

daytime_contact_numberstring

The phone number of the contact during the daytime.

after_hours_nostring

The phone number of the contact after working hours.

after_mobile_nostring

The mobile number of the contact after working hours.

relationshipstring

The relationship between the contact and the employee.

contact_typeenum<string>

The type of the emergency contact.

addressstring

The address of the emergency contact.

page_indexnumber

Current page index

Default1
Min1
item_per_pagenumber

Number of items per page

Default20
Max100
total_itemsnumber

Total items

total_pagesnumber

Total pages

Example

curl -X GET \  "https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"

Response

{  "data": {    "items": [      {        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",        "contact_name": "Daniel Levi",        "daytime_contact_number": "0211111111",        "after_hours_no": "0222222222",        "after_mobile_no": "0433333333",        "relationship": "Spouse",        "contact_type": "primary",        "address": "1 George Street, Sydney NSW 2000"      }    ],    "page_index": 1,    "item_per_page": 20,    "total_items": 1,    "total_pages": 1  }}

This endpoint creates an emergency contact for an employee.

POST
https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

employee_iduuidrequired

The ID of the employee.

Request Body

contact_typeenum<string>required

The type of the emergency contact.

contact_namestring

The name of the emergency contact.

daytime_contact_numberstring

The phone number of the contact during the daytime.

after_hours_nostring

The phone number of the contact after working hours.

after_mobile_nostring

The mobile number of the contact after working hours.

relationshipstring

The relationship between the contact and the employee.

addressstring

The address of the emergency contact.

Response Body

Returns HTTP 201 Created with the newly created emergency contact.

dataobject
iduuid

Unique identifier for the emergency contact.

contact_namestring

The name of the emergency contact.

daytime_contact_numberstring

The phone number of the contact during the daytime.

after_hours_nostring

The phone number of the contact after working hours.

after_mobile_nostring

The mobile number of the contact after working hours.

relationshipstring

The relationship between the contact and the employee.

contact_typeenum<string>

The type of the emergency contact.

addressstring

The address of the emergency contact.

Example

curl -X POST \  "https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \  -H "Content-Type: application/json" \  -d '{    "contact_type": "primary",    "contact_name": "Daniel Levi",    "daytime_contact_number": "0211111111",    "after_hours_no": "0222222222",    "after_mobile_no": "0433333333",    "relationship": "Spouse",    "address": "1 George Street, Sydney NSW 2000"  }'

Response

{  "data": {    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",    "contact_name": "Daniel Levi",    "daytime_contact_number": "0211111111",    "after_hours_no": "0222222222",    "after_mobile_no": "0433333333",    "relationship": "Spouse",    "contact_type": "primary",    "address": "1 George Street, Sydney NSW 2000"  }}

This endpoint updates an existing emergency contact for an employee. Only the fields provided in the request are changed; all other fields keep their current values. At least one field must be provided.

PATCH
https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts/:id

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

employee_iduuidrequired

The ID of the employee.

iduuidrequired

The ID of the emergency contact to update.

Request Body

contact_namestring

The name of the emergency contact.

contact_typeenum<string>

The type of the emergency contact.

daytime_contact_numberstring

The phone number of the contact during the daytime.

after_hours_nostring

The phone number of the contact after working hours.

after_mobile_nostring

The mobile number of the contact after working hours.

relationshipstring

The relationship between the contact and the employee.

addressstring

The address of the emergency contact.

Response Body

The updated emergency contact.

dataobject
iduuid

Unique identifier for the emergency contact.

contact_namestring

The name of the emergency contact.

daytime_contact_numberstring

The phone number of the contact during the daytime.

after_hours_nostring

The phone number of the contact after working hours.

after_mobile_nostring

The mobile number of the contact after working hours.

relationshipstring

The relationship between the contact and the employee.

contact_typeenum<string>

The type of the emergency contact.

addressstring

The address of the emergency contact.

Example

curl -X PATCH \  "https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts/:id" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ" \  -H "Content-Type: application/json" \  -d '{    "daytime_contact_number": "0211111111",    "relationship": "Spouse"  }'

Response

{  "data": {    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",    "contact_name": "Daniel Levi",    "daytime_contact_number": "0211111111",    "after_hours_no": "0222222222",    "after_mobile_no": "0433333333",    "relationship": "Spouse",    "contact_type": "primary",    "address": "1 George Street, Sydney NSW 2000"  }}

This endpoint permanently deletes an emergency contact from an employee.

DELETE
https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts/:id

Path Parameters

organisation_iduuidrequired

The ID of the organisation.

employee_iduuidrequired

The ID of the employee.

iduuidrequired

The ID of the emergency contact to delete.

Response Body

Returns HTTP 204 No Content on success. No response body is included.

Example

curl -X DELETE \  "https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts/:id" \  -H "Authorization: Bearer AUXJ3123xyrj123fdsjkl124aAJKQ"

Response

This endpoint does not return a response body.