Return to main navigation Page
The documentGenerator REST API allows an external system to send a REST call to request a published Document Designer document from CPQ Cloud based on simple parameters.
When executed correctly, the external system will receive the URL of the document in the Location header of the REST response from CPQ Cloud.
The call must contain HTTP Basic Authentication with valid CPQ Cloud FullAccess credentials in the header, as well as the Commerce Process, Document Designer template, Transaction ID, language, and output type that the document will be generated by specified in the body.
POST—Returns the URL of a document generated by a Document Designer template.
GET—Returns schema for the resource (REST call does not require a payload).
||The base URL of the CPQ Cloud site.|
|Headers||Accept (Basic Authentication with valid CPQ Cloud FullAccess credentials)|
(Parameters Bolded and Red)
"processVarname":"[Process Var Name]",
The variable name of the Commerce Process.
All Commerce Processes’ variable names are listed in the REST API metadata schema. See the Document Generator REST API Metadata section for more information.
The name of the Document Designer Template.
All Document Designer template names (and the Commerce Processes they are in) are listed in the REST API metadata schema. See the Document Generator REST API Metadata section for more information.
The Transaction ID of the Transaction from which the document will be generated.
The language code of the language in which the document will be generated.
All language codes are listed in the REST API metadata schema. See the Document Generator REST API Metadata section for more information.
The output type in which the document will be generated.
All output formats are listed in the REST API metadata schema. See the Document Generator REST API Metadata section for more information.
|HTTP Methods||POST, GET (Does not require a payload)|
204 – Success
POST—The URL of the generated document will be in the response’s Location header.
GET—The schema of the resource will be in the response body.
400 – Bad request
An error message will say whether the Commerce Process variable name, Transaction ID, template, language, output, or a combination of those parameters were not found, or if there was an error deploying or printing the template.
401 – Unauthorized
Valid CPQ Cloud FullAccess credentials were not provided in the header.
|Sample URI Endpoint||
In addition to getting the schema through a GET call, when writing documentGenerator REST API calls, admins can access the resource’s metadata schema through the Interface Catalogs. Navigate to the Interface Catalogs by clicking Admin to go to the Admin Home Page and then clicking Interface Catalogs in the Integration Platform section. Clicking the documentGenerator resource will open the metadata schema in a new window.
The metadata schema includes all possible Commerce Process variable names (
processVarname), Document Designer template names (
templateName), language codes (
languageCode), and output formats (
in each corresponding description object that can be used in a REST
call to the documentGenerator API, and should be used to inform REST
calls that are being written. The following screenshot shows a sample
documentGenerator resource metadata schema.
For more information on the Interface Catalogs, see Interface Catalog.