0
votes

I'm unable to create a successful payload to create a SurveyMonkey response using their v3 API CreateResponse [POST] : https://api.surveymonkey.net/v3/collectors//responses

Relevant portion of my request

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

Error Code :

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

The above format is as per their documentation . I have also tried dd/mm/yyyy and other formats, but I can't seem to get it to work.

1

1 Answers

0
votes

That response field requires only a date.

{
    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
}