POST v1/Surveys/{surveyId}/ResponseCodes

User roles allowed to make this request: DomainAdministrator PowerUser RegularUser LimitedUser OperationsUser

Permissions required to make this request: SurveyResponseCode.Write SurveyResponseCode.Read Survey.Read

This method creates a new response code.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
surveyId

The id of the survey

string

Required

Body Parameters

An object describing the details for the new response code

SurveyResponseCodeModel
NameDescriptionTypeAdditional information
ResponseCode

User defined response code for the survey

integer

None.

Description

User defined description of the response code given

string

Max length: 200

IsDefinite

Determines if the Response code is a definitive or not (IsFinal - true or false). if it is definitive, AllowAppointment should be false.

boolean

None.

IsSelectable

Determines if response code is visible on dropdown list for Capi Client

boolean

None.

AllowAppointment

Determines if the Response code is meant for an appointment or not (IsIntermediate - true or false). If it is an appointment, IsDefinite should be false.

boolean

None.

RelocationUrl

Relocation url of the response code

string

Max length: 1024

Request Formats

application/json, text/json

Sample:
{
  "ResponseCode": 200,
  "Description": "new description",
  "IsDefinite": false,
  "IsSelectable": false,
  "AllowAppointment": false,
  "RelocationUrl": "https://sample.com",
}

application/xml, text/xml

Sample:
<SurveyResponseCodeModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NipoSoftware.Nfield.Manager.Api.Models">
  <ResponseCode>200</ResponseCode>
  <Description>new description</Description>
  <IsDefinite>false</IsDefinite>
  <IsSelectable>false</IsSelectable>
  <AllowAppointment>false</AllowAppointment>
  <RelocationUrl>https://sample.com</RelocationUrl>
</SurveyResponseCodeModel>

application/x-www-form-urlencoded

Sample:
ResponseCode=1&Description=sample&IsDefinite=true&IsSelectable=true&AllowAppointment=true&RelocationUrl=sample

multipart/form-data

Sample:

Sample not available.

Response Information

Resource Description

If successful, this method returns the newly created response codes

Response Message

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.