SurveyMonkey v3 API中日期字段的“响应验证失败”

时间:2019-10-13 04:12:50

标签: api surveymonkey

我无法使用其v3 API创建成功的有效载荷来创建SurveyMonkey响应 CreateResponse [POST]:https://api.surveymonkey.net/v3/collectors/ /响应

我的请求的相关部分

...
"answers": [
   {
     "row_id": "2375981012",
      "text": "2019-10-11T12:56:55+00:00"          
 }

错误代码:

    "message": "Responses failed validation.",
        "id": "1025",
        "name": "Resource Conflict",
        "http_status_code": 409

以上格式符合their documentation。我还尝试了dd / mm / yyyy和其他格式,但似乎无法正常工作。

1 个答案:

答案 0 :(得分:0)

该响应字段仅需要一个日期。

{
    sorting: null,
    family: "datetime",
    subtype: "date_only",
    required: {
        text: "This question requires an answer.",
        amount: "1",
        type: "exactly"
    },
    answers: {
        rows: [
            {
                visible: true,
                text: "Date / Time",
                position: 1,
                id: "2375981012"
            }
        ]
    },
    visible: true,
    href: "https://api.surveymonkey.net/v3/surveys/271104269/pages/98907636/questions/359669069",
    headings: [
        {
            heading: "DOB"
        }
    ],
    position: 1,
    validation: {
        sum_text: "",
        min: null,
        text: "Please enter a valid date.",
        sum: null,
        max: null,
        type: "date_intl"
    },
    id: "359669069",
    forced_ranking: false
}