I am about to work on a project involving WordPress and ServiceM8 API. One of the idea is to use web leads on the wp side and feed them through the API into ServiceM8. I had a look at the ServiceM8 API Reference online, and could find requests for job contacts, but not contacts by themselves. I reckon that contacts will be kept in the ServiceM8 app. Is it somehow possible to create new contacts (and to update/delete them) using the ServiceM8 API?
Thanks, Jemy09
There's two ways you could do this:
Create the leads as Companies in ServiceM8. The companies endpoint in the ServiceM8 API is how you manage clients. Regardless of whether they're actually companies or individuals, they are always accessed through the Companies endpoint. Once you've created a Company you can add CompanyContacts to store their contact details.
E-mail the leads to the ServiceM8 account's Inbox address. This is probably a better option, as the user will be able to see the number of pending leads by checking the number of unread messages in their ServiceM8 Inbox. You'll also be able to convert the leads directly to ServiceM8 jobs, and you won't be cluttering up the client database with spammy submissions.
More info here - https://support.servicem8.com/hc/en-us/articles/202583884-How-the-inbox-job-card-auto-fill-feature-works-
And overview of the Inbox here - https://support.servicem8.com/hc/en-us/articles/200272654-What-is-the-ServiceM8-Inbox-