This API allows you to add header and footer text in a document. In FX1 documents, the document protection levels are reset when the header and footer are added. This API retains protection levels for FX1 documents.

API

Signature

appendToHeaderFooter2

webService static Boolean appendToHeaderFooter2(Id docId, String headerText, String footerText, String pLevel, String sessionId, String serverUrl)
Request Parameters
NameTypeDescriptionRequired?
docIdIDThe id of the document which will have header and/or footer content add to it.Yes
headerTextStringThe header text to append to the document.Yes
footerTextStringThe footer text to append to the document.Yes
pLevelStringThe protection level to apply to the document. Valid values are:
  • Full access
  • Insert comments only
  • Insert comments and tracked changes only
  • Read only
  • Fill in form fields only
Yes
sessionIdStringThe Salesforce session id.Yes
serverUrlStringThe Salesforce server Url.Yes
Response Parameter
NameTypeDescription
resultBooleanIndicates whether the header and footer were added successfully.

Code Sample

ID docId = 'a0Y61000002K6IR';
String headerText = 'Agreement Id: 0123456789';
String footerText = 'Date Created: 11/27/2018 7:23:15 PM';
String pLevel = 'Full access';
String sessionId = sessionId; //This is the session Id.
String serverUrl = System.Url.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/u/50.0/' + UserInfo.getOrganizationId();
Boolean result = Apttus.MergeWebService.appendToHeaderFooter2(docId, headerText, footerText, pLevel, sessionId, serverUrl);
CODE

Integration Details

Use the following information in your integrations with Apttus Contract Management Web Services API. For information on how to get started, refer to Integrating Conga CLM with External Systems.

API Prerequisites

None.

Request/Response XML

Example Request

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:mer="http://soap.sforce.com/schemas/class/Apttus/MergeWebService">
    <soapenv:Header>
        <mer:sessionId>00D020000008lUh!AQYAQBDMUfqKvlqcVtqEnsqWZ3CvH_9PAn553rGgepU1CKttbRUAm4C8FFgTHrzkd6juez5FF4NEryvZ8ibJC__d7TM.vxCY</mer:sessionId>
    </soapenv:Header>
    <soapenv:Body>
        <mer:appendToHeaderFooter2>
            <mer:docId>a0Z61000052AFIR</mer:docId>
            <mer:headerText>Company</mer:headerText>
            <mer:footerText>Copyright</mer:footerText>
            <mer:pLevel>Full Access</mer:pLevel>
            <mer:sessionId>00D020000008lUh!AQYAQBDMUfqKvlqcVtqEnsqWZ3CvH_9PAn553rGgepU1CKttbRUAm4C8FFgTHrzkd6juez5FF4NEryvZ8ibJC__d7TM.vxCY</mer:sessionId>
            <mer:serverUrl>https://testmanaged--5s20minor.my.salesforce.com/services/Soap/u/50.0/00D020000008lUh</mer:serverUrl>
        </mer:appendToHeaderFooter2>
    </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <appendToHeaderFooter2>
         <result>true</result>
      </appendToHeaderFooter2>
   </soapenv:Body>
</soapenv:Envelope>
XML