sfgboxapi

<back to all web services

QuestionnairsQuestionsAutoQueryAdd

QuestionnairsQuestionsAutoQueryAdd Parameters:
NameParameterData TypeRequiredDescription
QuestionnairsIdquerylongNo
QuestionquerystringNo
Answer1querystringNo
Answer2querystringNo
Answer3querystringNo
Answer4querystringNo
Answer5querystringNo
CorrectAnswerqueryintNo
ResponseStatusqueryResponseStatusNo
QuestionnairsQuestions Parameters:
NameParameterData TypeRequiredDescription
IdformlongYes
QuestionnairsIdformlongYes
QuestionformstringYes
Answer1formstringYes
Answer2formstringYes
Answer3formstringNo
Answer4formstringNo
Answer5formstringNo
CorrectAnswerformintYes

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /jsv/reply/QuestionnairsQuestionsAutoQueryAdd HTTP/1.1 
Host: api-stage.smartfarmertech.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	questionnairsId: 0,
	question: String,
	answer1: String,
	answer2: String,
	answer3: String,
	answer4: String,
	answer5: String,
	correctAnswer: 0,
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	id: 0,
	questionnairsId: 0,
	question: String,
	answer1: String,
	answer2: String,
	answer3: String,
	answer4: String,
	answer5: String,
	correctAnswer: 0
}