Discussions
When using the api to add an attachment to a job it is marked as inactive and is not showing in the job
about 1 year ago by Shane Way(edited)
Even using the API reference to test is as show here has the same results
var options = new RestClientOptions("https://api.servicem8.com/api_1.0/attachment.json");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("accept", "application/json");
request.AddHeader("authorization", "Basic REDACTED");
request.AddJsonBody("{"active":1,"related_object":"Job","related_object_uuid":"98e0214e-6061-4437-bfde-206884498f5b","attachment_name":"TV Version.png","file_type":".png","attachment_source":"M:\\RFMS\\Swift\\","uuid":"4429a30b-c2af-450c-983b-20688a951e4b"}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);