Reopen a completed task
PUT /tasks/{uuid}/actions/reopen
/tasks/{uuid}/actions/reopenTurns a completed task back into an open one. It keeps its due date and the rest of its data, but the reminder it had before being completed is not restored.
When to use: When a task was completed by mistake or the work has to be done again, and before editing a completed task. It is safe to repeat: reopening an open task changes nothing.
When not to use: To mark a pending task as done, use complete_task. To create a new task for new work, use create_task.
Side effects: A task.reopened entry appears in the activity of each record the task is linked to, done by the person who owns the token (marked «via Maia» when Maia made the request); the earlier completion stays in the history. If the due date has passed the task is overdue again. To get a reminder again, set it with update_task. Nothing is sent and no automation or webhook fires.
Permissions: Requires a CRM seat and the crm.tasks_notes.write capability. The user must also be able to see every contact, company and opportunity the task is linked to (crm.contacts_companies.read for contacts and companies, access to the pipeline for opportunities).
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the task. Get it from list_tasks.
uuidThe updated Task resource
TypeScript Definitions
Use the request body type in TypeScript.
Tasks of the public API (plan fase 4, Tasks 17 and 18). The reads are generated from the approved proposal by
fase-4/tools/gen_task_read.py and the writes by fase-4/tools/gen_task_write.py, edited by hand afterwards: the texts
are the proposal's. Every operation checks the
CRM access in its provider or processor before anything else, because API Platform evaluates security after the
provider.
list_tasks pages by cursor (paginationViaCursor goes on the resource: on the operation API Platform 3.4.17 loses
it) and gives no total. cursor is the opaque position of each task, which API Platform copies into the cursor[gt]
of hydra:next (the last item) and the cursor[lt] of hydra:previous (the first one); it is never published.
assignee, completed_by and created_by are arrays so that they keep the shape of the proposal; the related
records are {@see \App\Application\Crm\RecordRelationView} arrays.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PUT "https://api.easymailing.com/tasks/7c1e5a90-3b24-4d8f-a6e1-0f9d2c4b8a13/actions/reopen" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "expected_version": 1 }'{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "title": "string", "description_html": "string", "status": "open", "priority": "none", "type": "general", "assignee": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "name": "string", "email": "user@example.com" }, "due_at": "2019-08-24T14:15:22Z", "overdue": true, "reminder_offset_minutes": 0, "reminder_at": "2019-08-24T14:15:22Z", "completed_at": "2019-08-24T14:15:22Z", "completed_by": { "kind": "user", "name": "string" }, "created_by": { "kind": "user", "name": "string" }, "initiated_via": "ui", "contacts": [ { "iri": "/entity/1", "label": "string", "secondary": "string" } ], "companies": [ { "iri": "/entity/1", "label": "string", "secondary": "string" } ], "opportunities": [ { "iri": "/entity/1", "label": "string", "secondary": "string" } ], "version": 0, "can_edit": true, "can_delete": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}