1. Introduction
    1. Service description
    2. Environments
  2. Getting started
    1. Authentication
    2. Upload document
    3. Create dossier
    4. Send invites
    5. Dossier download
  3. Events
    1. Event webhooks
    2. Subscribe to events
    3. Retrieve status callback
  4. Error handling
  5. Use cases
    1. Change language / locale
    2. Send invite using SMS
    3. Send invite using WhatsApp Business Platform
    4. Include invite in your own system
    5. Require identification
    6. Require payment
    7. Cancel a dossier
    8. Configure branding
    9. Configure invitee emails
    10. Create dossier based on a template
  6. Swagger API documentation

Create a dossier based on a template

Sometimes users want to generate a dossier based on a template, for example a rental agreement. In the API it is possible to create a dossier based on an existing template created via the dashboard. Within the dashboard, new templates can be created and existing templates can be edited or deleted.

Note: only templates with document(s) are supported

To create a dossier based on an existing template, the template ID needs to be obtained. This ID can be obtained by logging in to the dashboard and going to the Templates section. If you haven't created a template already, you can create one in this section. Hover over the template with document(s) and click on the info icon at the end of the line. A window containing the template ID will be shown. The template ID can be copied and used to create the dossier via the API. An example of a template ID is 06c2e210-54a8-417f-adf2-fc767c31c929.

To create the dossier add the obtained template ID to the template field in the request body.

Note: make sure you add the same amount of invitees to the dossier as configured in the template.

Request

POST https://api.cmdisp.com/sign/v1/dossiers

Request headers

Content-Type: application/json
Authorization: Bearer GENERATED_TOKEN_HERE

Request body

{
    "name": "Rental agreement based on an existing template",
    "template": "06c2e210-54a8-417f-adf2-fc767c31c929",
    "invitees": [
        {
            "name": "Invitee",
            "email": "[email protected]"
        }
    ]
}

Response

{
    "id": "397d92f7-5a68-40fe-abb8-ef2ccfa4127e",
    "name": "Rental agreement based on an existing template",
    "state": "draft",
    "locale": "en-US",
    "completed": false,
    "invitees": [
        {
            "id": "c85b009c-6b94-4be6-974c-70464323699d",
            "name": "Invitee",
            "email": "[email protected]",
            "readOnly": false,
            "fields": [
                {
                    "id": "ae4bb99d-ef9e-4a2d-8a13-63e4ca8ede1a",
                    "name": "AE4BB99D",
                    "type": "signature",
                    "required": true,
                    "invitee": "c85b009c-6b94-4be6-974c-70464323699d",
                    "locations": [
                        {
                            "range": "1",
                            "unit": "point",
                            "x": 70.3448,
                            "y": 262.0345,
                            "width": 164.431,
                            "height": 45.7241
                        }
                    ]
                }
            ]
        }
    ],
    "expiresIn": 2592000,
    "expiresAt": "2022-01-31T00:00:00+00:00",
    "createdAt": "2022-01-01T00:00:00+00:00"
}