POST Responses/{QuestionKey}

Add Responses to a Question
This operation will add new Responses to the Question, optionally autocoding them. It will never modify existing Responses. For each QuestionResponse submitted, if the question does not have a response stored in Ascribe with the specified respondent id, then the response will be added.
Otherwise, the Response stored in Ascribe will not be modified. The QuestionResponse submitted will be ignored, and any codes that have been applied to the Response will be unchanged.

This operation allows the use of a Rule Set to modify or veto the Responses submitted, and automatically coding the responses as they are added.
If a Rule Set is specified it can be passed a Taxonomy for its use.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
QuestionKey

The key of the Question, which must be an integer value.

integer

Required

Body Parameters

The Responses to add.

PostResponsesRequest
NameDescriptionTypeAdditional information
responses

The responses to be added or updated.
All strings in these responses will be trimmed of leading and trailing white space.

Collection of QuestionResponse

Required

autoCodeTextMatch

If true, this will attempt to AutoCode responses based on an exact (but case insensitive) text match with previously-coded responses. This AutoCode will execute first, followed by (if requested) Input ID matching and Regular Expression matching.

boolean

None.

autoCodeInputId

If set to True, it will attempt to Auto Code based on a code's Input ID (Closed ends and Other Specifies only).
This AutoCode will execute after the Text Match and before the Regular Expression match, if either is requested.

boolean

None.

autoCodeByRegex

If set to True, it will attempt to Auto Code responses via the codes' Regular Expressions.
This AutoCode will execute after the Text Match and Input ID match, if requested.

boolean

None.

ruleSetKey

Key of a Rule Set containing at least one 'Modify Response on Load' rule.

integer

None.

taxonomyKey

Key of a Taxonomy to pass to the Rule Set for its use.
Ignored if no ruleSetKey is specified.

integer

None.

applyRuleSetToTranscription

If true, the transcription field of each QuestionResponse is operated on by the Rule Set.
If false or not specified, the verbatim field of each QuestionResponse is operated on by the Rule Set.
This value has no effect unless a Rule Set key is specified in the request.

boolean

None.

Response Information

Add Responses to a Question
This operation will add new Responses to the Question, optionally autocoding them. It will never modify existing Responses. For each QuestionResponse submitted, if the question does not have a response stored in Ascribe with the specified respondent id, then the response will be added.
Otherwise, the Response stored in Ascribe will not be modified. The QuestionResponse submitted will be ignored, and any codes that have been applied to the Response will be unchanged.

This operation allows the use of a Rule Set to modify or veto the Responses submitted, and automatically coding the responses as they are added.
If a Rule Set is specified it can be passed a Taxonomy for its use.

PostResponsesResponse
NameDescriptionTypeAdditional information
codebookKey

The key of the Codebook for this Question.

integer

Required

responsesAdded

The count of Responses added to the Question.
This is the number of responses in the PutResponsesRequest that had rid values that were not already present in this Question.

integer

Required

existingResponsesUnchanged

The count of existing Responses unchanged.
This is the number of responses in the PutResponsesRequest that had rid values that were already present in this Question.

integer

Required

responsesModifiedByRuleSet

The count of responses modified by the Rule Set.
If no Rule Set is specified in the request this value will always be zero.

integer

Required

responsesVetoedByRuleSet

The count of responses vetoed by the Rule Set.
A vetoed response is not stored in Ascribe.
A rule can veto a response by either returning null, or by setting f.t = null.
If no Rule Set is specified in the request this value will always be zero.

integer

Required

responsesCodedByTextMatch

The count of responses coded by text match.
This value will always be zero unless autoCodeTextMatch in the request is true.

integer

Required

responsesCodedByInputId

The count of responses coded by input ID.
This value will always be zero unless autoCodeInputId in the request is true.

integer

Required

responsesCodedByRegex

The count of responses coded by regular expression.
This value will always be zero unless autoCodeByRegex in the request is true.

integer

Required

addedResponses

The responses added to the question as a result of the POST operation.

Collection of AddedResponse

Required

errors

If null the request was processed without error. If not null errors occurred while processing the request. The array contains the error messages.

Collection of string

None.