Missions
Replace mission's tasks
Changed onUpdate the tasks on a mission of type todo.
The todo object must contain all the tasks defined with the new values.
Once updated the status of the mission is set to finished.
put/public/api/missions/{id}/tasks
Request
- Base URLhttps://<base_url>
- AuthHTTP bearer
Headers
Acceptstring
e.g. application/json
Request body
Example request
{
"todo": {
"user_id": "5fbea9662804f40033935d9b",
"tasks": [
{
"value": "new value"
}
]
}
}Response
OK
Example response
{
"mission_id": "54ab03c6546847ee0d30084b",
"title": "Action plans",
"created_date": "2021-05-10T09:21:40.232Z",
"updated_date": "2021-05-10T09:21:40.232Z",
"campaign_id": "54ab03c6546847ee0d30088b",
"user_id": "5fbea9662804f40033935d9b",
"creator_id": "54ab03c6546847ee0d30089a",
"store_id": "54ab03c6546847ee0d30081a",
"finished_date": "2021-05-11T14:24:57.429Z",
"status": "finished",
"todo": {
"user_id": "5fbea9662804f40033935d9b",
"tasks": [
{
"value": "new value",
"is_finished": true,
"finished_date": "2021-05-11T14:24:57.429Z"
}
]
}
}Changes
- info
added optional request body
- info
- info
added the media type
application/jsonfor the response with the status
- info