Skip to main content
Version: 2.8

Configuring callbacks on conversion REST queries

Conversion requests are asynchronyous. At first, you only get the conversion job ID as a response from the Conversion server, and need to query for the job status. However, if you define callback parameters in your REST query, you will get a callback POST HTTP request to the provided endpoint when the conversion job is completed.

  1. From the landing page, open the API link under a repository:

    Repositories landing page

    The OpenAPI page opens, showing the available Document.One (D1) endpoints.

The callback parameters are available on the Conversion endpoints (/convert):

NameRequiredData typeDescription
restCallback.urlfalsestring (formData)The URL where the POST HTTP request containing the callback request is sent after the conversion job is finished.
restCallback.customDatafalsestring (formData)Any data that should be forwarded with the callback. This helps the callback processor to identify the work item that has been finished.
restCallback.basicAuthenticationPasswordfalsestring (formData)The password used for authentication on the target endpoint (if required). Note that the password should be encrypted. D1 packages contain an encryption script which you can use for that purpose.
restCallback.basicAuthenticationUserfalsestring (formData)The username used for authentication on the target endpoint (if required).

For code samples on different types of conversion, see

Convert content to images, PDFs, or e-mail by ID:

Convert to email by IDs
Convert to image by ID
Convert to PDF by ID

Merge contents or templates by ID:

Merge by IDs
Merge templates by IDs

Search and replace content by ID:

Search and replace by ID
Search and replace by ID single search

Apply templates or watermarks by ID:

Apply template by ID
Apply watermark by ID

Extract text by ID:

Extract text by ID

Split content by ID:

Split by ID

Create document representation by ID:

Create document representation by ID

Having configured callback parameters, try sending a conversion request you should get a callback now when the job is finished.