Questionnaires API

Questionnaires are reusable DDQ (Due Diligence Questionnaire) templates containing structured questions. Each questionnaire serves as a blueprint for creating responses with specific entities.

Read-Only API

The Questionnaire API is currently read-only. Questionnaires are created and managed through the web interface. Use this API to retrieve questionnaire structures when creating responses.

Key Concepts

  • Templates: Questionnaires are reusable templates, not assessments themselves
  • Questions: Each questionnaire contains text-based questions with configurable types
  • File Questions: Separate file upload requirements for documents and certificates
  • Sections: Questions are organized into sections and subsections for structure

Common Use Cases

  • Retrieve available questionnaires before creating a response
  • Fetch question structure to build dynamic UI forms
  • Understand required fields and question types for autofill
  • Display questionnaire details to users

List Questionnaires

Retrieves a paginated list of all questionnaire templates in your tenant.

GET /api/v1/questionnaires/

Query Parameters

Parameter Type Description
type string Filter by questionnaire type: ddq or rfi
page integer Page number (default: 1)
page_size integer Results per page (default: 50, max: 100)

Response

Returns paginated list with minimal questionnaire information. Each questionnaire includes:

  • id - Questionnaire ID
  • name - Questionnaire name
  • description - Description text
  • questionnaire_type - Type (ddq or rfi)
  • question_count - Total number of text questions
  • created_at - Creation timestamp

Response (200 OK)

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 1,
      "name": "Standard DDQ",
      "description": "Standard due diligence questionnaire",
      "questionnaire_type": "ddq",
      "question_count": 42,
      "created_at": "2026-01-15T10:30:00Z"
    },
    {
      "id": 2,
      "name": "Security Assessment",
      "description": "Information security assessment",
      "questionnaire_type": "ddq",
      "question_count": 28,
      "created_at": "2026-01-18T14:20:00Z"
    }
  ]
}

Get Questionnaire

Retrieves a specific questionnaire by ID, including all questions and file requirements.

GET /api/v1/questionnaires/{id}/

Path Parameters

Parameter Type Description
id integer The unique identifier of the questionnaire

Response

Returns the full questionnaire object including:

  • questions - Array of all text-based questions
  • file_questions - Array of file upload requirements
  • sections - Optional section structure (JSON)
  • question_count - Total text questions
  • response_count - Number of active responses using this template

List Questions

Retrieves all text-based questions for a questionnaire, ordered by section and number.

GET /api/v1/questionnaires/{id}/questions/

Response

Returns array of question objects ordered by section_number, sub_section_number, and number.

Questionnaire Object

The questionnaire object represents a reusable DDQ template with structured questions.

List View Attributes

Field Type Description
id integer Unique identifier
name string Questionnaire name
description string Detailed description
questionnaire_type string Type: ddq (Due Diligence Questionnaire) or rfi (Request for Information)
question_count integer Total number of text questions
created_at datetime Creation timestamp (ISO 8601)

Detail View Additional Fields

Field Type Description
sections object Optional JSON structure defining predefined sections
questions array Array of text-based question objects
file_questions array Array of file upload requirement objects
response_count integer Number of active responses (excludes PREFILL status)

Question Object

Text-based questions within a questionnaire template.

Attributes

Field Type Description
id integer Unique question identifier
number integer Question number for display ordering
section string Section name (e.g., "Part 1", "Section A")
section_number integer Numeric section order
sub_section string Subsection name (nullable)
sub_section_number integer Numeric subsection order within section
text string The actual question text (max 1000 characters)
question_type string Question type (see below)
required boolean Whether answer is required for submission
exclude_from_autofill boolean If true, AI autofill will skip this question
options array | null List of valid option strings for select and multi_select question types. null for all other types.
visibility_conditions object | null Conditional visibility rules. null = always shown. When present, the question should only be answered (and is only required) when the conditions evaluate to true. See Conditional Questions.

Question Object Example (text)

{
  "id": 123,
  "number": 1,
  "section": "Part 1",
  "section_number": 1,
  "sub_section": "Company Information",
  "sub_section_number": 1,
  "text": "What is your company's legal name?",
  "question_type": "text",
  "required": true,
  "exclude_from_autofill": false,
  "options": null,
  "visibility_conditions": null
}

Question Object Example (select)

{
  "id": 124,
  "number": 2,
  "section": "Part 1",
  "section_number": 1,
  "sub_section": "Company Information",
  "sub_section_number": 1,
  "text": "What is your primary business activity?",
  "question_type": "select",
  "required": true,
  "exclude_from_autofill": false,
  "options": ["Financial Services", "Technology", "Healthcare", "Other"],
  "visibility_conditions": null
}

Question Object Example (conditional)

{
  "id": 125,
  "number": 3,
  "section": "Part 1",
  "section_number": 1,
  "sub_section": "Company Information",
  "sub_section_number": 1,
  "text": "Please describe your regulatory authorisations.",
  "question_type": "text",
  "required": true,
  "exclude_from_autofill": false,
  "options": null,
  "visibility_conditions": {
    "operator": "AND",
    "rules": [
      {
        "question_id": 124,
        "condition": "eq",
        "value": "Financial Services"
      }
    ]
  }
}

File Question Object Example

{
  "id": 45,
  "document_type": "certificate_of_incorporation",
  "description": "Certificate of Incorporation",
  "required": true,
  "multiple": false
}

Question Types

The question_type field determines what value to supply in answer_text when submitting answers.

Type Description answer_text format
text Free text Any string
number Numeric value Numeric string, e.g. "42"
email Email address Valid email string
tel Phone number Phone number string
url URL / Website URL string, e.g. "https://example.com"
percentage Percentage value Numeric string, e.g. "75" (do not include %)
currency Currency amount Numeric string, e.g. "15000"
boolean Yes / No "yes" or "no"
yes_no_na Yes / No / Not Applicable "yes", "no", or "na"
date Date only Use the date_answer field (YYYY-MM-DD), not answer_text
text_and_date Text with an associated date Supply both answer_text (the text part) and date_answer (YYYY-MM-DD)
select Single-choice dropdown One of the strings from the question's options array
multi_select Multiple-choice checkboxes JSON array string of selected options, e.g. '["Option A","Option B"]'
country Country picker ISO 3166-1 alpha-2 country code, e.g. "GB"
structured Multi-field structured data (e.g. UBO details) Use the structured_data field (list of instance dicts), not answer_text
File Upload Requirements

File uploads are handled separately via the file_questions array. These are not part of the question types above and use a different model (FileQuestion) with document type specifications.

Conditional Questions

Questions with a non-null visibility_conditions are only shown (and only required) when their conditions evaluate to true against the current set of answers. When a conditional question is hidden, you must not submit an answer for it — and the submit endpoint will not require one.

Condition Schema

Field Type Description
operator string "AND" — all rules must pass. "OR" — at least one rule must pass.
rules array List of rule objects (see below)

Rule Object

Field Type Description
question_id integer ID of the trigger question whose answer is evaluated
condition string "eq" — answer equals value
"neq" — answer does not equal value
"contains" — answer contains value (or multi_select includes value)
"not_contains" — answer does not contain value
"answered" — question has any non-empty answer
"not_answered" — question has no answer
"gt" / "lt" / "gte" / "lte" — numeric comparisons
value string The value to compare against. Not required for answered / not_answered.
Prefill workflow tip

When filling a response programmatically via the PREFILL workflow, fetch all questions with GET /questionnaires/{id}/questions/, evaluate each question's visibility_conditions against your current answer set, and only submit answers (and only enforce required) for questions that are visible.