Questions and Answers Regarding DataMotion Direct APIs
DataMotion receives a number of questions regarding its APIs mainly pertaining to how they function and what can be done to maximize their effectiveness for developers. These questions are highlighted as individual sections throughout this article which is updated over time whenever new questions are posed.
How to retrieve the number of Unread Messages in an Inbox
In order to find the number of unread messages within an inbox you should use the GetMailboxXML method and set the GetInboxUnReadOnly flag to true.
Retrieving Provider Details
It is a common misconception that the functions to retrieve a healthcare provider’s details from the HPD are a part of the standard Direct Messaging API. This is not the case however as there is a separate Healthcare Provider Directory (HPD) API that is required in order to retrieve provider data. You can find information regarding the HPD API in the DataMotion Direct Software Development Kit Reference Manual or on our Developers Wiki.
Is there a way to search an Inbox with the API
Yes it is possible to search an Inbox by using the GetMailboxXML and setting the Filter parameter.
Is there a method for adding signatures to messages
The short answer is no such a method does not exist within the Direct Messaging API as of now. In order to do this currently, one would need to construct it themselves as part of the MIME message.
How to return additional information when retrieving a message
While using the SOAP based Direct Messaging API it is possible to set additional headers which are “WithCMHeaderXML”, “WithTrackingXML”, and “WithSecurityEnvelope” to the request. The “WithCMHeaderXML” header in particular will return a X-CMHeaderXML field in the response containing useful information such as the message expiration date within the DateExpires section.