Generate IC Document Using API
Learn how to generate interactive communication documents using the API and Postman. This process involves obtaining the document ID, authenticating requests, and using pre-fill configurations to render PDFs. Discover how this API can be integrated into applications for dynamic runtime parameter passing and secure authentication.
Transcript
Now that the interactive communication, IC, document has been designed with the appropriate fragments, the next step is to generate the final output. Before generating the document using the API, you must first obtain the ID of the interactive communication. Open the IC in edit mode and make a note of the document ID in the browser URL. This ID uniquely identifies the interactive communication and is required in the API request to ensure the correct template is rendered. The PDF is generated by invoking the communication’s API slash PDF endpoint for a specific interactive communication. The ID of the interactive communication document is included in the API request URL to uniquely identify the template to be rendered. The request must include the appropriate authentication header and a multi-part options payload that defines a pre-fill configuration using the IC underscore FDM service. The caller supplies a user ID as a request parameter, which is forwarded to the underlying forms data model FDM service. The FDM uses this user ID to retrieve the required data from the configured backend service. The retrieved data is then used to pre-fill the communication template and the rendered PDF is returned in the API response. For testing purposes, the document can be rendered using a tool such as Postman. In a production environment, this API would typically be integrated into your application, where the user ID and other parameters are passed dynamically at runtime and the access token is generated securely as part of the authentication flow.
recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69