API Reference

Employee Events

The data that Workable pushes when an SPI Client is registered to all employee events can be summarised below:

In the above diagram:

  1. Employee Creation: HRIS Admin creates an employee. Workable SPI triggers an employee_created event, notifying the SPI Client with minimal employee information.
  2. Employee Record Update: HRIS Admin updates the employee record. Workable SPI sends an employee_updated event to the SPI Client, including details of the updated fields.
  3. Employee Onboarding Completion: The Employee completes the onboarding workflow. Workable SPI notifies the SPI Client of the onboarding_completed event, including onboarding content.
  4. Employee Record Publication: HRIS Admin publishes the employee record. Workable SPI sends an employee_published event to the SPI Client, including only the Employee ID.
  5. Fetching Detailed Employee Data: Following the employee publication, the SPI Client makes a GET request to Workable SPI to retrieve the complete employee information.

Example Payload - Employee Created

{ "data": { "id": "4d3", "status": "status_draft", "lastname": "Kydde", "firstname": "Obediah", "job_title": "Software Engineer", "department": "4d3", "start_date": "2022-09-13T16:56:33.000Z", "phone_group": [ { "value": { "phone": "+256 873 655 5527", "phone_type": "phone_type_mobile" }, "row_id": "4dc", "history_of": null, "is_primary": true } ], "legal_entity": "6dd32255-668e-4d7a-9542-086fd65c41b0", "personal_email": [ { "value": "okydde0@answers.com", "row_id": "4d7", "history_of": null, "is_primary": true } ], "employee_number": "1" }, "id": "4d3", "resource_type": "employee", "event_type": "employee_created", "fired_at": "2024-01-08T14:01:06.217Z" }

Example Payload - Employee Updated

For the long list of all employee attributes please refer to the /employees/:idsection.

{ "data": { "id": "4d3", "personal_email": [ { "value": "johndoe@workable.com", "row_id": "403ae", "history_of": null, "is_primary": true } ], "address": { "id": "ChIJ8zG0j26ioRQRQ5IgQ3mRBjY", "city": "Nea Ionia", "bounds": { "northeast": "38.0450734802915,23.7490643302915", "southwest": "38.0423755197085,23.7463663697085" }, "coords": "38.0437125, 23.7477801", "status": "PARTIAL_SUCCESS", "country": "Greece", "zip_code": "142 31", "subregion": "Attica", "state_code": "Attica", "street_name": "", "country_code": "GR", "street_number": "", "location_string": "Mersinis 12, Nea Ionia, Greece, 142 31" }, "employment_group": [ { "value": { "employment_status": "employement_type_full_time", "employment_expiry_date": "2024-01-02T00:00:00.000Z", "employment_effective_date": "2023-02-09T00:00:00.000Z" }, "row_id": "4af8", "history_of": null, "is_primary": true } ], "salary_group": [ { "row_id": "4ef0c", "history_of": null, "is_primary": true, "value": { "salary_effective_date": "2024-01-01T00:00:00.000Z", "salary_pay_type": "salary_pay_type_salary", "salary_pay_rate": { "amount": 80000, "currency": "EUR", "frequency": "year" }, "salary_pay_schedule": "salary_pay_schedule_monthly", "salary_overtime_status": "salary_overtime_status_exempt", "salary_justification": "salary_justification_new_hire" } } ] }, "id": "4d3", "resource_type": "employee", "event_type": "employee_updated", "fired_at": "2024-01-08T14:01:06.217Z" }

Onboarding Completed - Example Payload

{ "data": { "employeeFormStep": { "id": "4d3", "firstname": "Obediah", "lastname": "Kydde", "preferred_name": "Oby", "employee_number": "1", "status": "status_active", "address": { "id": "ChIJ8zG0j26ioRQRQ5IgQ3mRBjY", "city": "Nea Ionia", "bounds": { "northeast": "38.0450734802915,23.7490643302915", "southwest": "38.0423755197085,23.7463663697085" }, "coords": "38.0437125, 23.7477801", "status": "PARTIAL_SUCCESS", "country": "Greece", "zip_code": "142 31", "subregion": "Attica", "state_code": "Attica", "street_name": "", "country_code": "GR", "street_number": "", "location_string": "Mersinis 12, Nea Ionia, Greece, 142 31" }, "phone_group": [ { "row_id": "4dc", "history_of": null, "is_primary": true, "value": { "phone_type": "phone_type_mobile", "phone": "+256 873 655 5527" } } ], "work_email": "okydde0@banana.com", "personal_email": [ { "row_id": "4d7", "history_of": null, "is_primary": true, "value": "okydde0@apple.com" } ], "social_group": [], "allergies": [], "dietary_restrictions": [], "garment_size_group": [], "job_title": "Software Engineer", "start_date": "2022-09-13T16:56:33.000Z", "legal_entity": "6dd32255-668e-4d7a-9542-086fd65c41b0", "department": "4d3", "marital_status_group": { "marital_status": "marital_status_married" }, "phone_type": "phone_type_mobile", "phone": "+256 873 655 5527", "avatar": "officedroid/uploads/1/avatar.jpg" }, "signatureDocuments": { "employeeDocuments": [ { "id": "4d5", "filepath": "https://subdomain.workable.com/spi/v3/documents/4d5" } ] } }, "id": "4d3", "resource_type": "employee", "event_type": "onboarding_completed", "fired_at": "2024-01-08T14:01:06.217Z" }

Employee Published - Example Payload

{ "data": { "workEmail": "okydde0@banana.com" }, "id": "4d3", "resource_type": "employee", "event_type": "employee_published", "fired_at": "2024-01-08T14:01:06.217Z" }

Timeoff Updated (Approved) - Example Payload

{ "data": { "id": "3647", "state": "approved", "to_date": "2024-05-17T00:00:00.000", "from_date": "2024-05-15T00:00:00.000", "half_days": [], "updated_at": "2024-05-15T12:58:55.491Z", "updated_by": "Nikos Dimos", "category_name": "Paid time off", "formatted_period": "15 May 2024 - 17 May 2024", "requesting_total": 3, "timeoff_tracking_unit": "full_days" }, "id": "4dd", "resource_type": "employee", "event_type": "timeoff_request_approved", "fired_at": "2024-05-15T12:58:59.365Z" }

Timeoff Updated (Reverted) - Example Payload

{ "data": { "id": "3648", "state": "canceled", "to_date": "2024-06-13T00:00:00.000", "from_date": "2024-06-12T00:00:00.000", "half_days": [], "updated_at": "2024-05-15T13:03:47.059Z", "updated_by": "Nikos Dimos", "category_name": "Sick leave", "formatted_period": "12 June 2024 - 13 June 2024", "requesting_total": 2, "timeoff_tracking_unit": "half_days" }, "id": "4dd", "resource_type": "employee", "event_type": "timeoff_request_reverted", "fired_at": "2024-05-15T13:03:49.764Z" }