Difference between revisions of "Retrieving a Message"

From Updox API
Jump to: navigation, search
(Fetch message for user)
 
(4 intermediate revisions by one user not shown)
Line 8: Line 8:
 
• Prefixed to “updoxqa.com”
 
• Prefixed to “updoxqa.com”
  
• Example arcsysportal.updoxqa.com
+
• Example practice.updoxqa.com
  
 
Enter patient credentials
 
Enter patient credentials
 
 
  
 
== Compose new message to send into practice and send ==
 
== Compose new message to send into practice and send ==
  
 
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 ==
Line 27: Line 23:
 
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:
 
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": {
+
    "auth": {
    "applicationId": "updox",
+
      "applicationId": "updox",
    "applicationPassword": "passingword",
+
      "applicationPassword": "passingword",
    "accountId": "mike",
+
      "accountId": "mike",
    "userId": "mike"
+
      "userId": "mike"
  },
+
    },
  "dateSince": "",
+
    "dateSince": "",
  "messageIdSince": "",
+
    "messageIdSince": "",
  "countUnreadOnly": "true",
+
    "countUnreadOnly": "true",
  "location": "I",
+
    "location": "I",
  "showSharedItems": "true"
+
    "showSharedItems": "true"
}
+
  }
 
Which will yield a response like:
 
Which will yield a response like:
  
{
+
  {
  "successful": true,
+
    "successful": true,
  "responseMessage": "OK",
+
    "responseMessage": "OK",
  "responseCode": 2000,
+
    "responseCode": 2000,
  "userId": "mikemike",
+
    "userId": "mike",
  "fetchList": [
+
    "fetchList": [
    484528
+
      484528
  ]
+
    ]
}
+
  }
 
At this point you will want to record the message id(s) returned in the list for the next step.
 
At this point you will want to record the message id(s) returned in the list for the next step.
 
  
 
== Retrieve Message ==
 
== Retrieve Message ==
Line 58: Line 53:
 
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:
 
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,
+
    "successful": true,
  "responseMessage": "OK",
+
    "responseMessage": "OK",
  "responseCode": 2000,
+
    "responseCode": 2000,
  "messageId": 484528,
+
    "messageId": 484528,
  "type": "message",
+
    "type": "message",
  "subject": "Test Subject",
+
    "subject": "Test Subject",
  "textMessage": "Speed Racer\nTue, 05/10/16, 5:36 PM GMT\nTest Message",
+
    "textMessage": "Speed Racer\nTue, 05/10/16, 5:36 PM GMT\nTest Message",
  "htmlMessage": "Speed Racer<br>Tue, 05/10/16, 5:36 PM GMT<br>Test Message",
+
    "htmlMessage": "Speed Racer<br>Tue, 05/10/16, 5:36 PM GMT<br>Test Message",
  "location": "I",
+
    "location": "I",
  "received": 1462901788000,
+
    "received": 1462901788000,
  "from": {
+
    "from": {
    "recipient": "contact:229110",
+
      "recipient": "contact:229110",
    "name": "Speed T Racer (1980-01-01, 1000)",
+
      "name": "Speed T Racer (1980-01-01, 1000)",
    "directAddress": null,
+
      "directAddress": null,
    "practice": null,
+
      "practice": null,
    "city": null,
+
      "city": null,
    "state": null,
+
      "state": null,
    "zip": null
+
      "zip": null
  },
+
    },
  "to": {
+
    "to": {
    "recipient": "member:4634",
+
      "recipient": "member:4634",
    "name": "Test Practice",
+
      "name": "Test Practice",
    "directAddress": null,
+
      "directAddress": null,
    "practice": null,
+
      "practice": null,
    "city": null,
+
      "city": null,
    "state": null,
+
      "state": null,
    "zip": null
+
      "zip": null
  },
+
    },
  "attachments": []
+
    "attachments": []
}
+
  }
 
+
  
  

Latest revision as of 13:15, 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 practice.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": "mike",
   "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.