我已成功使用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有什么问题。