Survey

Survey operations

get

List surveys

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Query parameters
$limitnumberOptional

The number of records to be returned.

Default: 100
$skipnumberOptional

The number of records to be skipped for pagination.

Default: 0
$orderstringOptional

The order of the records. The result can be sorted by multiple attributes separated by a comma (,). Examples; name name asc name desc name,createdAt desc

$withstringOptional

Load related entities as objects.

attrib_namestringOptional

Filter records by attributes. The result can be filtered by any attribute of the entity. All request parameters not starting with $ are automatically used as a filter condition.

  • Extended filtering options are also available. See the table below.
  • Filter parameters that do not belong to the entity are silently ignored.
  • ISO-8601 formats are accepted for the date fields. The timezone will be set to UTC if not provided.
  • The separator for in and notin modifiers is the pipe character (|). Pipe characters can be escaped with a backslash in front of it.
  • Concat Like is to search for a string in two or more fields. It is only supported for JSON fields.
Description GET Request Example
Exact Match name=john
Not Equals (Exact Match) name:ne=john
Is Null name=null
Is Not Null name:ne=null
Greater Than age:gt=5, birth:gt=1977-10-22T22:04:00
Greater Than or Equal To age:gte=5, birth:gte=1977-10-22T22:04:00
Less Than age:lt=3, birth:lt=2000-01-01T00:00:00
Less Than or Equal To age:lte=3, birth:lte=2000-01-01T00:00:00
Between age:bt=3,5, birth:bt=1977-10-22T22:04:00,2000-01-01T00:00:00
In status:in=value 1|value 2|value 3
Not In status:notin=value 1|value 2|value 3
Like name:like=%john%
Not Like name:notlike=%john%
Concat Like(Only for JSON fields) firstName,lastName:concatlike=full name
Responses
chevron-right
200

OK

application/json
get
/survey
200

OK

post

Create a new Survey.

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Body
namestringOptional

Name of this survey

entitystringOptional

For which entity this survey collects data? (Profile or Resource)

Responses
post
/survey

No content

get

Get a survey by ID

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
idstringRequired

Unique ID of the survey to get

Responses
chevron-right
200

OK

application/json
Responseany
get
/survey/{id}

No content

patch

Update an existing survey

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
idstringRequired

Unique ID of the survey to update

Body
namestringOptional

Name of the survey

Responses
chevron-right
200

OK

application/json
Responseany
patch
/survey/{id}

No content

post

Share a survey with a network

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
idstringRequired

Unique ID of the survey to share

Body
networkstringOptional

ID of the network where to share the survey

Responses
post
/survey/{id}/share

No content

post

Unshare a survey in a network

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
idstringRequired

Unique ID of the survey to unshare

Body
networkstringOptional

ID of the network where to share the survey

Responses
chevron-right
200

Survey is unshared

No content

post
/survey/{id}/unshare

No content

get

Read a survey form by ID

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
surveyIdstringRequired

Unique ID of the survey form to get

Responses
chevron-right
200

OK

application/json
Responseany
get
/survey-form/{surveyId}

No content

post

Create a new survey version

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
surveyIdstringRequired

Unique ID of the survey to share

Body
xmlstringOptional

XML of the survey form

Responses
post
/survey-form/{surveyId}
201

Survey version has been created

get

List survey responses

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
surveyIdstringRequired

ID of the survey for which to list responses

includePreviousResponsesstringOptional

a parameter to determine wether or not to include the previous survey responses

Query parameters
formattedstring · enumOptional

When set to "true", appends "formattedData" to each survey response object with labels, types, and display values.

Example: truePossible values:
$limitnumberOptional

The number of records to be returned.

Default: 100
$skipnumberOptional

The number of records to be skipped for pagination.

Default: 0
$orderstringOptional

The order of the records. The result can be sorted by multiple attributes separated by a comma (,). Examples; name name asc name desc name,createdAt desc

$withstringOptional

Load related entities as objects.

attrib_namestringOptional

Filter records by attributes. The result can be filtered by any attribute of the entity. All request parameters not starting with $ are automatically used as a filter condition.

  • Extended filtering options are also available. See the table below.
  • Filter parameters that do not belong to the entity are silently ignored.
  • ISO-8601 formats are accepted for the date fields. The timezone will be set to UTC if not provided.
  • The separator for in and notin modifiers is the pipe character (|). Pipe characters can be escaped with a backslash in front of it.
  • Concat Like is to search for a string in two or more fields. It is only supported for JSON fields.
Description GET Request Example
Exact Match name=john
Not Equals (Exact Match) name:ne=john
Is Null name=null
Is Not Null name:ne=null
Greater Than age:gt=5, birth:gt=1977-10-22T22:04:00
Greater Than or Equal To age:gte=5, birth:gte=1977-10-22T22:04:00
Less Than age:lt=3, birth:lt=2000-01-01T00:00:00
Less Than or Equal To age:lte=3, birth:lte=2000-01-01T00:00:00
Between age:bt=3,5, birth:bt=1977-10-22T22:04:00,2000-01-01T00:00:00
In status:in=value 1|value 2|value 3
Not In status:notin=value 1|value 2|value 3
Like name:like=%john%
Not Like name:notlike=%john%
Concat Like(Only for JSON fields) firstName,lastName:concatlike=full name
Responses
chevron-right
200

