This endpoint retrieves a paginated list of all emergency contacts for a specific employee.
https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contactsPath Parameters
The ID of the organisation.
The ID of the employee.
Query Parameters
Current page index
11Number of items per page
20100Response 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.
Unique identifier for the emergency contact.
The name of the emergency contact.
The phone number of the contact during the daytime.
The phone number of the contact after working hours.
The mobile number of the contact after working hours.
The relationship between the contact and the employee.
The type of the emergency contact.
The address of the emergency contact.
Current page index
11Number of items per page
20100Total items
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.
https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contactsPath Parameters
The ID of the organisation.
The ID of the employee.
Request Body
The type of the emergency contact.
The name of the emergency contact.
The phone number of the contact during the daytime.
The phone number of the contact after working hours.
The mobile number of the contact after working hours.
The relationship between the contact and the employee.
The address of the emergency contact.
Response Body
Returns HTTP 201 Created with the newly created emergency contact.
Unique identifier for the emergency contact.
The name of the emergency contact.
The phone number of the contact during the daytime.
The phone number of the contact after working hours.
The mobile number of the contact after working hours.
The relationship between the contact and the employee.
The type of the emergency contact.
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.
https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts/:idPath Parameters
The ID of the organisation.
The ID of the employee.
The ID of the emergency contact to update.
Request Body
The name of the emergency contact.
The type of the emergency contact.
The phone number of the contact during the daytime.
The phone number of the contact after working hours.
The mobile number of the contact after working hours.
The relationship between the contact and the employee.
The address of the emergency contact.
Response Body
The updated emergency contact.
Unique identifier for the emergency contact.
The name of the emergency contact.
The phone number of the contact during the daytime.
The phone number of the contact after working hours.
The mobile number of the contact after working hours.
The relationship between the contact and the employee.
The type of the emergency contact.
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.
https://api.employmenthero.com/api/v2/organisations/:organisation_id/employees/:employee_id/emergency_contacts/:idPath Parameters
The ID of the organisation.
The ID of the employee.
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.