Skip to content

Programs

APIs for program managament.

LookupProgram

    core.LookupProgram({id=programKindId})

Load specific program kind.

  • Object
  • id:Uuid! id to load
  • Program or Nil

LookupProgramInstance

    core.LookupProgramInstance(programId)

Load a specific program instance.

  • programId:Uuid! id to load
  • ProgramInfo or Nil

ListCohorts

    core.ListCohorts(programId)

Load the cohort list.

  • programId:Uuid! id to load
  • Cohort Array

ModifyProgramMembership

    core.ModifyProgramMembership({...})

Add or update user program and cohort status. Either email or user id can be provided.

  • Object
    • email: String email
    • userId: UUID user id
    • programId: UUID! required program id
    • cohortId: UUID cohort id
    • role: String member | trainer | observer
    • state: String active | completed | graduated | incomplete | withdrawn
  • ProgramInfo Array

ListActivePrograms

    core.ListActivePrograms()    

Load a list of all active programs.

None

  • ProgramInfo Array

UserTickets

    core.UserTickets({...})

Retrieve tickets for a specific user. Tickets represent a right to participate in a program.

  • Object
    • userId: UUID user id
    • state ready | consumed | canceled
  • ProgramTicket Array

ProgramChildList

    core.ProgramChildList("..id..")

Returns the list of program kind definitions that are children of the provided id.

  • id: UUID program kind id
  • ProgramKind Array

ProgramsAfter

    core.ProgramChildList({...})

Returns the available programs after a specific start date orderd by start descending.

  • Object
    • kind: UUID program kind
    • after: LocalDate date that the next program should start on or after
  • ProgramInfo Array

UpdateUserCohortState

    core.UpdateUserCohortState({...})

Update the state of a program participation for a user.

  • Object
    • userId: UUID user
    • programId: UUID program
    • cohortId: UUID cohort
    • state: active | completed | graduated | incomplete | withdrawn | dropped | refunded
    • comments: String comments
    • stateDetail: String detail
  • Boolean result

UpdateUserProgramDate

    core.UpdateUserProgramDate({...})

Update the state of a program participation for a user.

  • Object
    • userId: UUID user
    • programId: UUID program
    • cohortId: UUID cohort
    • dateKind stoppedAt | flaggedAt
    • date:Date date in YYYY-MM-DD format
  • Boolean result

ConfirmCohort

    core.ConfirmCohort({...})

Create or confirm a cohort based on program and name

  • Object
    • programId: UUID program
    • cohortName: String cohort name to search for
  • id of cohort

SyncCohort

    core.SyncCohort({...})

Sync cohort with query. The mode specifies whether to only include existing members or to add new members to the program based on the query. Closed will just move existing users within cohorts while open will also add users that do not exist.

  • Object
    • programId: UUID program
    • cohortId: UUID cohort
    • query: String user query to sync
    • role member | trainer | observer
    • mode open | closed
  • record count modified

CreateProgramTicket

    core.CreateProgramTicket({...})

Create program ticket allowing user to join program by consuming ticket. Provide user id or email.

  • Object
    • userId: UUID user
    • email: String email
    • programKindId: UUID program
    • externalId: UUID optional id of purchased item
    • sku: String SKU
    • baseSku: String base SKU
  • record count modified

ListClosingParticipants

(pending)

Program Join

    core.ProgramJoin({...})

Join a user to a program

  • Object
    • userId: UUID user
    • programId: UUID email
    • programKindId: UUID program
    • startDate: Date start date (for open programs)
    • start: String open | fixed
  • Result

Obsolete

The following functions can now be accomplished with the program and participant query languages.

  1. ListUserPrograms
  2. ListPrograms
  3. UserFuturePrograms
  4. UserActivePrograms