Programs and Members

Resources and actions to manage programs and their members

Endpoints

List programs

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

Returns a list of programs in the organization

Query Parameters

NameTypeDescription

filter[id]

String

Program ID

sort

String

Available sort fields: name, created_at

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

List program members

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

Returns a list of members of the program

Path Parameters

NameTypeDescription

<program_id>*

String

Program ID

Query Parameters

NameTypeDescription

filter[id]

String

User ID

filter[email]

String

User email address

filter[role]

String

Member role

sort

String

Available sort fields: name , created_at

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

Add member to a program

POST https://api.upcoach.com/programs/<program_id>/members

Adds a new member to a program

Path Parameters

NameTypeDescription

<program_id>*

String

Program ID

Request Body

NameTypeDescription

user*

String

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

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

Resource Objects

Program

PropertyTypeDescription

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

PropertyTypeDescription

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

Last updated