> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取问卷 API：检索 KYC 表单

> 通过 Didit 获取完整的 KYC 问卷详情：有序问题、选项及多语言标签。支持以编程方式管理合规表单，按每次调用计费。



获取问卷 API 提示词
        将提示词复制到剪贴板



      
      

\<pre>

\`Fetch the full configuration of a single Didit questionnaire through the Management API.

Endpoint:
GET https://verification.didit.me/v3/questionnaires/{questionnaire_uuid}/

Authentication:
Use the x-api-key header with my Didit API key.

Goal:
\- Retrieve the questionnaire definition (form_elements, languages, translations, internal graph) so I can render a preview, debug a session, or audit changes.

Path parameter:
\- questionnaire_uuid — the per-version questionnaire UUID returned by GET /v3/questionnaires/ or POST /v3/questionnaires/. Each version has its own primary key; questionnaire_group_id is the stable id shared by every version.

Example call:
curl -X GET "https://verification.didit.me/v3/questionnaires/{questionnaire_uuid}/" \
-H "x-api-key: YOUR_API_KEY"

What to read from the response:
\- title — internal questionnaire name.
\- languages and default_language — supported locales for translations.
\- form_elements — ordered question definitions including element_type, label, options, is_required.
\- graph — internal graph built from form_elements (do not edit manually; use the simple form_elements shape on PATCH).
\- status — "draft" or "published"; only drafts are editable.

Failure modes:
\- 401 — missing or malformed x-api-key.
\- 403 — canonical { "detail": "You do not have permission to perform this action." } envelope when the questionnaire belongs to a different application than the API key.
\- 404 — questionnaire not found in this application.

Side effects: none. This is a pure read.

For the full integration shape, see /integration/integration-prompt.`

\</pre>



      
      

粘贴到



## OpenAPI

````yaml zh/openapi-25.json GET /v3/questionnaires/{questionnaire_uuid}/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: 身份证件验证 API。使用 x-api-key 请求头进行身份验证。
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/questionnaires/{questionnaire_uuid}/:
    get:
      tags:
        - Questionnaires
      summary: 获取问卷
      description: >-
        通过 `questionnaire_uuid` 获取某个版本的完整问卷详情：标题、`languages`、规范 `graph`、派生的
        `sections` 以及版本元数据。
      operationId: get_questionnaire
      parameters:
        - name: questionnaire_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            问卷每个版本对应的 UUID（列表 endpoint 返回的 `uuid` 值，在详情 endpoint 上也作为
            `questionnaire_id` 返回）。
      responses:
        '200':
          description: 问卷完整详情，包括规范 `graph`、衍生的 `sections` 视图、版本元数据以及 `is_editable`。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuestionnaireDetail'
              examples:
                Published questionnaire:
                  value:
                    questionnaire_id: 11111111-2222-3333-4444-555555555555
                    title: Customer Onboarding
                    description: Additional information needed for verification
                    languages:
                      - en
                    default_language: en
                    is_active: true
                    is_simple_questionnaire: true
                    graph:
                      start_node: occupation
                      nodes:
                        occupation:
                          element_type: SHORT_TEXT
                          is_required: true
                          title:
                            en: What is your occupation?
                          next: source_of_funds
                        source_of_funds:
                          element_type: MULTIPLE_CHOICE
                          is_required: true
                          title:
                            en: Source of funds
                          choices:
                            - value: employment
                              label:
                                en: Employment
                            - value: business
                              label:
                                en: Business
                          next: null
                    sections:
                      - title: {}
                        description: {}
                        items:
                          - uuid: 11111111-2222-3333-4444-666666666666
                            value: occupation
                            element_type: SHORT_TEXT
                            is_required: true
                            title:
                              en: What is your occupation?
                    questionnaire_group_id: 11111111-2222-3333-4444-555555555555
                    version: 1
                    status: published
                    published_at: '2026-04-23T10:00:00Z'
                    is_editable: false
        '403':
          description: API 密钥缺失、格式错误、已过期或作用域属于其他应用。
          content:
            application/json:
              examples:
                Invalid token:
                  value:
                    detail: You do not have permission to perform this action.
        '404':
          description: >-
            已验证身份的应用中不存在具有此 `questionnaire_uuid` 的问卷。可能是 UUID 错误，或者它属于另一个应用，API
            刻意不对这两种情况进行区分。
          content:
            application/json:
              examples:
                Not found:
                  value:
                    detail: Not found.
        '429':
          description: 超出速率限制。请使用指数退避重试。
        '500':
          description: 意外服务器错误。可安全重试。
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/questionnaires/11111111-2222-3333-4444-555555555555/'
            \
              -H 'x-api-key: YOUR_API_KEY'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.questionnaires.retrieve(
                "11111111-2222-3333-4444-555555555555",
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: >-
            import Didit from "@didit-protocol/sdk-node";


            // Reads DIDIT_API_KEY.

            const didit = new Didit();


            const result = await
            didit.questionnaires.retrieve("11111111-2222-3333-4444-555555555555");

            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Questionnaires.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import me.didit.Didit;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.questionnaires().retrieve("11111111-2222-3333-4444-555555555555");

            System.out.println(result);
        - lang: php
          label: PHP
          source: >-
            <?php


            require 'vendor/autoload.php';


            use Didit\DiditClient;


            // Reads DIDIT_API_KEY.

            $didit = new DiditClient();


            $result =
            $didit->questionnaires->retrieve('11111111-2222-3333-4444-555555555555');

            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result =
            didit.questionnaires.retrieve("11111111-2222-3333-4444-555555555555")

            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await
            client.Questionnaires.RetrieveAsync("11111111-2222-3333-4444-555555555555");

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    QuestionnaireDetail:
      type: object
      description: 从 GET、POST（创建）和 PATCH（更新）endpoint 返回的完整问卷详情。
      properties:
        questionnaire_id:
          type: string
          format: uuid
          description: 问卷的唯一标识符。在工作流中引用该问卷或在后续更新/删除请求中使用此 ID。
        title:
          type: string
        description:
          type: string
          nullable: true
        languages:
          type: array
          items:
            type: string
        default_language:
          type: string
        is_active:
          type: boolean
        is_simple_questionnaire:
          type: boolean
        graph:
          type: object
          description: 包含 start_node 和 nodes 映射的图谱结构。
        sections:
          type: array
          description: 分组到各节中的问卷内容（源自图谱）。
          items:
            type: object
        questionnaire_group_id:
          type: string
          format: uuid
          description: 用于将同一问卷的所有版本分组的稳定标识符。
        version:
          type: integer
        status:
          type: string
          enum:
            - draft
            - published
        published_at:
          type: string
          format: date-time
          nullable: true
        is_editable:
          type: boolean
          description: 当问卷仍可就地编辑（草稿版本）时为 true。
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        您的应用 API 密钥，可在 Business Console 的“开发者 -> API
        密钥”中获取。主密钥拥有完整访问权限。指定名称的密钥可设置作用域：针对每个资源设为无权限、只读或读写，限定于特定工作流或已通过的会话、限定于
        IP 地址列表，以及设置到期日期。401 表示密钥错误、已撤销或已过期；403 表示未发送密钥、密钥无权访问该资源或操作，或请求来自其 IP
        列表之外的地址；在会话路由上返回 404 表示该会话不在该密钥允许的工作流或状态范围内。没有媒体访问权限的密钥获取到的图片、视频和 PDF
        URL 将为 null；没有会话写入权限的密钥获取到的会话链接和 token 将为 null。请参阅
        https://docs.didit.me/console/api-keys。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.