user_set_contact ()
Function prototype | user_set_contact ( session, user, team ) |
---|---|
API Version | ALL |
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: |
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: |
|
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_FOUND | XML data of the USER does not have a valid USER reference |
ADMISSION.NOT_FOUND | The ADMISSION provided does not exist |
CONTACT_DATA.VALIDATION | The information provided to modify the USER is not valid |