Tasks

Endpoints

List tasks

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

Returns a list of tasks

Query Parameters

NameTypeDescription

filter[id]

String

Task ID

filter[done]

Boolean

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

filter[user]

String

Assignee user ID

filter[program]

String

Program ID

sort

String

Allowed sort fields: created_at, due_date

{
    "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": ...
  }
}

Add a task

POST https://api.upcoach.com/todos

Adds a new task to a user on a program

Request Body

NameTypeDescription

program*

String

Program ID

user*

String

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

text*

String

Description/detail text

due

String

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

priority

String

It can be high, medium, low or empty

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

Resource Objects

Task

PropertyTypeDescription

id

string

Task ID

user

Assignee user

program

Program

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 )

created_at

integer

Created date and time (Unix timestamp)

Last updated