OK

application/json
get
/survey/{surveyId}/response
200

OK

get

List all survey responses

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
includePreviousResponsesstringOptional

a parameter to determine wether or not to include the previous survey responses

Query parameters
$limitnumberOptional

The number of records to be returned.

Default: 100
$skipnumberOptional

The number of records to be skipped for pagination.

Default: 0
$orderstringOptional

The order of the records. The result can be sorted by multiple attributes separated by a comma (,). Examples; name name asc name desc name,createdAt desc

$withstringOptional

Load related entities as objects.

attrib_namestringOptional

Filter records by attributes. The result can be filtered by any attribute of the entity. All request parameters not starting with $ are automatically used as a filter condition.

  • Extended filtering options are also available. See the table below.
  • Filter parameters that do not belong to the entity are silently ignored.
  • ISO-8601 formats are accepted for the date fields. The timezone will be set to UTC if not provided.
  • The separator for in and notin modifiers is the pipe character (|). Pipe characters can be escaped with a backslash in front of it.
  • Concat Like is to search for a string in two or more fields. It is only supported for JSON fields.
Description GET Request Example
Exact Match name=john
Not Equals (Exact Match) name:ne=john
Is Null name=null
Is Not Null name:ne=null
Greater Than age:gt=5, birth:gt=1977-10-22T22:04:00
Greater Than or Equal To age:gte=5, birth:gte=1977-10-22T22:04:00
Less Than age:lt=3, birth:lt=2000-01-01T00:00:00
Less Than or Equal To age:lte=3, birth:lte=2000-01-01T00:00:00
Between age:bt=3,5, birth:bt=1977-10-22T22:04:00,2000-01-01T00:00:00
In status:in=value 1|value 2|value 3
Not In status:notin=value 1|value 2|value 3
Like name:like=%john%
Not Like name:notlike=%john%
Concat Like(Only for JSON fields) firstName,lastName:concatlike=full name
Responses
chevron-right
200

OK

application/json
get
/survey-response
200

OK

post

Submit a response to a survey

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
instanceIdstringOptional

The unique ID of the record

deprecatedIdstringOptional

The instanceId of the submission for which this is a revision

instancestringOptional

Raw XML submission string.

datastringOptional

Parsed submission data in JSON format

Responses
post
/survey-response
get

Latest survey response for the given entity id

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
surveyIdstringRequired

ID of the survey

entityIdstringRequired

Id of the entity

Query parameters
formattedstring · enumOptional

When set to "true", returns formatted survey response data with labels, types, and display values. When false or not specified, returns raw data values.

Example: truePossible values:
Responses
chevron-right
200

OK

application/json
get
/survey-response/{surveyId}/{entityId}
get

Fetch a specific survey response

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
surveyResponseIdstringRequired

ID of the survey response

Query parameters
formattedstring · enumOptional

When set to "true", returns formatted survey response data with labels, types, and display values. When false or not specified, returns raw data values.

Example: truePossible values:
$withstringOptional

Load related entities as objects.

Responses
chevron-right
200

OK

application/json
get
/survey-response/{surveyResponseId}
post

Delete all survey responses related to an entity.

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

body
transactionIdstringOptional

ID of the active transaction

entityIdstringOptional

Applications with the privileges can opt-out of the survey on behalf of this entityId. If a non-programmatic account calls this endpoint, this parameter is obsolete and authenticated profile will be opted out.

Path parameters
surveyIdstringRequired

ID of the survey

Responses
chevron-right
200

Survey responses have been deleted

No content

post
/survey/{surveyId}/opt-out/{entityId}

No content

delete

Delete all survey responses related to an entity.

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

body
transactionIdstringOptional

ID of the transaction, if exists.

Path parameters
responseIdstringRequired

ID of the survey response

Responses
chevron-right
200

Survey response has been deleted

No content

delete
/survey-response/{responseId}

No content

post

Start a new survey session

Authorizations
AuthorizationstringRequired

A registered Nexus211 app can use Basic Auth method to authenticate itself. The username is the app's Client ID and the password is Client Secret.

Path parameters
surveyIdstringRequired

Unique ID of the survey to which response will be given

Body
subjectstringOptional

The ID of subject entity of this survey

redirectUrlstringOptional

The url to redirect the user after survey is submitted

transactionstringOptional

The ID of the transaction to connect the survey response

agentstringOptional

The profile ID of the agent facilitating the response

Responses
post
/survey-session/{surveyId}

No content

get

Returns the latest survey instance for the session

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
chevron-right
200

Latest survey response

application/json
get
/survey-session/instance

Last updated