Use the Cloud Services APIs to Create a Host Application
There are certain procedures and techniques that need to be implemented for any host application. Beyond that, depending on the needs and complexity of your host application, you may use one or more HotDocs Cloud Services APIs to achieve your desired results.
Common Principles
Regardless of which web services API you use to integrate with Cloud Services, you must understand some basic characteristics of the methods you will call. Each Cloud Services method has a set of common parameters, as well as method-specific parameters. Common parameters, such as the subscriberID, hmac, and packageID, are used to verify that the call is being made by a valid subscriber and to locate the template to use with the request in the Cloud Services template cache.
Therefore be sure to review how template packages are cached and how to securely make calls to the web services by calculating a valid Hash-based Message Authentication Code (HMAC) for each call. Sending a template package at the wrong time, not sending it at the right time, or sending an incorrect HMAC value will all prevent you from receiving the desired response from your request.
"Direct" Web Services API
The Direct Web Services API allows low-level, direct access to HotDocs functionality for things like generating browser-based interviews (for placement directly within your own web pages), assembling documents, requesting metadata about templates, etc.. It can be used to create full-featured and powerful integrations, but it requires you to understand a good deal about how browser interviews work and interact with your host application.
The web services that are part of the Direct API (accessible via either SOAP or REST) can be used on their own to create a full integration, or they can be used selectively in combination with the Embedded API.
HotDocs Embedded API
The HotDocs Embedded API simplifies the process of displaying interviews, managing assembly queues and assembling documents in a host application. The API works by "embedding" a HotDocs browser interview in an IFrame within your host application's web page; it allows you to get started quickly and add deeper integration as you go.
The Embedded API is exposed via REST web services; it can be used on its own or in combination with calls to the Direct API.
HotDocs Embedded API is only available for use with templates created in Developer 11.0.1 and later.
.NET Client Library
If your host application is written in ASP.NET, take advantage of the .NET Client Library to simplify access to all of the above.
To add a reference to the Cloud Services client library in Visual Studio
- In Solution Explorer, right-click the name of the project to which you want to add the service, and then select Add Reference from the shortcut menu. The Add Reference dialog box appears.
- At the Browse tab, navigate to the location where you have saved HotDocs.Cloud.Client.dll, and then click OK . A reference to the Cloud Services client library is added to your project.