This article describes the dox42 Server service interface:
The dox42 Server is accessible via a SOAP and a REST web service interface.
Interface | URL |
SOAP |
WSDL: |
REST |
|
Operations
GenerateDocument/GenerateSlides
The operation can be performed using the following parameters:
Parameter name | Type | Description |
| String | Specifies the path to the document template. Example:
|
| Key-Value String/String | Specifies the list of the input parameters and values:
|
| Specifies the list of PostGenerateActions to process after generating the document:
|
GenerateSpreadSheet
The operation can be performed using the following parameters:
Parameter name | Type | Description |
| String | Specifies the path to the data map. Example:
|
| Key-Value String/String | Specifies the list of the input parameters and values:
|
| Specifies the list of PostGenerateActions to process after generating the document:
|
Refer to the parameter descriptions of the individual dox42 Server Output Actions.
REST Interface Parameters
The parameters and output actions for the REST and the SOAP interface are identical. The REST interface uses the following URL parameter syntax. Starting from version 3.6.3 you can also pass all parameters via POST
:
Parameter | Requirement | Description |
| mandatory | Specifies the operation to call:
|
| mandatory if | Specifies the path of the document template. |
| mandatory if | Specifies the path of the data map. |
| For each input parameter | Specifies the values for input parameters. Example: |
| For each parameter of each Output Action | Specifies the values for Output Action parameters Example: |
| optional | Controls how the web browser handles the returned document: Values:
|
| optional | Uses text to render the content of the generated document directly in the browser as text. This text may be HTML. Values:
|
| optional, only if | Specifies the name of the returned document. |
| optional, only without ReturnAction | Redirects to this page after generation. |
| optional | If true, REST calls return information about saved files as JSON. |
Use URL-Encoding!
Example:
„Customer.Name=Müller" => „Customer.Name=M%C3%BCller"
See http://www.w3schools.com/tags/ref_urlencode.asp for more information.
Note
Use the syntax
<%datasource.datafield%>
as a placeholder for dynamic values in your calls.
Sample for a REST call
https://mydox42tenant.dox42.online?
Operation=GenerateDocument&
DocTemplate=https%3A%2F%2FmySharePoint%2FTemplates%2FSalesReport.docx&
InputParam.SelectEmployee=5&
InputParam.SelectYear=&
ReturnAction.Format=PDF&
ReturnAction.Filename=SalesReport_%3C%25EmployeeName%25%3E.pdf
Note
You can easily configure your dox42 calls with our dox42 Service Designer application, which you can download from our website.
HTTP Request Body
In case you need to transfer lots of data to the dox42 Server you better do that as POST
parameters or in the request body. To extract the request body you need to define an InputParameter of the name “request body” in your data map. The data from the HTTP request body is stored in this InputParameter and can be processed using, for example, an XML/JSON data source.
Service Header
A service header secures the dox42 SOAP service. This header contains the username and the password. Use the web.config file to configure the utilisation of the service header (see configuration options for the web.config file.)
Entra ID Header
The dox42 service can process an authorization header, containing an Entra ID token.
JavaScript Example:
xhttp.setRequestHeader("Authorization", 'Bearer ' + token);
HTTP Metadata Header and Base64 Metadata Header
Starting from version 4.6 you can send a custom string containing data fields in a dedicated dox42 HTTP header called dox42MetaData
. Here is an example of such a string. The header will be returned with data fields replaced:
{"sender": "<%User.mail%>"
"receiver": "<%Customer.mail%>"
"subject": "Here is your document. <%quote.number%>"}
Note
Starting from version 4.6.4 you can also use
dox42MetaDataBeaderBase64
to send base64 encoded metadata in your header.