Skip to main content

Complete survey and calculate result

PUT 

/surveys/sessions/:token

Completes the survey and gives back result

Request

Path Parameters

    token stringrequired

    The token identifying this session

Responses

Result object containing info about the survey result

Schema

    totalEmissionInYear doublerequired

    The total emission based on the answers of the survey

    yourClimateProfile stringrequired

    Human readable representation of your climate profile category

    description

    object

    required

    Copy about the climate profile

    title string
    body string

    meta

    object

    required

    Session and meta information used by the server. Should be sent with every request to server

    percentage doublerequired

    Percentage of the questionnaire that is already answered

    totalEmissions doublerequired

    Sum of all emissions up until now

    sectors

    object[]

    required

    Distribution of emissions per sector

  • Array [

  • emissions doublerequired
    id stringrequired

    Possible values: [transport, lifestyle, diet, home, publicservices, intro, personal, summary]

    name stringrequired

    sectorDetails

    object[]

    required

  • Array [

  • emissions doublerequired
    id stringrequired
    name stringrequired
  • ]

  • progress

    object

    Represents the current progress in a certain area:

    example:

    {
    name: 'transport', // Area
    count: 10, // Number of answered questions
    total: 20, // Total number of question in area
    progress: 0.5 // 50% answered
    }
    name stringrequired

    Name of the area

    count int32required

    No of answered questions in area

    total int32required

    Total number of questions in area

    progress doublerequired

    Progress percentage

  • ]

  • numberOfQuestions int32required

    Total number of questions

    currentQuestionIndex int32required

    Index of current question

Loading...