Method: User Create

From Videntity Documentaion Wiki

Jump to: navigation, search

URL: https://vidapi.com/user/create

Definition: Used to create a user of Videntity's web services

Request Type: POST

Content-Type: application/x-www-form-urlencoded

Arguments: 11(required), 9 (optional)

session_key (required): key to your current session. Your session key is given to you in response to your login request.
user_type (required): type of Videntity user AGENT or POP. The user_type tells the Videntity server to do specific things like say affiliation during phone calls.
AGENT = Agent ~ agents have associated entities (i.e. Dr. John Doe with agent_entity Hospital X)
POP = population ~ general public population (i.e. Mr. John Doe)
first_name (required): first name of the user
last_name (required): last_name of the user
birthdate (required): birthdate of the user in mmddyyyy format
zip_code (required): zip code of the user in XXXXX or XXXXX-XXXX format
title_prefix (required): title_prefix of the user (i.e. Dr., Mr., Ms., Mrs., Miss)
middle1_name (required): first middle name of the user
email (required): email address of the user (i.e. john_doe@videntity.com)
automated_phone_number (required): user's main phone number in XXX-XXX-XXXX format (i.e. 304-291-2480)
sms_number (required): user's main text message number in XXX-XXX-XXXX format (i.e. 304-291-2480)
fax_number (optional): user's main fax number in XXX-XXX-XXXX format (i.e. 304-291-2480)
home_phone_number (optional): user's alternate home phone number in XXX-XXX-XXXX format (i.e. 304-291-2480). This number will only be used if automated_phone_number repeatedly fails.
mobile_phone_number (optional): user's alternate mobile phone number in XXX-XXX-XXXX format (i.e. 304-291-2480). This number will only be used if automated_phone_number repeatedly fails.
work_phone_number (optional): user's alternate work phone number in XXX-XXX-XXXX format (i.e. 304-291-2480). This number will only be used if automated_phone_number repeatedly fails.
alternate_phone_number (optional): user's alternate phone number in XXX-XXX-XXXX format (i.e. 304-291-2480). This number will only be used if automated_phone_number repeatedly fails.
title_suffix (optional): title_suffix of the user (i.e. Jr.)
credential (optional): credential of the user (i.e. M.D.)
middle2_name (optional): second middle name of the user
agent_entity (optional/required): Entity of the agent. If the user_type is AGENT then agent entity must be specified. If user_type is POP then specifying a agent_entity does nothing.


URL Encoded example:

credential=&first_name=John&last_name=Doe&home_phone_number=&alternate_phone_number=&session_key=3U3oCoGptjgMznt&user_type=POP
&birthdate=02262000&agent_entity=&mobile_phone_number=&work_phone_number=&middle2_name=&title_suffix=&automated_phone_number=
1-304-291-2480&title_prefix=Mr.&middle1_name=Christopher&sms_number=304-291-2480&email=cboyce%40videntity.com&fax_number=&zip_code=26505

Response Type: XML

Response Format:

<?xml version="1.0" encoding="utf-8"?>
   <response api_method="/user/create">
        <status>STATUS</status>
        <api_tx_number>TRANSACTION_NUMBER</api_tx_number>
        <detail>DETAILS</detail>
        <response_name_value>
           <first_name>FIRST_NAME</first_name> 
	     <last_name>LAST_NAME</last_name> 
	     <account_number>ACCOUNT_NUMBER</account_number>
        </response_name_value>
        <timestamp>TIMESTAMP</timestamp>
   </response>

Response Example:

   <?xml version="1.0" encoding="utf-8"?>
   <response api_method="/user/create">
        <status>SUCCESS</status>
        <api_tx_number>342</api_tx_number>
        <detail>user created successfully</detail>
        <response_name_value>
           <first_name>John</first_name> 
	     <last_name>Doe</last_name> 
	     <account_number>130422255565487</account_number>
        </response_name_value>
        <timestamp>2008-09-30 15:56:42</timestamp>
   </response>

Errors:

