This API allows you to append the given text to the header and footer for a given document. 

Note

appendToHeaderFooter does not support protection levels for FX1 documents (FX2 documents do support document protection). Document protection levels are reset when header and footer are added. To retain protection levels for FX1 documents, use appendToHeaderFooter2instead.

API

Signature

appendToHeaderFooter

webService static Boolean appendToHeaderFooter(Id docId, String headerText, String footerText, String sessionId, String serverUrl)
Request Parameters
NameTypeDescriptionRequired?
docIdIDThe id of the document which will have header and footer content added to it.Yes
headerTextStringThe header text to be appended to the document.Yes
footerTextStringThe footer text to be appended to the document.Yes
sessionIdStringThe Salesforce session id.Yes
serverUrlStringThe Salesforce server Url.Yes
Response Parameter
NameTypeDescription
resultBooleanIndicates whether the header and footer are added successfully.

Code Sample

ID docId= AttachmentId;
String headerText = 'This is Header';
String footerText = 'This is Footer'; 
String apiServerURL = System.Url.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/u/49.0/' +
UserInfo.getOrganizationId();
String SessionId = sessionId; //This is the session Id.
String generatedDocId = Apttus_Proposal.MergeWebService.appendToHeaderFooter(docId, headerText, footerText, 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 Apttus 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:appendToHeaderFooter>
            <mer:docId>068R0000001Z56SIAS</mer:docId>
            <mer:headerText>Care Company</mer:headerText>
            <mer:footerText>Copyright 2020</mer:footerText>
            <mer:sessionId>00D020000008lUh!AQYAQBDMUfqKvlqcVtqEnsqWZ3CvH_9PAn553rGgepU1CKttbRUAm4C8FFgTHrzkd6juez5FF4NEryvZ8ibJC__d7TM.vxCY</mer:sessionId>
            <mer:serverUrl>https://testmanaged--5s20minor.my.salesforce.com/services/Soap/u/49.0/00D020000008lUh</mer:serverUrl>
        </mer:appendToHeaderFooter>
    </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

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