Method: Transaction Upload Inquiry Message

From Videntity Documentaion Wiki

Jump to: navigation, search

URL: https://vidapi.com/transaction/upload_inquiry_message

Definition: Message that is played to users prompting them to respond.

Request Type: POST

Content-Type: multipart/form-data

Arguments: 2 (required), 2 (optional)

session_key (required): key to your current session. Your session key is given to you in response to your login request.
phone_text (optional): text message that is converted into speech hat is played as the authorization message of a phone transaction. The phone_text parameter replaces phone_audio if phone_audio is not present.
phone_audio (optional): audio file that is played as the authorization message of a phone transaction
response_type (required): type of response that the phone user will respond with. Authorization response options are keypad and audio.
keypad: the receiver of the phone call will respond by pressing the phone keypad
audio: the receiver of the phone call will respond by recording an audio message

Response Type: XML

Response Format:

   <?xml version="1.0" encoding="utf-8"?>
   <response api_method="transaction/upload_inquiry_message">
        <status>STATUS</status>
        <api_tx_number>TRANSACTION_NUMBER</api_tx_number>
        <detail>DETAILS</detail>
        <response_name_value>
            <inquiry_message_id>RESPONSE_MESSAGE_ID</inquiry_message_id> 
        </response_name_value>
        <timestamp>TIMESTAMP</timestamp>
   </response>

Response Example:

   <?xml version="1.0" encoding="utf-8"?>
   <response api_method="transaction/upload_inquiry_message">
        <status>SUCCESS</status>
        <api_tx_number>182737893</api_tx_number>
        <detail>your file uploaded successfully</detail>
        <response_name_value>
            <inquiry_message_id>45</inquiry_message_id> 
        </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 Your 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 Your 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 response_type is missing This error indicates that the response type was not included in the POST field arguments. The response type tells our server what response input to expect when interacting with a user. Valid options are keypad or audio
7 ENUMERATION_ERROR Field response_type must be one of the following values: keypad or audio The value supplied in the field response_type is not in the enumerated list. Please make sure your response_type field is one of the following values: keypad or audio (lower case)
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="transaction/upload_inquiry_message">
    <status>ERROR</status>
    <api_tx_number>1423534645</api_tx_number>     
    <error_number>27</error_number>
    <error_name>Post Error</error_name>
    <error_detail>authorization_response not in post</error_detail>  
    <timestamp>2008-09-30 15:56:42</timestamp>
</response>