/
subscription_member_role_list ()

subscription_member_role_list ()

Function prototype

team_member_role_list ( session, [team], [member] )

API Version

All

Supported interfaces

SOAP, REST (Since API Version 2.7.31)

Description

Returns the list of ROLES that can be assigned to the members of a SUBSCRIPTION

The ROLES returned by this function can be used in other API functions like subscription_member_set () to assign ROLES to the member of a SUBSCRIPTION.

Note that the ROLES that can be assigned to a member of a SUBSCRIPTION are only those ROLES that the member has already in the TEAM OWNER of the SUBSCRIPTION. For example, if a person is member of a TEAM called “Linkcare” with roles “Staff” and “Case Manager”, then it is only possible to assign one of those ROLES as member of any SUBSCRIPTION owned by “Linkcare”. In this example, it would not be possible to assign the ROLE “Supervisor” to that member,

Input parameters:

  • session: a token obtained from a session_init () call

  • team: Reference or TEAM CODE of the TEAM owner of the SUBSCRIPTION

  • member: reference of the USER or TEAM to which we want to assign the ROLES as a member of the SUBSCRIPTIONTo differentiate between a USER or a TEAM, the reference must be built as the concatenation of the word “USER” or “TEAM” and the reference of the member, separated by a pipe (“|”) character. Example: “USER|2332”

  • subscription: optionally it is possible to indicate the reference of the SUBSCRIPTION instead of the team owner. The API will infer automatically the TEAM owner from the SUBSCRIPTION

Output parameters:

  • result/role_list: XML with the list of ROLES. Each ROLE contains:

    • role: Information about each ROLE

      • ref: Reference of the ROLE (e.g. 24 = CASE MANAGER)

      • name: Description of the ROLE in the active SESSION language

      • profiles/profile: list of profiles. Some ROLES have a sub-classification in "profiles" (sub-roles). For example, roles "Team Manager" and "Program Manager" are considered profiles of the parent ROLE “Admin”. See ROLE OBJECT.

        • ref: Reference of the ROLE (e.g. 24 = CASE MANAGER)

        • name: Description of the ROLE in the active SESSION language

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request example

team_member_role_list(“LCAAAAAAAAAAAA”, 1, "USER|23222")

Response

The response format is XML when the function has been invoked via the SOAP API, and JSON when it has been invoked via the REST API

Return Error codes

ERROR CODE

 

ERROR CODE

 

INVALID_TOKEN

The session token provided is not valid

TEAM.NOT_FOUND

The parent TEAM of the SUBSCRIPTION was not found

SUBSCRIPTION.NOT_FOUND

The SUBSCRIPTION was not found



Related content