Difference between revisions of "API Method PatientDirectMessageSend"

From Updox API
Jump to: navigation, search
(Created page with "Sends a message from the supplied patient to the supplied direct address. If the "from" field is not provided the patient ID in the form "patient:{patient ID}", then the patie...")
 
m
Line 1: Line 1:
Sends a message from the supplied patient to the supplied direct address. If the "from" field is not provided the patient ID in the form "patient:{patient ID}", then the patientDemographics object must be passed in to define the patient sending the message.
+
An [[Direct Message Outbound|outbound direct message]] method which sends a message from the supplied patient to the supplied direct address. If the "from" field is not provided the patient ID in the form "patient:{patient ID}", then the patientDemographics object must be passed in to define the patient sending the message.
 
    
 
    
 
== Fields ==
 
== Fields ==

Revision as of 17:17, 15 November 2013

An outbound direct message method which sends a message from the supplied patient to the supplied direct address. If the "from" field is not provided the patient ID in the form "patient:{patient ID}", then the patientDemographics object must be passed in to define the patient sending the message.

Contents

Fields

Please refer to the Interactive API for a list of the fields for this method.

Sample Request and Response

Request

{
   "to": "test@direct.updoxqa.com",
   "subject": "Test subject",
   "textMessage": "Test message body",
   "attachments": [
       {
           "content": "CgoKCgoKCgoKCgoKCgoKCgoKCgoKVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg VEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRF U1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lT QVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJ U0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg VEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRF U1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lT QVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJ U0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg VEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRF U1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lT QVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJ U0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg VEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1QgVEhJU0lTQVRFU1Qg",
           "mimeType": "text/plain",
           "fileName": "text.txt"
       }
   ],
   "patientDemographics": {
       "patientId": "100030",
       "firstName": "Jane",
       "middleName": "",
       "lastName": "Doe",
       "dateOfBirth": "1990-10-10",
       "gender": "F",
       "emailAddress": ""
   },
    "auth": {
       "applicationId": "updox",
       "applicationPassword": "1234567890",
       "accountId": "account",
       "userId": "user"
   }
}

Response

{
    successful: true
    responseMessage: "OK"
    responseCode: 2000
    recipient: "contact:227161"
    name: "test@direct.updoxqa.com"
    directAddress: "test@direct.updoxqa.com"
    reason: null
    messageId: 249599
    patientDirectAddress: "ptacct+227163@direct.updoxqa.com"
}

Error Codes

In addition to the General Error Set, this method may return:

4640: direct address error: invalid direct address
4641: direct address error: no direct address found for this user
4650: direct error: send failed
4651: direct error: send failed and/or invalid direct address
4652: direct error: either from or patientDemographics is required

Note that when a 4650 error code is returned, the "reason" field will contain a text description of the reason the message failed to send.