Responses and next-state hinting

Responses fall into three groups, corresponding to the survey state.

Basic request

PUT survey/next

Responses fall into three groups, corresponding to the survey state (represented by sequence_num).

Notwithstanding that initial validation of parameters must also pass, the state responses are:

Initial state response

PfP returns an object with four keys:

  • type: pair indicates you have been provided with a statement pair, that should now be presented to the respondent
  • data: object containing the data you need to present in the next PUT in the sequence
    • next_sequence_num: the next logical sequence number value for the next sequence_num to be PUT
    • statements: item A and item B to be presented to the user
    • token: a one-time unique string that must be PUT with the next method call in the sequence
  • info: helpful information for the developer
  • warnings: a key-value pair containing information that may need to be acted on.
{
    "type": "pair",
    "data": {
        "next_sequence_num": 1,
        "statements": {
            "A": "I work to have my answer ready on time",
            "B": "I get agreement with what I want"
        },
        "token": "oq1eqAZyq0e1jvkpsTkUpHwNi9f1fF1f"
    },
    "info": "This is the start of a survey. Set the `sequence_num` to 1, and provide the `token`, when you PUT the `choice` for the provided pair in the next `survey/next` API request. No survey progress data has been saved yet.",
    "warnings": {
        "REDUNDANT_CHOICE": "You passed a value for `choice` but choice is not processed in the initial PUT. You should only be rendering the provided paired statements (preparing the *next* PUT with the user's choice)."
    }
}
 

Second-phase state responses

For all but the 78th sequence_num, valid PUT requests will return the same four keys as the initial state, with the exception that the warnings key’s value will be null.

{
    "type": "pair",
    "data": {
        "next_sequence_num": 4,
        "statements": {
            "A": "She makes sure machines are used well",
            "B": "She admires the shape of things"
        },
        "token": "mPcwJ0XA2Te3KuzpK0j44qXiFlfQw2J7"
    },
    "info": "Statement pair #4 is provided. The choice for statement pair 3 is saved.",
    "warnings": null
}

Third-phase state responses

The third and final phase state of a survey will require the same parameters as the second phase, but, instead of a new set of paired statements it will deliver data for a simple report:

  • type: report indicates you have been provided with a report based on the completion of the survey
  • data: object containing the data for the report
    • scores: 12 scores,one for each factor (factor A to factor L)
      • factor: the name of the factor being assessed
        • score: a value between 0 and 11
        • text: a brief description of the meaning of the score
      • consistency: a value between 0 and 100, representing the consistency of responses given during the assessment
  • info: helpful information for the developer
  • warnings: a key-value pair containing information that may need to be acted on. The key will be “COMPLETED” if there are no validation errors.
{
    "type": "report",
    "data": {
        "scores": {
            "A": {
                "factor": "Allocate time",
                "score": "1.5",
                "text": "We start work without organising our time in advance, and we evolve a plan as we go."
            },
            "B": {
                "factor": "Manage time",
                "score": "0.0",
                "text": "We react to events as they happen, and we can be drawn away from our objectives, and lose sight of our priorities."
            },
            "C": {
                "factor": "Task time",
                "score": "0.0",
                "text": "Our time is oriented more toward ongoing processes than toward achieving specific project tasks. That may be appropriate to our roles; if it is not, we need to focus on projects more clearly."
            },
            "D": {
                "factor": "Process time",
                "score": "0.0",
                "text": "When others require our time, we weigh up their needs against our own before deciding whether or not to vary our timetable."
            },
            "E": {
                "factor": "Pace",
                "score": "0.0",
                "text": "We fit in with the pace of activities around us, responding to events as they occur."
            },
            "F": {
                "factor": "Value",
                "score": "0.0",
                "text": "We recognise that we could get more value from our time."
            },
            "G": {
                "factor": "Activity time",
                "score": "0.0",
                "text": "We are able to relax from activities, and we do not feel we should be busy just to keep occupied."
            },
            "H": {
                "factor": "Social time",
                "score": "0.0",
                "text": "We spend little time on social chitchat."
            },
            "I": {
                "factor": "Habitual time",
                "score": "0.0",
                "text": "We are not conscious of fixed habits, and we consider we have a fresh approach to each situation."
            },
            "J": {
                "factor": "Wasted time",
                "score": "0.0",
                "text": "We avoid spending time on relationships that go nowhere, or result in feelings of frustration or failure."
            },
            "K": {
                "factor": "Withdrawal",
                "score": "2.0",
                "text": "We are outgoing people who take action and join in with others."
            },
            "L": {
                "factor": "Interaction",
                "score": "2.5",
                "text": "We choose carefully how open and trusting we will be in our relationships. We are able to conceal our thoughts and intentions."
            }
        },
        "consistency": 0
    },
    "info": "This survey is finished; report data is shown. See the docs for standalone `report` methods",
    "warnings": {
        "COMPLETED": "The assigned survey was previously completed (no data was saved)."
    }
}