Missions

Replace mission's tasks

Changed on

Update 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 URL
    https://<base_url>
  • Auth
    HTTP bearer

Headers

Acceptstring

e.g. application/json

Request body

Example request

{
  "todo": {
    "user_id": "5fbea9662804f40033935d9b",
    "tasks": [
      {
        "value": "new value"
      }
    ]
  }
}

Response

OK

mission_idstring
titlestring
created_datestring
updated_datestring
campaign_idstring
user_idstring
creator_idstring
store_idstring
finished_datestring
statusstring

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