我已成功使用SurveyMonkey API構建調查。但是,我們希望調查中省略退出按鈕,並且通過將done_button.exit_button
設置爲空字符串來完成。但是,我無法在調查創建(PUSH
)或調查修改(PATCH
)期間設置buttons_text值。通過SurveyMonkey API將退出按鈕文本設置爲空白
下面是一個API調用的一個例子,我做了:
curl -i -X PATCH -H "Authorization:bearer [ACCESS_TOKEN]" -H "Content-Type: application/json" https://api.surveymonkey.net/v3/surveys/[SURVEY_ID]?api_key=[API_KEY] -d '{"buttons_text":{"done_button":"Done","prev_button":"Prev","exit_button":"","next_button":"Next"}}'
的響應,我得到:
{"error": {"docs": "https://developer.surveymonkey.com/api/v3/#error-codes", "message": "Invalid schema in the body provided.", "id": "1002", "name": "Bad Request", "http_status_code": 400}}
似乎表明,我做錯了什麼JSON(包括一個無效的字段名稱,我認爲)...但不清楚每個API documentation有什麼問題。