# Schedule

In this section you will see how to manage the users' schedule in Wasi.

# Get all the tasks

❗️ Important

When all tasks are listed, filters are available, see the Filters section.

To get the list of all the tasks in Wasi, you have the URI:

api.wasi.co/v1/management/tasks

This should return a JSON similar to this one:

{
    "0": {
        "management_id": 1,
        "management_type_id": "3",
        "management_type_label": "Meeting",
        "management_status_id": "2",
        "management_status_label": "In process",
        "subject": "Reunion con cliente",
        "description": "Descripcion de la reunion",
        "date": "2019-01-08 11:47:00",
        "compliance_degree": 50,
        "id_user": 9,
        "alert": 5
    },
    "1": {
        "management_id": 2,
        "management_type_id": "1",
        "management_type_label": "Call",
        "management_status_id": "1",
        "management_status_label": "Pending",
        "subject": "Llamar cliente ",
        "description": "Descripcion llamada",
        "date": "2019-01-15 11:00:00",
        "compliance_degree": 0,
        "id_user": 9,
        "alert": "false"
    },
    "status": "success"
}

❗️ Important

For all requests it is necessary to send the access credentials, see Access Credentials.

# Filtering

The following are the existing filters for the task search, see the Get All Tasks section:

Filter Type Required Detail
start Date Yes Assigned date from which tasks should be listed, must be in the format YYYY-mm-dd.
end Date Yes Assigned date until which tasks must be listed, must be in the format YYYY-mm-dd.
id_user Number Yes Identifier of the user assigned in the task.
management_type Array No Arrangement with task types to be listed. See Task fields.

# Get a task

To get a task in Wasi, you have the URI:

api.wasi.co/v1/management/get/#id_task

For a task whose id_task is 1 and the date is 2019-11-30, the URI would be:

api.wasi.co/v1/management/get/1?date=2019-11-30

This should return a JSON similar to this one:

{
    "management_id": 1,
    "management_type_id": "3",
    "management_type_label": "Meeting",
    "management_status_id": "2",
    "management_status_label": "In process",
    "subject": "Para Clientes buenavista",
    "description": "descripcion tarea",
    "date": "2019-11-30 11:47:00",
    "compliance_degree": 50,
    "id_user": 1,
    "alert": 5,
    "clients": [
        "1"
    ],
    "properties": [
        "1",
        "2"
    ],
    "status": "success"
}

❗️ Important

For all requests it is necessary to send the access credentials, see Access Credentials.

# Add a task

To add a new task in Wasi, you have the URI:

api.wasi.co/v1/management/add

To know which are the parameters that must be sent you can see the section Task fields, the fields that we can send as parameter in the table must appear as modifiable.

You can send the notify_clients parameter to indicate whether clients should be notified about the meeting. This notification will only be sent if the task is of type Meeting or Visit, if it is not Completed and if the client allows the sending of mails.

After sending the parameters correctly you should return a JSON like the one below:

{
    "status": "success"
}

❗️ Important

The parameters must be sent via POST, as well as remembering that for all requests it is also necessary to send the access credentials, see Access Credentials.

# Update task

To update a task in Wasi, you have the URI:

api.wasi.co/v1/management/update/#id_task?date=YYYY-mm-dd

You must send the id and additionally the date assigned to it, for example for a task whose management_id is 1, and the date is 2019-11-31 the URI would be:

api.wasi.co/v1/management/update/1?date=2019-11-31

To know which are the fields that can be updated you can see the section Task fields, the fields that we can send as parameter in the table must appear as modifiable.

This should return a JSON like the one below:

{
    "status": "success"
}

❗️ Important

The parameters must be sent via POST, as well as remembering that for all requests it is also necessary to send the access credentials, see Access Credentials.

# Delete task

To remove a task in Wasi, you have the URI:

api.wasi.co/v1/management/delete/#id_task?date=YYYY-mm-dd

You must send the id and additionally the date assigned to it, for example to remove a task whose management_id is 1, and the date is 2019-11-31 the URI would be:

api.wasi.co/v1/management/delete/1?date=2019-11-31

This should return a JSON like the next one:

{
    "status": "success"
}

❗️ Important

The parameters must be sent via POST, as well as remembering that for all requests it is also necessary to send the access credentials, see Access Credentials.

Last Updated: 8/3/2020, 9:51:52 PM