Skip to content

postSurveyResults ​

Submits Smart Form responses to SAM. NOTE: For legacy these are called Surveys/Forms as they used to hanfle Surveys/Quizzes but only support PDF Forms now. 16-OCT-17 - V3 now supports a total of 320 fields - 300 Text, 20 Images.

Request ​

http
POST /rest/survey/results

Headers ​

NOTE: this does not currently require authentication BUT should eventually

Parameters ​

An array of responses:

NOTE: R denotes a Text Response whilst I denotes and Image Response. NOTE: All images should be sent as BASE64 text representations. NOTE: for version >= 2 clients MUST provide clientFormUUID values. If no version provided then it defaults to V1 and no clientFormUUID values are required. NOTE: Version 3 added 100 new text fields and was bumped just so we can differentiate the change. However, passing 300 text fields with v1 or v2 will still work.

json
{ "resultset" : 
     [ { "Q1" : { "R1" : "true" },
        "Q2" : { "R2" : "true",
            "R3" : "false",
            "R4" : "true",
            "R5" : "false"
          },
        "clientFormUUID" : "ClientFormUUID365",
        "submitted" : 1445402419921
      },
      { "Q1" : { "R1" : "true" },
        "Q2" : { "R2" : "false",
            "R3" : "false",
            "R4" : "false",
            "R5" : "true"
          },
        "clientFormUUID" : "ClientFormUUID366",
        "submitted" : 1445402419921
      }
    ],
  "surveyId" : 1,
  "version" : 2
}

Response ​

200 OK ​

Returns the number (integer) of responses successfully saved to SAM.

Errors ​

ExceptionDescription
WSInvalidParameterExceptionSee Error Definitions
WSSurveyNotFoundExceptionSee Error Definitions
WSInvalidSurveyConfigurationExceptionSee Error Definitions
WSSurveyInactiveOrExpiredExceptionSee Error Definitions
WSDuplicateResponseSubmittedExceptionSee Error Definitions
WSSurveyServiceExceptionSee Error Definitions