team_member_get ()

team_member_get ()

Function prototype

team_member_get (session, member, team, type)

API Version

All

Supported interfaces

SOAP, REST (Since API Version 2.7.31)

Description

Returns the information of a member of a TEAM including the ROLES assigned

Required permissions: The active user must have role XXXX. Otherwise an INSUFFICIENT_PRIVILEGES error will be returned.

Input parameters:

  • session: is the session token obtained in the session_init() call

  • member: reference of the member. It must be a USER or TEAM reference. To 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”

  • team: Reference or TEAM CODE of the parent TEAM

  • type: type of member (“TEAM” or “USER”)

Output parameters:

  • result: XML with all the data

    • member

      • data: general data but the TEAM member

        • name: complete name of the user/ team

        • description

        • type: type of TEAM (“UNIT”, “HOSPITAL”, etc…)

      • 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 1

Example requesting the information of a TEAM as the member of another parent TEAM

team_member_get("LC383DDD8D8", 3441, 1, "TEAM")

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

Request example 2

Example requesting the information of a USER as the member of another parent TEAM

team_member_get("LC383DDD8D8", 5325, 1, "USER")

Response

Return Error codes

ERROR CODE

 

ERROR CODE

 

INVALID_TOKEN

The session token provided is not valid

TEAM.NOT_FOUND

The parent TEAM was not found

WRONG_PARAMS

The type of user is invalid.