Appearance
postSmartForm ​
Newer version of postSurveyResults that: 1.) only permits sending of a single form's results 2.) permits the optional passing of 1-M attachments (uner 9Mb total) to be included wiht the email 3.) Runs "synchronously" i.e. it blocks until complete 4.) Permits submitted values to be injected into a customised email body. 5.) Requires user authentication and will validate that the user is an Active connection of the company that owns the survey/smartform.
NOTE: we will reuse the postSurveyResults request payload but only pass in a single array item containing all the questions/reponses. i.e. We do not need to support multiple responses as this was required for offline surveys.
Request ​
http
POST /rest/survey/smartformHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
A SINGLE ELEMENT response array (not like postSurveyResults)
json
{ "resultset" :
[ { "Q1" : { "R1" : "true" },
"Q2" : { "R2" : "true",
"R3" : "false",
"R4" : "true",
"R5" : "false"
},
"clientFormUUID" : "MySmartFormUUID365",
"submitted" : 1445402419921
}
],
"surveyId" : 1, --OR
"surveyUUID" : "ce3c88b2-2c1b-4165-bd68-91130bb68c0f",
"version" : 4
}json
[ { \"Q17\" : { \"R17\" : \"Aarnold Donald\"},
\"Q18\" : { \"R18\" : \"McDuff\"},
\"clientFormUUID\" : \"MySmartFormUUID365-A1\",
\"submitted\" : 1445402419921
}
],"surveyId" : 7, "surveyUUID" : "28c4970b-c454-466b-8476-1111bea04e5f", "version" : 4 }"'
Response ​
200 OK ​
Returns the response_id number (integer) of the inserted
Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSSurveyNotFoundException | See Error Definitions |
WSInvalidSurveyConfigurationException | See Error Definitions |
WSSurveyInactiveOrExpiredException | See Error Definitions |
WSDuplicateResponseSubmittedException | See Error Definitions |
WSSurveyServiceException | See Error Definitions |