Replaces the review form of one review type for an employee's preparation task. Required scope: w_reviews.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
This endpoint uses thew_reviewsscope, 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
activecycle, 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
| key | description |
|---|---|
| reviewCycleId | Review cycle id |
| id | Task (review aggregate) id |
| reviewType | One 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.
| key | type | description |
|---|---|---|
| questionnaire.sections | array | Ordered list of sections (required, may be empty) |
| questionnaire.sections[].id | string | Optional section id (UUID) |
| questionnaire.sections[].body | string | Section title / header text (required) |
| questionnaire.sections[].position | integer | Order of the section (≥ 0). Defaults to the section's index when omitted |
| questionnaire.sections[].questions | array | Ordered list of questions (required) |
| questionnaire.sections[].questions[].id | string | Optional question id (UUID) |
| questionnaire.sections[].questions[].body | string | Question text (required) |
| questionnaire.sections[].questions[].position | integer | Order of the question within the section (≥ 0). Defaults to the question's index when omitted |
| questionnaire.sections[].questions[].type | string | Question 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.mandatory | boolean | Whether an answer is required on submission |
| questionnaire.sections[].questions[].metadata.semantic_type | string | Semantic role of the question. Accepts snake_case or PascalCase. One of: section_rating, overall_rating |
| questionnaire.sections[].questions[].metadata.rating_options | object | Map of rating value to label |
| questionnaire.sections[].questions[].metadata.answer_options.choices | object | Map 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"
}| key | type | description |
|---|---|---|
| reviews[].id | string | Review id |
| reviews[].type | string | Review type |
| reviews[].status | string | draft or ready |
| reviews[].master_template_id | string | Master template the follower template derives from |
| reviews[].follower_template_id | string | The employee's customized template |
| reviews[].update_form_url | string | Relative URL of this endpoint for the review |
| status | string | ready when all customizable reviews of the task have a form and the task was marked ready, otherwise draft |
Error responses
| Status | Condition |
|---|---|
| 400 | Validation 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"} |
| 401 | Missing or invalid token |
| 403 | Missing w_reviews scope, account token without member_id, or the caller is not allowed to edit this employee's review forms |
| 404 | Review 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 |
