Create a new checklist instance (aka a Form) from a template.
The template
field is required and should be the ID of the checklist_template to use.
The checklist is optionally linked to a project and an asset.
Use an unique client_id
to avoid duplicates. Using a client_id
that already exists will result in a 400 error.
The main edits to the checklist are done using the edit
object. Each edit is a change 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 key 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_create