Updates the results of a checklist instance by applying an edit. The changes are tracked per user.
Locked checklists will save - but not apply the edit.
The main edits to the checklist are done using the edit
object. Each edit is a revision to the checklist
and is stored in the database. The combined edits are used to generate the final checklist results.
The keys should match the keys in the Checklist Template.
The structure is as follows:
{
"section_key1": {
"line_key1": { "value": "new value", "notes": "Optional note" },
"line_key2": { "value": "new value", "media": [{"id": 1}] },
"section_key2": {
"line_key": { "notes": "Optional note" }
}
}
The line dictionary supports the following keys: value, notes, media - where media is an list of media objects.
The line dictionary can include other keys, but they may not be shown in reports or used in the system.
Do not send keys that have not changed - when creating or editing a checklist, only send the keys that needed.
The section and line keys should match the checklist template - the validation does not currently check this,
but mismatched keys will be ignored and not displayed.
When adding a media object to the media array, only the id is required. The media array that is returned from
the API will inclue the full media object.
Required permissions:
- IsAuthenticated
- WorkspaceRequired
- HasRolePermissions::checklist_edit