user_set_contact ()

user_set_contact ()

Function prototype

user_set_contact ( session, user, team )

API VersionALL


Modifies personal data of a USER.

The user reference can be any of the references obtained from a user_get(). Be aware that passing two different references from the same source will return the same values (is only an alternate identifier).

Input

parameters:

  • session: is the token obtained in the session_init call
  • user: is user contact xml object
  • team: team reference in case if user was edited as a member of team

To obtain <professional_role> the function user_get_professional_role_list( session )  must be called

To obtain <category> the function user_get_professional_category_list( session, professional_role )  must be called

To obtain <speciality> the function user_get_professional_speciality_list( session, category ) must be called

Output

parameters:

  • result: XML with information about the execution of the function:
    • validation: This information is generated only if an error of type CONTACT_DATA.VALIDATION happens. See CONTACT DATA VALIDATION for a detailed explanation of the validation information
  • ErrorMsg: any fault in the call, either in the validation of input parameters, errors in the connection to the database or any other error, this parameter returns the error message produced
  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request

sample:

user_set_contact( “LCAAAAAAAAAAAA”, “{label:}id{@source}, “

<?xml version="1.0" encoding="UTF-8"?>
<contact>
   <ref>12539</ref>
   <username>alex3224</username>
   <identifiers>
      <identifier>
         <label>NAT_ES</label>
         <value>testalexey</value>
      </identifier>
      <identifier>
         <label>PASS</label>
         <value>testalexey</value>
      </identifier>
   </identifiers>
   <full_name />
   <name>
      <prefix />
      <given_name>Alexey</given_name>
      <middle_name />
      <maiden_name />
      <family_name />
      <family_name2 />
      <subfix />
   </name>
   <addresses>
      <address>
         <kind />
         <street />
         <number />
         <floor />
         <suite />
         <district />
         <city />
         <postcode />
         <state />
         <country />
         <comment />
      </address>
   </addresses>
   <professional_role>
      <ref />
      <description />
   </professional_role>
   <channels>
      <emails>
         <email>
		    <ref>1</ref>
            <type>home</type>
            <value>testalexey</value>
            <comment />
            <preferred>true</preferred>
         </email>
         <email>
			<ref>2</ref>
            <type>work</type>
            <value>testalexey</value>
            <comment />
            <preferred>false</preferred>
         </email>
      </emails>
      <aims>
         <aim>
			<ref>3</ref>
            <type>Skype</type>
            <value>testalexey</value>
            <comment />
         </aim>
      </aims>
      <phones>
         <phone>
			<ref>4</ref>
            <type>mobile</type>
            <value>666666</value>
            <comment />
            <preferred>true</preferred>
         </phone>
         <phone>
			<ref>5</ref>
            <type>ext</type>
            <value>120ext</value>
            <comment />
            <preferred>false</preferred>
         </phone>
         <phone>
			<ref>6</ref>
            <type>home</type>
            <value>testalexey</value>
            <comment />
            <preferred>false</preferred>
         </phone>
         <phone>
			<ref>7</ref>
            <type>work</type>
            <value>testalexey</value>
            <comment />
            <preferred>false</preferred>
         </phone>
      </phones>
   </channels>
</contact>

”)

Response

sample:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<result>
  <user_set_contact>
    <validation></validation>
  </user_set_contact>
</result>
<ErrorMsg></ErrorMsg>
<ErrorCode></ErrorCode>

Return Error codes

ERROR CODE

INVALID_TOKEN

The session token provided is not valid

XML_ERROR

The information provided for creating the USER does not have a valid XML format

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to execute this action
USER.NOT_FOUNDXML data of the USER does not have a valid USER reference
ADMISSION.NOT_FOUNDThe ADMISSION provided does not exist
CONTACT_DATA.VALIDATIONThe information provided to modify the USER is not valid

Related content