Difference between revisions of "Retrieving a Message"

From Updox API
Jump to: navigation, search
(Compose new message to send into practice and send)
Line 17: Line 17:
  
 
On top right of page, click “Send Message”
 
On top right of page, click “Send Message”
 
 
[[File:Example.jpg]]
 
  
 +
Fill out subject and message and include desired attachments via the add attachments button
  
 
== Fetch message for user ==
 
== Fetch message for user ==

Revision as of 14:12, 12 May 2016


Contents

Log in as patient

Access portal URL • Set as websiteAddress in the API call to create the practice

• Prefixed to “updoxqa.com”

• Example arcsysportal.updoxqa.com

Enter patient credentials


Compose new message to send into practice and send

On top right of page, click “Send Message”

Fill out subject and message and include desired attachments via the add attachments button

Fetch message for user

1. From the interactive api page, look at MessageActions section 2. Calling MessageFetch can be done many ways. For best results, specifying the last message id you retrieved for the user is ideal. You will also want to make note of the showSharedItems parameter. This dictates if the messages that come back include general inbound messages for the practice (not to any one user). Also, calling with no message id is allowed, so you can call and use that going forward like so:

{

 "auth": {
   "applicationId": "updox",
   "applicationPassword": "passingword",
   "accountId": "mike",
   "userId": "mike"
 },
 "dateSince": "",
 "messageIdSince": "",
 "countUnreadOnly": "true",
 "location": "I",
 "showSharedItems": "true"

} Which will yield a response like:

{

 "successful": true,
 "responseMessage": "OK",
 "responseCode": 2000,
 "userId": "mikemike",
 "fetchList": [
   484528
 ]

} At this point you will want to record the message id(s) returned in the list for the next step.


Retrieve Message

With the message id, you now want to call message retrieve and pull in the additional details about the message. An example of a response would look like this:

{

 "successful": true,
 "responseMessage": "OK",
 "responseCode": 2000,
 "messageId": 484528,
 "type": "message",
 "subject": "Test Subject",
 "textMessage": "Speed Racer\nTue, 05/10/16, 5:36 PM GMT\nTest Message",
 "htmlMessage": "Speed Racer
Tue, 05/10/16, 5:36 PM GMT
Test Message", "location": "I", "received": 1462901788000, "from": { "recipient": "contact:229110", "name": "Speed T Racer (1980-01-01, 1000)", "directAddress": null, "practice": null, "city": null, "state": null, "zip": null }, "to": { "recipient": "member:4634", "name": "Test Practice", "directAddress": null, "practice": null, "city": null, "state": null, "zip": null }, "attachments": []

}


Mark as read/handled

If you are calling message fetch and not using the lastMessageId identifier, the next steps will help you avoid seeing already retrieved messages in future calls. You can either call MessageMove and specify an alternate folder location (‘S’ for Sent, ‘T’ for Trash, etc), or you can call MessageMark and set the read flag to True.