DEV Community

GuGuData
GuGuData

Posted on

职业心理测评问卷 API 接口

职业心理测评问卷 API 接口

教育/高考 职业心理测评问卷 API 服务 心理测评 / 职业测试 / 人格分析 心理测评 / 职业测试 / 人格分析

gugudata api

1. 产品功能

  • 提供多种专业心理测评量表,包括霍兰德职业兴趣测验(60题)、A型行为量表(24题)、成就动机量表(30题)等;
  • 基于权威心理学理论设计,测评结果具有科学性和参考价值;
  • 自动计算各维度得分,生成专业的中文解释和建议;
  • 支持用户测试历史查询和结果追踪,便于长期观察;
  • 遵循 Google AIP 标准设计,API 接口规范统一、易于集成;
  • RESTful 风格设计,资源路径清晰,符合行业最佳实践;
  • 全接口支持 HTTPS(TLS v1.0 / v1.1 / v1.2 / v1.3);
  • 毫秒级响应性能,多节点 CDN 部署,全国快速访问。
  • 接口调用状态与状态监控

2. API 文档

接口详情: https://www.gugudata.com/api/details/psychology-questionnaires

接口地址: https://api.gugudata.com/v1/psychology/questionnaires

返回格式: application/json; charset=utf-8

请求方式: GET

请求协议: HTTPS

请求示例: https://api.gugudata.com/v1/psychology/questionnaires?appkey=YOUR_APPKEY

数据预览: https://www.gugudata.com/preview/psychology-questionnaires

接口测试: https://api.gugudata.com/v1/psychology/questionnaires/demo

3. 请求参数

参数名 参数类型 是否必须 默认值 备注
appkey string YOUR_APPKEY 付费后获取的 APPKEY

4. 返回参数

参数名 参数类型 备注
DataStatus.StatusCode int 接口返回状态码,100 为成功
DataStatus.StatusDescription string 接口返回状态说明
DataStatus.ResponseDateTime string 接口数据返回时间
DataStatus.DataTotalCount int 问卷总数量
Data[].QuestionnaireCode string 问卷编码,如 HOLLAND_SDS
Data[].QuestionnaireName string 问卷名称
Data[].QuestionnaireNameEn string 问卷英文名称
Data[].Description string 问卷描述及理论基础说明
Data[].QuestionCount int 题目数量
Data[].Dimensions array 测试维度列表
Data[].Dimensions[].DimensionCode string 维度代码
Data[].Dimensions[].DimensionName string 维度名称
Data[].Dimensions[].Description string 维度描述
Data[].Source string 问卷来源或理论基础
Data[].UseCount int 使用次数统计

相关接口

获取问卷详情 GET /v1/psychology/questionnaires/{{questionnaireCode}}

获取指定问卷的详细信息和所有题目

GET /v1/psychology/questionnaires/{{questionnaireCode}}

请求参数

参数名 参数类型 是否必须 备注
questionnaireCode string 问卷编码(路径参数),如 HOLLAND_SDS
appkey string APPKEY(查询参数)

响应示例

[
  {
    "Key": "QuestionnaireCode",
    "Value": "HOLLAND_SDS"
  },
  {
    "Key": "QuestionnaireName",
    "Value": "霍兰德职业兴趣测验"
  },
  {
    "Key": "QuestionCount",
    "Value": 60
  },
  {
    "Key": "Instructions",
    "Value": "请根据你的实际情况和真实想法回答以下问题..."
  },
  {
    "Key": "Questions",
    "Value": [
      [
        {
          "Key": "QuestionNumber",
          "Value": 1
        },
        {
          "Key": "QuestionText",
          "Value": "我喜欢修理电器或机械设备"
        },
        {
          "Key": "QuestionType",
          "Value": "single"
        },
        {
          "Key": "Options",
          "Value": [
            [
              {
                "Key": "OptionKey",
                "Value": "YES"
              },
              {
                "Key": "OptionText",
                "Value": "是"
              }
            ],
            [
              {
                "Key": "OptionKey",
                "Value": "NO"
              },
              {
                "Key": "OptionText",
                "Value": "否"
              }
            ]
          ]
        }
      ]
    ]
  }
]
Copy
Enter fullscreen mode Exit fullscreen mode

