Todo

Add a To-Do item

Add a todo item in the binder identified by {binder_id}.

POST /{binder_id}/todos

JSON Parameters
Name Type Description
name String Todo name
due_time Number Optional: The due time in number since 1/1/1970 0:0:0
assignee_id String Optional: The user id who gets assigned
reminder_time Number Optional: The time to remind in number since 1/1/1970 0:0:0
comments String Optional: Comments
description String Optional: Description
Sample Request
POST /B9rArkzRe094lPPiMH4UpS8/todos
{
  "name": "Project X",
  "due_time": 1398495600000,
  "assignee_id": "Ua9hIj1Bi33F3bxq5yQ4gCH",
  "reminder_time": 1398296662605,
  "comments": "Need to add budgets"
}
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "todos": [
            {
                "id": 266,
                "name": "Project X",
                "updated_time": 1398292224675
            }
        ]
    }
}

Update a To-Do Item

Update a todo item in the binder identified by {binder_id} & {todo_id}.

POST /{binder_id}/todos/{todo_id}

JSON Parameters
Name Type Description
name String Todo name
due_time Number The due time in number since 1/1/1970 0:0:0
assignee_id String The user id who gets assigned
reminder_time Number The time to remind in number since 1/1/1970 0:0:0
comments String Comments
description String Description
completed Boolean Set the todo item to be completed. Default is false.
fieldsToNull String Fields with comma separated to be deleted; such fields are: assignee_id, due_time, and reminder_time

Sample Request
POST /B9rArkzRe094lPPiMH4UpS8/todos/266
{
  "assignee_id": "Utkj3YC5BxRHCCaq9widP67",
  "fieldsToNull": "due_time,reminder_time"
}
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "todos": [
            {
                "id": 266,
                "name": "Project X",
                "updated_time": 1398292224675
            }
        ]
    }
}

Delete a To-Do item

Delete a todo item in the binder identified by {binder_id} & {todo_id}.

DELETE /{binder_id}/todos/{todo_id}

Sample Request
DELETE /B9rArkzRe094lPPiMH4UpS8/todos/266
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

List To-Do Items in Binder

Get all todo items in the binder identified by {binder_id}

GET /{binder_id}/todos

URL Parameters
Name Type Description
filter String Optional: Default is "incompleted".
  • incompleted - incompleted tasks
  • completed - completed tasks
  • all - all tasks

Sample Request
GET /Bks9ZahBYl13Z9CKjB1srX5/todos
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "todos": [
        {
            "id": 266,
            "name": "Project X",
            "creator_id": "Utkj3YC5BxRHCCaq9widP67",
            "creator_name": "John Doe",
            "due_time": 1398495600000,
            "assignee_id": "Ua9hIj1Bi33F3bxq5yQ4gCH",
            "assignee_name": "Smith Fun",
            "reminder_time": 1398296662605,
            "comments": "Need to add budgets",
            "completed": false,
            "created_time": 1398292224675,
            "updated_time": 1452045693982,
            "description": "",
            "attachments": [
                {            
                    "attachment_id": 1102,
                    "file_id": "51d6b15e-bc6b-469a-87c2-36c8494ba22e",
                    "file_name": "Notice123.pdf",
                    "created_time": 1452045693982,
                    "updated_time": 1452045693982
                }
            ]            
        }
        ]
    }
}

To-Do Attachment Upload

Upload todo attachment to the binder identified by {todo_id} and {binder_id} via multipart/form-data.

POST /{binder_id}/todos/{todo_id}/attachments

Multipart/form-data Parameters
Name Type Description
file file Actual file that is uploaded to the Todo as the attachment.

Sample Request
POST /B9rArkzRe094lPPiMH4UpS8/todos/266/attachments
...
Content-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266
Content-Length: 554

-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="file"; filename="image.jpg"
Content-Type: image/jpg

Content of image.jpg
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "todo_id": 266,
        "attachment_id": 47,
        "created_time": 1398292224675,
        "updated_time": 1398292224675
    }    
}

Remove To-Do Attachment

Remove the uploaded Todo attachment identified by {attachment_id}, {todo_id}, and {binder_id}.

DELETE /{binder_id}/todos/{todo_id}/attachments/{attachment_id}

Sample Request
DELETE /B9rArkzRe094lPPiMH4UpS8/todos/266/attachments/47
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Get User's Todos

Get all the incompleted todos assigned to the user identified by {user_id}.

GET /{user_id}/todos

Sample Request
GET /me/todos
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "binders": [
            {
                "binder_id": "B34gq491gkjFjbmXYW5xQkC",
                "count": 2,
                "todos": [
                    {
                        "id": 266,
                        "name": "Project X",
                        "creator_id": "Utkj3YC5BxRHCCaq9widP67",
                        "creator_name": "John Doe",
                        "due_time": 1398495600000,
                        "assignee_id": "Ua9hIj1Bi33F3bxq5yQ4gCH",
                        "assignee_name": "Smith Fun",
                        "reminder_time": 1398296662605,
                        "comments": "Need to add budgets",
                        "completed": false,
                        "description": "",						
                        "updated_time": 1414713251918,
                        "created_time": 1414713251914
                    },
                    {
                        "id": 274,
                        "name": "Project Y",
                        "creator_id": "Utkj3YC5BxRHCCaq9widP67",
                        "creator_name": "John Doe",
                        "due_time": 0,
                        "assignee_id": "Ua9hIj1Bi33F3bxq5yQ4gCH",
                        "assignee_name": "Smith Fun",
                        "reminder_time": 0,
                        "comments": "",
                        "completed": false,
                        "description": "",
                        "updated_time": 1414715708597,
                        "created_time": 1414715708593
                    }
                ]
            },
            {
                "binder_id": "By0mC8O3r0EI0UXSMWshOw5",
                "count": 1,
                "todos": [
                    {
                        "id": 27,
                        "name": "Training Class",
                        "creator_id": "UiaduESWsbzFoK9TOldC6zF",
                        "creator_name": "jim test",
                        "due_time": 1471917343566,
                        "assignee_id": "Ua9hIj1Bi33F3bxq5yQ4gCH",
                        "assignee_name": "Smith Fun",
                        "reminder_time": 0,
                        "comments": "",
                        "completed": false,
                        "description": "",
                        "updated_time": 1414798605588,
                        "created_time": 1414798605577
                    }
                ]
            }
        ]
    }
}