-1

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?

Christian Gollhardt
  • 16,510
  • 17
  • 74
  • 111
NKent
  • 1
  • I might be missing something but browsing the Servicem8 web site I do not see any C++ APIs. Why is this question tagged C++? – harmic Jun 07 '17 at 01:10
  • No you aren't missing anything. I am not a developer but work with developers and I am updating our scoping document for the client. Servicem8 told us to come on here if we had API questions and this forum forced me to add a tag. I just added the first one which was C++ – NKent Jun 07 '17 at 01:52
  • 1
    You should not tag a question that is not appropriate. I retagged it with some more appropriate tags. Also please read https://stackoverflow.com/help/how-to-ask – harmic Jun 07 '17 at 02:08
  • Well @harmic I think that it isn't appropriate for ServiceM8 to send me to this site when clearly it isn't for non developers - Sorry I bothered you. – NKent Jun 07 '17 at 05:29

1 Answers1

0

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.

telomere
  • 338
  • 3
  • 10