Close a task
You can close a task through the API.
Request
This method allows you to close a task:
PUT /company/{companyID}/task/{taskID}
Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| companyID | path | string | Company identifier | Wy3EOp2NP3p1KMq8 | |
| taskID | path | string | id of the task | vYJA39J3q5plNQwE | |
| done | path | boolean | done of the task | true |
Tip
Enter true in the done parameter to indicate that a task has been completed.
Request example
cURL Request
curl -X PUT https://api.flatchr.io/company/Wy3EOp2NP3p1KMq8/task/vYJA39J3q5plNQwE
-H "Authorization: Bearer {token}"
-H 'Content-Type: application/json'
-d '{"done":true}'
Response
| Name | Type | Description |
|---|---|---|
| id | string | Task identifier |
| description | string | Task description |
| value | [string] | The element(s) the task relates to: member for a user and applicant for a candidate |
| type | string | Type (always equal to "task") |
| date | timestamp | Task date |
| done | boolean | Has the task been completed? |
Response example
{
"id": "vYJA39J3q5plNQwE",
"description": "Remember to send a rejection email when you archive a candidate",
"value": [
"member=ZmPNJ9LLLMp5LwDB"
],
"type": "task",
"date": "2021-09-24T09:42:47.000Z",
"done": true
}