POST Api/User/Put
This method allows a provider to insert or update an existing participant record using the Alert ID (unique id assigned by TPC) or the Participant ID (unique id assigned by the provider). You can also add the participant to groups subsequently kicking off any associated TouchPoints. Error Codes returned: 901 - Account improperly setup, 902 - Invalid Account Name, 903 - Invalid access level name, 920 - Unauthorized to use this endpoint.
Request Information
URI Parameters
None.
Body Parameters
UserRequestName | Description | Type | Additional information |
---|---|---|---|
account_name |
Optional - The account name where the user should be assigned. If null or blank, the account name associated with the API credentials will be used. If the account associated with the API credentials has access to child accounts, the child account name can be specified here. |
string |
None. |
action |
Optional - The action to perform on the user. Available options are: Upsert (default) and delete. Upsert will update the user if exists and insert the user if not exists. |
string |
None. |
send_announcement_email |
Optional - If true, an announcement email will be sent to the user (if new) with instructions on how to login. |
boolean |
None. |
username |
Required - The username of the new user account. |
string |
None. |
first_name |
Required - The first name of the user. |
string |
None. |
middle_name |
Required - The middle name of the user. |
string |
None. |
last_name |
Required - The last name of the user. |
string |
None. |
Required - The email address of the user. |
string |
None. |
|
phone_number |
Required - The primary phone number of the user. |
string |
None. |
mobile_phone |
Optional - The mobile phone number of the user. |
string |
None. |
fax |
Optional - The fax phone number of the user. |
string |
None. |
access_level_name |
Required - The access level name to assign the user (i.e. Case Manager, Physician 1, Call Agent, etc.) |
string |
None. |
gmt_offset |
Optional - The GMT Offset of the timezone for the user. (i.e. -5 for EST) If blank, defaults to the provider account setting. |
decimal number |
None. |
division_name |
Optional - The division name associated with the user. |
string |
None. |
Request Formats
application/json, text/json
{ "account_name": "sample string 1", "action": "sample string 2", "send_announcement_email": true, "username": "sample string 4", "first_name": "sample string 5", "middle_name": "sample string 6", "last_name": "sample string 7", "email": "sample string 8", "phone_number": "sample string 9", "mobile_phone": "sample string 10", "fax": "sample string 11", "access_level_name": "sample string 12", "gmt_offset": 1.1, "division_name": "sample string 13" }
application/xml, text/xml
<UserRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TPC.Core.BusinessEntities.API.Users"> <AccessLevelName>sample string 12</AccessLevelName> <AccountName>sample string 1</AccountName> <Action>sample string 2</Action> <DivisionName>sample string 13</DivisionName> <Email>sample string 8</Email> <Fax>sample string 11</Fax> <FirstName>sample string 5</FirstName> <GMTOffset>1.1</GMTOffset> <LastName>sample string 7</LastName> <MiddleName>sample string 6</MiddleName> <MobilePhone>sample string 10</MobilePhone> <PhoneNumber>sample string 9</PhoneNumber> <SendAnnouncementEmail>true</SendAnnouncementEmail> <Username>sample string 4</Username> </UserRequest>
application/x-www-form-urlencoded
Response Information
Resource Description
TPCResponseName | Description | Type | Additional information |
---|---|---|---|
result | string |
None. |
|
error_code | integer |
None. |
|
message | string |
None. |
Response Formats
application/json, text/json
{ "result": "sample string 1", "error_code": 1, "message": "sample string 2" }
application/xml, text/xml
<TPCResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TPC.API.Models"> <error_code>1</error_code> <message>sample string 2</message> <result>sample string 1</result> </TPCResponse>