References

Tasks Resources

Endpoints

GET
https://api.upcoach.com/todos
List tasks

Returns a list of tasks

Parameters
Query
filter[id]

Task ID

filter[done]

Boolean: Status, done (true) or not done (false)

filter[user]

Assignee user ID

filter[program]

Program ID

filter[overdue]

Boolean: Overdue (true) or not overdue (false)

filter[due_date]

Allowed values: today, yesterday, this-week, last-week, this-month, last-month

filter[done_date]

Allowed values: today, yesterday, this-week, last-week, this-month, last-month

sort

Allowed sort fields: created_at, due_date

Responses
200: OK

A paginated list of Task Resource Objects

{
    "data": [
      {
        "id": "...",
        "user": {
          "avatar": "...",
          "email": "...",
          "id": "...",
          "name": "...",
          "timezone": "..."
        },
        "program": {
          "id": "...",
          "name": "...",
          "created_at": ...
        },
        "description": "...",
        "due": ...,
        "done": ...,
        "created_at": ...
      },
    ...
  ],
  "links": {
    "first": "...",
    "last": "...",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": ...,
    "from": ...,
    "last_page": ...,
    "path": "...",
    "per_page": ...,
    "to": ...,
    "total": ...
  }
}

POST
https://api.upcoach.com/todos
Add a task

Adds a new task to a user on a program

Parameters
Body
program *

Program ID

user *

Assignee user ID, the user has to be a member on the given program

text *

Description/detail text

due

String: Due date (Unix time stamp, any format, relative formats)

priority

String: It can be high, medium, low or empty

Responses
200: OK

Task Response Object

{
    "todo": {
      "id": "...",
      "user": {
        "avatar": "...",
        "email": "...",
        "id": "...",
        "name": "...",
        "timezone": "..."
      },
      "program": {
        "id": "...",
        "name": "...",
        "created_at": ...
      },
      "description": "...",
      "due": ...,
      "done": ...,
      "priority": "...",
      "created_at": ...
    }
}

PUT
https://api.upcoach.com/todos/{todo}
Update a task

Updates a task

Parameters
Path
todo *

Task ID

Body
done *

boolean, mark a task as done or not-done

Responses
200: OK

A Task Resource Object

{
    "task": {
        "id": "...",
        "user": {
          "avatar": "...",
          "email": "...",
          "id": "...",
          "name": "...",
          "timezone": "..."
        },
        "program": {
          "id": "...",
          "name": "...",
          "created_at": ...
        },
        "description": "...",
        "due": ...,
        "done": ...,
        "created_at": ...
      }

}

Resource Objects

Task

Property

Type

Description

id

string

Task ID

user

User

Assignee user

program

Program

Program

title

string

Title

description

string

Description/detail

due

integer | null

Due date (Unix timestamp)

done

boolean

Status (done or not)

priority

string

Priority value ( high, medium, low or empty )

recurring

boolean

Whether the task is a recurring one or not

recurrence_type

string

If the task is a recurring task, one of the following values: daily, every-weekday, weekly-on-day, bi-weekly-on-day, monthly-on-first-day, monthly-on-second-day, monthly-on-third-day, monthly-on-fourth-day, monthly-on-last-day, every-3-months-on-first-day, every-6-months-on-first-day, annually-on-date, custom

recurrence_pattern

object

Custom recurrence pattern configuration, only if recurrence_type is custom

created_at

integer

Created date and time (Unix timestamp)

Previous
Programs and Members Resources