Overview
You may notice that a survey cannot be submitted using the ResponseTek API, and an HTTP error 400 (Bad Request) is returned.
Workflow
Instructions
Get The Latest Transactions
This step can only be performed by support agents since it requires access to the database. However, if you already have the requests sent to the ResponseTek API, proceed to the next step.
<supportagent>
To obtain a list of the latest transactions, perform the following steps:
- Check which environment is used by the customer in the customer datasheet.
- Log in to SQL Server (check this page to get the server name or IP).
- Select the RT_Log database.
- Query the tblAPILog table to find the requests sent by the customer and the responses provided, which are stored in the responseContentBody column.
</supportagent>
Verify A Parameter Is Not Missing
Compare the parameters among the questions and check if one of them has fewer parameters than the others. If you need an example of this issue or help with how to identify if it is actually happening, please refer to Cannot Submit Survey - Missing Parameter.
Verify The Answer Matches The Question
Start from the request. On it, you are going to see something like this:
{
"surveyData":
[
{
"questionGuid":"380-6182ea629474",
"optionGuid":"28b-e51b06aae6bf",
"optionExternalRef":"",
"comment":""
}
...
Then, follow these steps:
- Log in to Survey Manager.
- For each question answered in the request:
- Get the question GUID from the questionGuid parameter.
- Open the question by making the URL match the pattern below (replace [questionGuid] with the actual GUID you obtained in the previous step):
...responsetek.com/AdminPortal/QuestionManagement/QuestionManagement/Item?Guid=[questionGuid]&TypeName=Attribute
- Locate the answer options and click the Edit button:
- On the page with the list of options, right-click it and select View Page Source.
- Search for the value of the optionGuid parameter. If you find it, the answer belongs to the question. Otherwise, refer to Cannot Submit Suvey - GUID Does Not Belong To The Question.