A survey that can be answered by the user
PUT/surveys/:id
Returns a survey compatible with the format supported by SurveyJS (https://surveyjs.io/survey-creator)
Request
Path Parameters
Possible values: non-empty
and <= 100 characters
Query Parameters
Possible values: <= 100 characters
If you have a branded content version, please supply it here
Possible values: >= 2 characters
and <= 2 characters
, Value must match regular expression ^[a-z]{2}$
- application/json
Body
profile
object
Represents a Climate Profile for a User.
Tracks which activities have been suggested
attributes
object
required
Attributes defining this profile
Possible values: >= 2 characters
and <= 2 characters
, Value must match regular expression ^[A-Z]{2}$
ISO 3166-1 alpha-2 format country code
Possible values: <= 9007199254740991
Possible values: <= 9007199254740991
Possible values: <= 9007199254740991
Possible values: <= 9007199254740991
Possible values: <= 9007199254740991
Tracks benchmark data
Tracks comparison data
Created date
Tracks which insights have been displayed
Possible values: non-empty
and <= 100 characters
ID of the persona
Tracks surveys data
traits
object
required
Scores for knowledge, lifestyle and motivation
Possible values: <= 1
Knowledge score
Possible values: <= 1
Lifestyle score
Possible values: <= 1
Motivation score
Possible values: non-empty
and <= 100 characters
Version for this profile
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Adjusted transactions based on you profile
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
Array [
]
Array [
]
]
]
payload
object
required
Possible values: non-empty
and <= 50 characters
Id of survey
survey
object
required
SurveyJS compatible survey. See https://surveyjs.io/
Possible values: <= 1048576 characters
Example:
Thank you
Possible values: non-empty
and <= 999 characters
Description
Possible values: <= 1048576 characters
Example: Loading
Possible values: <= 4194304 characters
Base64 encoded data url
Possible values: [contain
, cover
, fill
, none
]
css object-fit property
pages
object[]
required
Pages containing questions
elements
object[]
required
Array containing the questions for this page
choices
object[]
dropdown or choice
Possible values: non-empty
and <= 999 characters
Display value
Possible values: non-empty
and <= 50 characters
Value stored when answering
choicesByUrl
object
if fetching options from a REST service
Possible values: non-empty
and <= 999 characters
display value
Possible values: non-empty
and <= 2048 characters
REST service endpoint
Possible values: non-empty
and <= 50 characters
value stored when answering
Possible values: non-empty
and <= 999 characters
Description
Possible values: non-empty
and <= 50 characters
rateValues
object[]
rate
Possible values: non-empty
and <= 999 characters
Display value
Possible values: non-empty
and <= 50 characters
Value stored when answering
Possible values: non-empty
and <= 999 characters
Question
Possible values: [boolean
, dropdown
, radiogroup
, rating
]
radiogroup, dropdown, rating, boolean
Possible values: non-empty
and <= 50 characters
Name of this page default: pageNN
ex page3
Possible values: <= 200 characters
Please see https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility
Possible values: non-empty
and <= 100 characters
Title of survey
Possible values: non-empty
and <= 50 characters
Survey version number
profile
object
Represents a Climate Profile for a User.
Tracks which activities have been suggested
attributes
object
required
Attributes defining this profile
Possible values: >= 2 characters
and <= 2 characters
, Value must match regular expression ^[A-Z]{2}$
ISO 3166-1 alpha-2 format country code
Possible values: <= 9007199254740991
Possible values: <= 9007199254740991
Possible values: <= 9007199254740991
Possible values: <= 9007199254740991
Possible values: <= 9007199254740991
Tracks benchmark data
Tracks comparison data
Created date
Tracks which insights have been displayed
Possible values: non-empty
and <= 100 characters
ID of the persona
Tracks surveys data
traits
object
required
Scores for knowledge, lifestyle and motivation
Possible values: <= 1
Knowledge score
Possible values: <= 1
Lifestyle score
Possible values: <= 1
Motivation score
Possible values: non-empty
and <= 100 characters
Version for this profile
{
"payload": {
"id": "string",
"survey": {
"completedHtml": "string",
"description": "string",
"loadingHtml": "string",
"logo": "string",
"logoFit": "contain",
"pages": [
{
"elements": [
{
"choices": [
{
"text": "string",
"value": "string"
}
],
"choicesByUrl": {
"titleName": "string",
"url": "string",
"valueName": "string"
},
"description": "string",
"name": "string",
"rateValues": [
{
"text": "string",
"value": "string"
}
],
"title": "string",
"type": "boolean"
}
],
"name": "string",
"visibleIf": "string"
}
],
"title": "string"
},
"version": "string"
},
"profile": {
"activities": {},
"attributes": {
"country": "string",
"demo": 0,
"diet": 0,
"energy": 0,
"lifestyle": 0,
"transport": 0
},
"benchmarks": {},
"comparisons": {},
"created": "2024-07-29T15:51:28.071Z",
"insights": {},
"persona": "string",
"surveys": {},
"traits": {
"knowledge": 0,
"lifestyle": 0,
"motivated": 0
},
"v": "string"
}
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
Possible values: non-empty
and <= 100 characters
Possible values: non-empty
and <= 100 characters
Possible values: [BAD_REQUEST
, FORBIDDEN
, INTERNAL_SERVER_ERROR
, METHOD_NOT_ALLOWED
, UNSUPPORTED_MEDIA_TYPE
]
Possible values: non-empty
and <= 100 characters
{
"errors": [
{
"description": "string",
"details": "string",
"reasonCode": "BAD_REQUEST",
"recoverable": true,
"source": "string"
}
]
}
{
"errors": [
{
"source": "Engagement Services",
"reasonCode": "BAD_REQUEST",
"description": "Bad input parameter",
"recoverable": false
}
]
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
Possible values: non-empty
and <= 100 characters
Possible values: non-empty
and <= 100 characters
Possible values: [BAD_REQUEST
, FORBIDDEN
, INTERNAL_SERVER_ERROR
, METHOD_NOT_ALLOWED
, UNSUPPORTED_MEDIA_TYPE
]
Possible values: non-empty
and <= 100 characters
{
"errors": [
{
"description": "string",
"details": "string",
"reasonCode": "BAD_REQUEST",
"recoverable": true,
"source": "string"
}
]
}
{
"errors": [
{
"reasonCode": "FORBIDDEN",
"description": "Access denied",
"recoverable": false,
"details": "You do not have access to this resource",
"source": "Engagement Services"
}
]
}
Insufficient scope for accessing this resource
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
Possible values: non-empty
and <= 100 characters
Possible values: non-empty
and <= 100 characters
Possible values: [BAD_REQUEST
, FORBIDDEN
, INTERNAL_SERVER_ERROR
, METHOD_NOT_ALLOWED
, UNSUPPORTED_MEDIA_TYPE
]
Possible values: non-empty
and <= 100 characters
{
"errors": [
{
"description": "string",
"details": "string",
"reasonCode": "BAD_REQUEST",
"recoverable": true,
"source": "string"
}
]
}
{
"errors": [
{
"source": "Engagement Services",
"reasonCode": "FORBIDDEN",
"description": "Access denied",
"details": "Insufficient scope for accessing this resource",
"recoverable": false
}
]
}
Not found
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
Possible values: non-empty
and <= 100 characters
Possible values: non-empty
and <= 100 characters
Possible values: [BAD_REQUEST
, FORBIDDEN
, INTERNAL_SERVER_ERROR
, METHOD_NOT_ALLOWED
, UNSUPPORTED_MEDIA_TYPE
]
Possible values: non-empty
and <= 100 characters
{
"errors": [
{
"description": "string",
"details": "string",
"reasonCode": "BAD_REQUEST",
"recoverable": true,
"source": "string"
}
]
}
{
"errors": [
{
"source": "Engagement Services",
"reasonCode": "BAD_REQUEST",
"description": "The requested resource was not found. Please verify the resource path.",
"recoverable": false
}
]
}
Unexpected server error
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
errors
object[]
required
Possible values: non-empty
and <= 100 characters
Possible values: non-empty
and <= 100 characters
Possible values: [BAD_REQUEST
, FORBIDDEN
, INTERNAL_SERVER_ERROR
, METHOD_NOT_ALLOWED
, UNSUPPORTED_MEDIA_TYPE
]
Possible values: non-empty
and <= 100 characters
{
"errors": [
{
"description": "string",
"details": "string",
"reasonCode": "BAD_REQUEST",
"recoverable": true,
"source": "string"
}
]
}
{
"errors": [
{
"source": "Engagement Services",
"reasonCode": "INTERNAL_SERVER_ERROR",
"description": "Internal server error",
"details": "An error occurred",
"recoverable": false
}
]
}