We are building an integration between Servicem8 and Unleashed and I'm trying to find out if we can get the staff member the job is scheduled to via the Servicem8 API.
If not, is there another way for us to identify the staff member?
We are building an integration between Servicem8 and Unleashed and I'm trying to find out if we can get the staff member the job is scheduled to via the Servicem8 API.
If not, is there another way for us to identify the staff member?
You can determine if a job is scheduled by querying the jobActivity endpoint. Records with activity_was_scheduled
== 1 are scheduled bookings (records with activity_was_scheduled
== 0 are check-ins recorded for the job).
JobActivity records have a staff_uuid
property which tells you the Staff member assigned to that scheduled booking.
GET https://api.servicem8.com/api_1.0/JobActivity.json?%24filter=job_uuid%20eq%20'your_job_uuid_here'
Note that you can have multiple scheduled bookings per job, each assigned to different staff.