API Reference
API Reference

/review-cycles/:reviewCycleId/tasks/:id/forms/:reviewType

Replaces the review form of one review type for an employee's preparation task. Required scope: w_reviews.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

This endpoint uses the w_reviews scope, which must be enabled through the Integrations section found within the Settings menu.

Requires a user token, or an account token together with the member_id query parameter (the edit is recorded against that member). An account token without member_id gets 403 Account tokens need a member_id for this operation. member_id is ignored for user tokens. The caller must be one of the following:

  • the reviewee's manager, directly or higher up the reporting line
  • the manager assigned to the review aggregate
  • a member with permission to manage review cycles

Sets the questionnaire that reviewers of one review type answer for this employee. The first update creates a per-employee follower template of the cycle's master template for that review type, and later updates change it. The master template's own sections are always kept: the sections you send are added to them, and each call replaces the sections added by the previous call. Use GET /review-cycles/:reviewCycleId/tasks/:id/forms/:reviewType to read the current form.

Preconditions:

  • The cycle must allow customization of reviewType, and the task must contain at least one review of that type.
  • In an active cycle, you cannot edit a form that has already been marked as ready.

After the update, the task is marked as ready automatically once every customizable review type of the task has a customized form. Otherwise it stays in draft, and you can mark it ready with PUT /review-cycles/:reviewCycleId/tasks/:id.

Path parameters

keydescription
reviewCycleIdReview cycle id
idTask (review aggregate) id
reviewTypeOne of self, manager, peer, upwards

Request body

{
  "questionnaire": {
    "sections": [
      {
        "body": "Goals",
        "position": 0,
        "questions": [
          {
            "body": "What progress has the employee made toward their goals?",
            "position": 0,
            "type": "paragraph"
          },
          {
            "body": "Overall rating",
            "position": 1,
            "type": "star_rated",
            "metadata": {
              "mandatory": true,
              "semantic_type": "overall_rating"
            }
          }
        ]
      }
    ]
  }
}

The request rejects unknown keys.

keytypedescription
questionnaire.sectionsarrayOrdered list of sections (required, may be empty)
questionnaire.sections[].idstringOptional section id (UUID)
questionnaire.sections[].bodystringSection title / header text (required)
questionnaire.sections[].positionintegerOrder of the section (≥ 0). Defaults to the section's index when omitted
questionnaire.sections[].questionsarrayOrdered list of questions (required)
questionnaire.sections[].questions[].idstringOptional question id (UUID)
questionnaire.sections[].questions[].bodystringQuestion text (required)
questionnaire.sections[].questions[].positionintegerOrder of the question within the section (≥ 0). Defaults to the question's index when omitted
questionnaire.sections[].questions[].typestringQuestion type. Accepts snake_case (e.g. star_rated) or PascalCase (e.g. StarRated). One of: paragraph, paragraph_star_rated, paragraph_numeric_rated, paragraph_custom_rated, single_choice, multiple_choice, star_rated, numeric_rated, custom_rated
questionnaire.sections[].questions[].metadata.mandatorybooleanWhether an answer is required on submission
questionnaire.sections[].questions[].metadata.semantic_typestringSemantic role of the question. Accepts snake_case or PascalCase. One of: section_rating, overall_rating
questionnaire.sections[].questions[].metadata.rating_optionsobjectMap of rating value to label
questionnaire.sections[].questions[].metadata.answer_options.choicesobjectMap of choice key to label

Results

Returns 200 with the updated reviews of the requested type and the resulting task status.

{
  "reviews": [
    {
      "id": "4d6",
      "type": "manager",
      "status": "ready",
      "master_template_id": "3001",
      "follower_template_id": "spi-manager-follower-template",
      "update_form_url": "/spi/v3/review-cycles/4d6/tasks/4d4/forms/manager"
    }
  ],
  "status": "ready"
}
keytypedescription
reviews[].idstringReview id
reviews[].typestringReview type
reviews[].statusstringdraft or ready
reviews[].master_template_idstringMaster template the follower template derives from
reviews[].follower_template_idstringThe employee's customized template
reviews[].update_form_urlstringRelative URL of this endpoint for the review
statusstringready when all customizable reviews of the task have a form and the task was marked ready, otherwise draft

Error responses

StatusCondition
400Validation failed (missing questionnaire or sections, missing body, invalid type / semantic_type, non-UUID id, unknown fields, invalid reviewType). The body is keyed by field
400{"message": "Review form cannot be customized"}: the cycle does not allow customization of this review type
400{"message": "Review form cannot be edited once marked ready in an active cycle"}
401Missing or invalid token
403Missing w_reviews scope, account token without member_id, or the caller is not allowed to edit this employee's review forms
404Review aggregate not found (unknown task or task of another cycle), Review not found (the task has no review of reviewType), or Review cycle type not found
409{"message": "Sorry, a version mismatch error occurred. Please refresh the page and try again.", "errorCode": "aggregate_request_version_mismatch"}: the form was changed elsewhere since it was last saved
Path Params
string
required

Review cycle id

string
required

Task (review aggregate) id, as returned in preparation_tasks[].id / active_tasks[].id of GET /review-cycles/:reviewCycleId/tasks

string
enum
required

Type of review whose form is replaced

Allowed:
Query Params
string

Required when using an account token: the member (SPI key, from GET /members) making the edit. Without it the request gets 403. Ignored for user tokens.

Body Params
questionnaire
object
required
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain