API
Integrate Documate with your favorite apps and services. The API is available to users under the Enterprise plans.
Authentication:
Authentication with the api is done via X-Api-Key header:
Create Workflow Session with Data:
Method: POST
Content-Type: application/json
Path: /api/documate/v1/interviews/<interview_name>/new
Path Parameters:
interview_name: The url encoded, case sensitive name of the interview that we are creating a new session and inserting data into.
Request Body:
variables: a JSON object where the keys are variable names and the values are the values. All values of the object should be a string/number representing the variable they are setting with the exception of the following special variables/data types:
- Date variables need to be in ISO8601 format.
- ~Note: variables/parameters in the wrong format (e.g., dates in the wrong format) will be ignored.
- Repeating Items:
- ~Repeating item values can be set as {"itemname[itemindex].itemproperty":"property value"}
- ~To skip the “Please Review YourEntries” screen, set {"itemname.reviewed":true} (example below)
- Multi Select fields are arrays of strings matching the choices in your multi-select question.
- ~Strings that do not match an option in the multi-select question will be ignored.
- review_answers - Set this to true to skip the “Please review your answers”.
- ~If all required workflow variables are present in the request, the continuation_url will present the document download page
- ~If all required workflow variables are not present in the request, the continuation_url will prompt for the missing data and skip the review page, directing to the document download page when missing values are entered.
- ~Setting review_answers to true will skip the review page in all cases, even where you are directed to enter additional data in the Documate workflow.
Example:
For a workflow named: My Documate Workflow with the following data types for variables:
- my_date_variable: Date
- dependents: Repeating Item
- ~firstname: Text
- ~lastname: Text
- ~age: Number
- my_multi: Multi Select
POST /api/documate/v1/interviews/My%20Documate%20Workflow/new HTTP/1.1
Host: yourdomain.documate.org
X-Api-Key: YOUR_DOCUMATE_API_KEY
Content-Type: application/json
Response:
List Workflow Names:
Method: GET
Path: /api/playground?folder=questions
Example Response:
List Workflow Variables:
Method: GET
Path: /officeaddin?pgtypes=<workflow name>.yml
Path Parameters:
pgtypes: name of the workflow returned from List Workflows endpoint.
Example Response:
Note: This API overlaps with the Documate Office add-in API, so it will also allow for additional data such as variable names for buttons and instruction blocks.