associate_get_case_list ()

associate_get_case_list ()

Function prototype

associate_get_case_list ( session, associate)

API VersionAll

Returns a list of CASES linked to an associate

Input

parameters:

  • session: is the session token obtained in the session_init() call
  • associate: an ASSOCIATE reference.The list of CASES for the ASSOCIATE specified will be returned

Output

parameters:

  • result/cases: and XML with the list of CASES:
    • case: One entry per CASE
      • ref: Reference to the CASE
      • relationship: information about the relationship between the CASE and the ASSOCIATE
        • type: relationship type
          • code: See RELATIONSHIP CODES. E.g. : FAMILY
          • description: name of the relationship translated to the session language. E.g: "Family member"
        • relative
          • code: See RELATIVE CODES. Eg: PARENT(F)
          • description: name of the relative type translated to the session language. E.g: "Mother"
      • status: Describes the status of the association between the ASSOCIATE and CASE. Can be one of the following
        • CHILD_REQUEST: The CASE has sent a request to be cared by the ASSOCIATE, but the invitation has not been accepted yet
        • ACCEPTED: The ASSOCIATE has accepted to take care of the CASE
        • REJECTED: The ASSOCIATE has rejected taking care of the CASE
      • invitation_date: This node is only present if an invitation has been sent from the case to the associate or vice-versa but the invitation has not been accepted yet. Introduced in API Version 2.7.23
      • data: General information about the CASE
        • image_id: identifier that can be used to retrieve the image of the CASE
        • nickname
        • username
        • gender (M/F)
        • age
        • bdate: birthdate
        • pending_tasks: number of TASKs pending to be done. This property was introduced in API 2.7.6
        • completed_tasks: number of TASKs already done. This property was introduced in API 2.7.13
        • pending_events: number of EVENTS pending to be read. This property was introduced in API 2.7.6
        • completed_events: number of EVENTS pending to be read. This property was introduced in API 2.7.13
  • 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

sample:

associate_get_case_list ( “LCAAAAAAAAAAAA", 3242)

Response

sample:


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<result>
  <cases>
    <case>
      <ref>10261</ref>
      <relationship>
        <type>
          <code>FAMILY</code>
          <description>Family member</description>
        </type>
        <relative>
          <code>PARENT(F)</code>
          <description>Mother</description>
        </relative>
      </relationship>
      <status>ACCEPTED</status>
      <data>
        <image_id>123</image_id>
        <nickname>ANNA FERGUSON E</nickname>
        <username/>
        <gender>F</gender>
        <age>69</age>
        <bdate>1947-03-25</bdate>
        <pending_tasks>1</pending_tasks>
        <completed_tasks>0</completed_tasks>
        <pending_events>1</pending_events>
        <completed_events>2</completed_events>
      </data>
    </case>
  </cases>
</result>
<ErrorMsg></ErrorMsg>
<ErrorCode></ErrorCode>

Return Error codes

ERROR CODE

INVALID_TOKEN

The session token provided is not valid

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to request the list of CASEs of the ASSOCIATE

ASSOCIATE.NOT_FOUND

The ASSOCIATE reference provided in parameter associate does not correspond to an existing ASSOCIATE