References

Programs and Members Resources

Resources and actions to manage programs and their members

GET
https://api.upcoach.com/programs
List programs

Returns a list of programs in the organization

Parameters
Query
filter[id]

Program ID

sort

Available sort fields: name, created_at

per_page

Number of paginated items

Responses
200: OK

A paginated list of Program Resource Objects

{
  "data": [
    {
      "id": "...",
      "name": "...",
      "created_at": ...
    },
    ...
  ],
  "links": {
    "first": "...",
    "last": "...",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": ...,
    "from": ...,
    "last_page": ...,
    "path": "...",
    "per_page": ...,
    "to": ...,
    "total": ...
  }
}

GET
https://api.upcoach.com/programs/<program_id>/members
List program members

Returns a list of members of the program

Parameters
Path
<program_id> *

Program ID

Query
filter[id]

User ID

filter[email]

User email address

filter[role]

Member role

filter[timezone]

Member timezone

sort

Available sort fields: name , created_at

Responses
200: OK

A paginated list of Program Member Resource Objects

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

POST
https://api.upcoach.com/programs/<program_id>/members
Add member to a program

Adds a new member to a program

Parameters
Path
<program_id> *

*

Program ID

Body
user *

ID of the user to be added to the program as a member

Responses
200: OK

Program Member Resource Object

{
    "program_member": {
      "id": "...",
      "avatar": "...",
      "name": "...",
      "email": "...",
      "timezone": "...",
      "role": "...",
      "created_at": ...
    }
}

GET
https://api.upcoach.com/programs/<program_id>/member-timezones
List program member timezones

Returns a list of timezones of program members

Parameters

No parameters

Responses
200: OK

A plain list of all the distinct timezones available in the program

{
  "timezones": [
     "Europe/Istanbul",
     "Europe/London",
     ...
  ]
}

Resource Objects

Program

Property

Type

Description

id

string

Program ID

name

string

Program name

created_at

integer

Program created date and time (Unix timestamp)

Program Member

Inherits all the properties of the User Resource and extends it with the following properties

Property

Type

Description

role

string

Member role, can be leader , coach or member

created_at

integer

Program member created at (Unix timestamp)

info

object or null

A key-value object listing all the client custom fields. If there are no custom fields, it will be a null value

Previous
Notes Resources