Below is some of my code to submit a single Fax. It looks like the @ref needs to match the ContentPartType Item for the submit to work. I was wondering if the ContentPartType is needed, or if there is a way to simplify this code in any way?
// Setup Documents
PremiereConnect.DocumentType[] JS_Documents = new PremiereConnect.DocumentType[1]; // could be 2..n if sending multiple documents
JS_Documents[0] = new PremiereConnect.DocumentType();
PremiereConnect.DocDataType DocData = new PremiereConnect.DocDataType();
DocData.format = PremiereConnect.DocEncodingFormat.base64; // other option is text
DocData.Value = faxDocumentB64; // my String with the Base64 encoded content
JS_Documents[0].Item = DocData;
JS_Documents[0].Filename = fileName; // Is this needed?
JS_Documents[0].DocType = docType; // "HTML", "PDF", "MSW" for MS Word
JS_Documents[0].ItemElementName = PremiereConnect.ItemChoiceType1.DocData;
JS_Documents[0].@ref = "Doc1"; // this value needs to match up with the Item - do we need the ContentPartType and a matching key?
// Setup ContentPartType
PremiereConnect.ContentPartType[] JS_Content = new PremiereConnect.ContentPartType[1];
JS_Content[0] = new PremiereConnect.ContentPartType();
// Setup references to documents
JS_Content[0].Item = "Doc1"; // needs to match what is in DocumentType
JS_Content[0].Treatment = PremiereConnect.TreatmentType.body; // Other choices: attachment, docfx, exBanner, pullfile, voice_all, voice_**** ..
JS_Content[0].TreatmentSpecified = true; // do we need a treatment type?
JS_Message[0].Contents = JS_Content;
JS_Request.Message = JS_Message;
JS_Request.DocumentSet = JS_Documents;
PremiereConnect.FaxType[] JS_FaxTypeArray = new PremiereConnect.FaxType[1];
JS_FaxTypeArray[0] = new PremiereConnect.FaxType();
JS_FaxTypeArray[0].Phone = faxAttr.faxnumber;
PremiereConnect.EncodableStringType To_Address = new PremiereConnect.EncodableStringType();
To_Address.Value = faxAttrTo; // String with the destination Fax number
JS_FaxTypeArray[0].To = To_Address;
JS_Message[0].Destinations = JS_FaxTypeArray;
JS_Result = PC.JobSubmit(JS_Request);