# Import staff IDs

Every day @ 12:00 we query the staff endpoint to get all staff IDs.
Invoices Import (opens new window)

The staff list endpoint is: https://api.workflowmax.com/staff.api/list
The individual staff endpoint is: https://api.workflowmax.com/staff.api/get/

The query to get all staff members in our database is:

SELECT staff_id FROM Staff

The query to update all staff member IDs in our database:

UPDATE `Staff` SET `code` = '$activeStaff->PayrollCode', `BaseRate` = '$activeStaff->Phone', `BillableRate` = '$activeStaff->Mobile' WHERE `Staff`.`staff_id` = '$row1[staff_id]'

This is the cron that triggers the script: Staff ID import cron script (opens new window)