ERROR NUMBER ERROR NAME ERROR DETAILS ERROR EXPLANATION
2 SESSION_DOES_NOT_EXIST session does not exist This error message indicates that your session hasn't been created or has expired. If you receive this error message please call the API login URL to generate a new session.
3 SESSION_EXPIRED The session has expired This error message indicates that your session hasn't been created or has expired. If you receive this error message please call the API login URL to generate a new session.
4 MISSING_MANDATORY_FIELD Mandatory field session_key is missing Every method has a set number of required fields that must be included in a method call. If the required method arguments are missing this error is returned.
4 MISSING_MANDATORY_FIELD Mandatory field user_type is missing This error indicates that the user_type field was not included in the form method arguments. The user_type is a required field and must be in the POST.
4 MISSING_MANDATORY_FIELD Mandatory field first_name is missing This error indicates that the first_name field was not included in the form POST. The first_name is a required field and must be in the POST.
4 MISSING_MANDATORY_FIELD Mandatory field last_name is missing This error indicates that the last_name field was not included in the form POST. The last_name is a required field and must be in the POST.
4 MISSING_MANDATORY_FIELD Mandatory field birthdate is missing This error indicates that the birthdate field was not included in the form POST. The birthdate is a required field and must be in the POST.
4 MISSING_MANDATORY_FIELD Mandatory field zip_code is missing This error indicates that the zip_code field was not included in the form POST. The zip_code is a required field and must be in the POST.
4 MISSING_MANDATORY_FIELD Mandatory field title_prefix is missing This error indicates that the title_prefix field was not included in the form POST. The title_prefix is a required field and must be in the POST.
4 MISSING_MANDATORY_FIELD Mandatory field middle1_name is missing This error indicates that the middle1_name field was not included in the form POST. The middle1_name is a required field and must be in the POST.
4 MISSING_MANDATORY_FIELD Mandatory field email is missing This error indicates that the middle1_name field was not included in the form POST. The middle1_name is a required field and must be in the POST.
4 MISSING_MANDATORY_FIELD Mandatory field automated_phone is missing This error indicates that the automated_phone_number field was not included in the form POST. The automated_phone_number is a required field and must be in the POST.
4 MISSING_MANDATORY_FIELD Mandatory field sms_number is missing This error indicates that the sms_number field was not included in the form POST. The sms_number is a required field and must be in the POST.
5 VALUES_OUT_OF_RANGE Field birthdate month must be between value 01 and 12 The value supplied for the birthdate field is out of its acceptable range. Please check your birthdate field and set the month value between 01 and 12.
5 VALUES_OUT_OF_RANGE Field birthdate day must be between value 01 and 31 The value supplied for the birthdate field is out of its acceptable range. Please check your birthdate field and set the day value between 01 and 31.
5 VALUES_OUT_OF_RANGE Field birthdate year must be between value 1850 and 2100 The value supplied for the birthdate field is out of its acceptable range. Please check your birthdate field and set the year value between 1850 and 2100.
6 SYNTAX_ERROR Field birthdate must be all integers in the format mmddyyyy The birthdate value supplied is not in the expected format. Make sure your birthdate field format is all integers and in the mmddyyyy format (i.e 02261982 would be February 26, 1982).
6 SYNTAX_ERROR Field birthdate must be 8 characters in the format mmddyyyy The birthdate value supplied is not in the expected format. Make sure your birthdate field format is 8 characters long and in the mmddyyyy format (i.e 02261982 would be February 26, 1982).
6 SYNTAX_ERROR Field zip_code must be all integers in the format XXXXX or XXXXX-XXXX The zip_code value supplied is not in the expected format. The zip_code must be all integers excluding the - in the format XXXXX or XXXXX-XXXX format (i.e. 26508 or 26508-1234).
6 SYNTAX_ERROR Field zip_code must be in the format XXXXX or XXXXX-XXXX The zip_code value supplied is not in the expected format. The zip_code must be all integers excluding the - in the format XXXXX or XXXXX-XXXX format (i.e. 26508 or 26508-1234).
7 ENUMERATION_ERROR Field user_type must be one of the following values: POP or AGENT The value supplied in the field user_type is not in the enumerated list. Please make sure your user_type field is one of the following values: POP or AGENT (all uppercase)
7 ENUMERATION_ERROR Field title prefix must be one of the following values: Dr., Mr., Ms., Mrs., or Miss The value supplied in the field title prefix is not in the enumerated list. Please make sure your title prefix field is one of the following values: Dr., Mr., Ms., Mrs., or Miss
8 INVALID_EMAIL_FORMAT Value <FOO_BAR> is not a valid email address. This error indicates that the email address supplied is not formatted correctly.
9 INVALID_TELEPHONE_FORMAT Value automated_phone_number is not a valid phone number format: XXX-XXX-XXXX The telephone number supplied is not formatted correctly. All phone numbers should be in the XXX-XXX-XXXX format (i.e. 304-291-2480).
9 INVALID_TELEPHONE_FORMAT Value sms_phone_number is not a valid phone number format: XXX-XXX-XXXX The telephone number supplied is not formatted correctly. All phone numbers should be in the XXX-XXX-XXXX format (i.e. 304-291-2480).
10 ENTITY_NOT_SUPPLIED_FOR_AGENT The entity was not supplied with the agent. All users created as an AGENT user type (user_type) require an agent entity (agent_entity). An example of a agent to entity association would be a provider to his Hospital (where the provider works).
11 SERVER_ERROR The server could not process your request. The server could not process your request. Please Try again.


Error Example:

<?xml version="1.0" encoding="utf-8"?>
<response api_method="/user/create">
    <status>ERROR</status>
    <api_tx_number>134</api_tx_number>     
    <error_number>26</error_number>
    <error_name>Post Error</error_name>
    <error_detail>incorrect phone number</error_detail>  
    <timestamp>2008-09-30 15:56:42</timestamp>
</response>