Q:

ServiceM8 Development in C# (Contact Details and job sync)

I just wanna ask How to sync the data of Contact Details to Jobs. I have tried them under the same UUID's but the Job is getting the Company Name(Client) only so basically my Job Record has name in Company column only, there is no Contact First and Contact Last which is the Company Contact.
Thanks! Kudos to all the guys here.

A:

Create the Company (i.e. client/customer) record, fetch its UUID via the x-record-uuid HTTP header.
Create the Job record, set the company_uuid field to the UUID of the Company. Fetch the UUID of the Job via the x-record-uuid header.
Create JobContact record(s), setting the job_uuid field to the UUID of the job you just created. You also need to set the type field to JOB or BILLING (case sensitive)

Note that you can also create CompanyContact records but these are only used for future jobs created for that company via the ServiceM8 UI. They don't affect jobs directly, and they aren't automatically used if you create jobs via the API.