提交测试答案 POST /v1/psychology/tests

提交用户答案,自动计算得分并生成测评结果

POST /v1/psychology/tests

请求参数

参数名 参数类型 是否必须 备注
appkey string APPKEY(URL 查询参数)
questionnaireCode string 问卷编码(请求体)
userId string 用户标识(请求体,可选)
timeSpent int 答题耗时秒数(请求体,可选)
answers object 答案对象(请求体),格式:{"1":"YES","2":"NO",...}

响应示例

[
  {
    "Key": "TestId",
    "Value": "c8c1cc8db35340b796e5bf706bb434d2"
  },
  {
    "Key": "QuestionnaireCode",
    "Value": "HOLLAND_SDS"
  },
  {
    "Key": "TotalScore",
    "Value": 40
  },
  {
    "Key": "DimensionScores",
    "Value": [
      [
        {
          "Key": "DimensionCode",
          "Value": "I"
        },
        {
          "Key": "DimensionName",
          "Value": "研究型 Investigative"
        },
        {
          "Key": "Score",
          "Value": 9
        },
        {
          "Key": "MaxScore",
          "Value": 10
        },
        {
          "Key": "ScoreRate",
          "Value": 90
        },
        {
          "Key": "Interpretation",
          "Value": "你对研究和分析工作感兴趣..."
        }
      ]
    ]
  },
  {
    "Key": "ResultType",
    "Value": "IES"
  },
  {
    "Key": "Interpretation",
    "Value": "你的霍兰德代码是 IES..."
  },
  {
    "Key": "Suggestion",
    "Value": "建议选择与你的兴趣特点相匹配的职业方向..."
  }
]
Copy
Enter fullscreen mode Exit fullscreen mode

查询测试结果 GET /v1/psychology/tests/{{testId}}

根据测试ID查询测试结果详情

GET /v1/psychology/tests/{{testId}}

请求参数

参数名 参数类型 是否必须 备注
testId string 测试记录ID(路径参数)
appkey string APPKEY(查询参数)

响应示例

[
  {
    "Key": "TestId",
    "Value": "c8c1cc8db35340b796e5bf706bb434d2"
  },
  {
    "Key": "QuestionnaireCode",
    "Value": "HOLLAND_SDS"
  },
  {
    "Key": "Answers",
    "Value": [
      {
        "Key": "1",
        "Value": "YES"
      },
      {
        "Key": "2",
        "Value": "NO"
      }
    ]
  },
  {
    "Key": "TotalScore",
    "Value": 40
  },
  {
    "Key": "DimensionScores",
    "Value": [

    ]
  },
  {
    "Key": "Interpretation",
    "Value": "..."
  },
  {
    "Key": "TestDateTime",
    "Value": "2025-11-11 16:24:44"
  }
]
Copy
Enter fullscreen mode Exit fullscreen mode

用户测试历史 GET /v1/psychology/tests/{{userId}}

查询用户的历史测试记录列表,支持按问卷类型过滤

GET /v1/psychology/tests/{{userId}}

请求参数

参数名 参数类型 是否必须 备注
appkey string APPKEY(查询参数)
filter string 过滤条件,格式:userId="xxx" 或 userId="xxx" AND questionnaireCode="yyy"
pageSize int 每页数量,默认 20,最大 100
pageToken int 页码,默认 1

响应示例

[
  [
    {
      "Key": "TestId",
      "Value": "c8c1cc8db35340b796e5bf706bb434d2"
    },
    {
      "Key": "QuestionnaireCode",
      "Value": "HOLLAND_SDS"
    },
    {
      "Key": "QuestionnaireName",
      "Value": "霍兰德职业兴趣测验"
    },
    {
      "Key": "TotalScore",
      "Value": 40
    },
    {
      "Key": "ResultType",
      "Value": "IES"
    },
    {
      "Key": "TestDateTime",
      "Value": "2025-11-11 16:24:44"
    }
  ]
]
Enter fullscreen mode Exit fullscreen mode

Top comments (0)