URL |
https://<server domain name>/api/core/<version>/Message/ |
Methods Supported |
POST (Multipart Upload) |
Description |
Message endpoint is simplified version of Secure Messaging concepts. Using this endpoint, we can send message with a file to coreplus application |
Permissions |
Access to this function requires advanced permissions for the calling application |
Note
- Each message must include json, sent as a multi part section called “messageData”
Client\Practitioner Matching
- The client will be matched – if the message data includes a valid client ID, or there is a client with the same name and date of birth
- The receiving practitioner (coreplus user) will be matched – if the message data includes a valid practitioner ID as part of the practitionerTo field, or there is a user with the same name
- The sending practitioner (coreplus referrer) will be matched – if there is a referrer with the same name and provider number
Required parameters |
|
Header |
"Header": {"SendingFacility":""}
|
MessageContents |
"MessageContents": [{"AttachedFileDetails":{ "Size":, "Name":"" } } ]
To attach multiple files
"MessageContents": [{"AttachedFileDetails":{ "Size":, "Name":"samplefile1.pdf" }, { "Size":, "Name":"samplefile2.pdf" } } ]
|
Optional parameters |
|
Client |
"Client": {
"Id":"",
"Firstname":"",
"Surname":"",
"Title":"",
"Address":{
"addressLine":"",
"suburb":"",
"state":"",
"postcode":"",
"country":""
},
"DateOfBirth":"",
"Gender":"",
"HomePhone":"",
"BusinessPhone":"",
"MaritalStatus":""
}
Note:
- Gender of the client can be- Male(M) or Female(F) or Unknown(U) or Other(O)
- Marital status of the client can be – Single(S) or Married(M) or Widowed(W) or Divorced(D) or Unknown(U)
|
PractitionerFrom |
"PractitionerFrom": {
"Id":"",
"Firstname":"",
"Surname":"",
"Title":"",
"Address":{
"addressLine":"",
"suburb":"",
"state":"",
"postcode":"",
"country":""
},
"ProviderNumber":""
}
|
PractitionerTo |
"PractitionerTo": {
"Id":"",
"Firstname":"",
"Surname":"",
"Title":"",
"Address":{
"addressLine":"",
"suburb":"",
"state":"",
"postcode":"",
"country":""
},
"ProviderNumber":""
}
|
Example request |
BODY:
{
"Header":{
"SendingFacility":"SampleTest"
},
"MessageContents":[
{
"AttachedFileDetails":{
"Size":4638,
"Name":"samplefile.pdf"
}
}
],
"Client":{
"Id":"48F4EF2D-6A84-4F08-99C3-9467CE3F7273",
"Firstname":"sample",
"Surname":"client",
"Title":"Mr",
"Address":{
"addressLine":"12/13 vailas street",
"suburb":"Footscray",
"state":"Vic",
"postcode":"3011",
"country":"Australia"
},
"DateOfBirth":"1983-01-16",
"Gender":"M",
"HomePhone":"0123456789",
"BusinessPhone":"0123456",
"MaritalStatus":"M"
},
"PractitionerFrom":{
"Firstname":"check",
"Surname":"checker",
"Title":"Dr",
"Address":{
"addressLine":"23 line street",
"suburb":"Footscray",
"state":"Vic",
"postcode":"3011",
"country":"Australia"
},
"ProviderNumber":"1234567X"
},
"PractitionerTo":{
"Id":"A630F4AD-8B4B-4E06-8CEE-7DB56BA8B9BF",
"Firstname":"sample",
"Surname":"user1",
"Title":"Dr",
"Address":{
"addressLine":"23 some ave",
"suburb":"Maidstone",
"state":"Vic",
"postcode":"3012",
"country":"Australia"
},
"ProviderNumber":"0000000H"
}
}
|
Example response |
{
"id":"200b3ce2-efa5-4665-a480-b6f0719376e3",
"Header":{
"SendingFacility":"SampleTest"
},
"MessageContents":[
{
"AttachedFileDetails":{
"Size":4638,
"Name":"samplefile.pdf"
}
}
],
"Client":{
"Id":"48F4EF2D-6A84-4F08-99C3-9467CE3F7273",
"Firstname":"sample",
"Surname":"client",
"Title":"Mr",
"Address":{
"addressLine":"12/13 vailas street",
"suburb":"Footscray",
"state":"Vic",
"postcode":"3011",
"country":"Australia"
},
"DateOfBirth":"1983-01-16",
"Gender":"M",
"HomePhone":"0123456789",
"BusinessPhone":"0123456",
"MaritalStatus":"M"
},
"PractitionerFrom":{
"Firstname":"check",
"Surname":"checker",
"Title":"Dr",
"Address":{
"addressLine":"23 line street",
"suburb":"Footscray",
"state":"Vic",
"postcode":"3011",
"country":"Australia"
},
"ProviderNumber":"1234567X"
},
"PractitionerTo":{
"Id":"A630F4AD-8B4B-4E06-8CEE-7DB56BA8B9BF",
"Firstname":"sample",
"Surname":"user1",
"Title":"Dr",
"Address":{
"addressLine":"23 some ave",
"suburb":"Maidstone",
"state":"Vic",
"postcode":"3012",
"country":"Australia"
},
"ProviderNumber":"0000000H"
}
}
|
Sample Multipart Upload Request
POST https://sandbox.coreplus.com.au/API/Core/v2.1/Message/
Accept: application/json
Content-Type: multipart/form-data; boundary="e026ce10-d15a-4421-bd49-740c29ed0240"
Host: sandbox.coreplus.com.au
Content-Length: 5492
Expect: 100-continue
–e026ce10-d15a-4421-bd49-740c29ed0240
Content-Disposition: form-data; name=file; filename=cat.jpg; filename*=utf-8”cat.jpg
JFIF ( %!1″%)+…383-7(-.+W̏0 ; f$ Â 4 ;f :SI4BB B Ѕ@ & ! Z NV ],\ i P ԭF.sIb G Y S [hkVֵm WL mkV 5 l
X , %Q R * Q r^ * SȉJD6 \{; I
LdX Z A [V BBBB B B
VjıPc ?f a !A 0 !@, @ I4Wl Q )n J -~ !
. C *M0 P !@!A
–e026ce10-d15a-4421-bd49-740c29ed0240
Content-Type: text/plain; charset=utf-8
Content-Disposition: form-data; name=messageData
{“Header”:{“SendingFacility”:”WebAPICaller”},”MessageContents”:[{“AttachedFileDetails”:{“Size”:4638,”Name”:”cat.jpg”}}],”Client”:{“Id”:”808A8594-B105-4618-8A67-8D33E0DE4625″,”Firstname”:”John”,”Surname”:”Deere”,”Title”:”Mr”,”Address”:{“AddressLine”:”unit 1, Howard St”,”Country”:”Australia”,”Postcode”:”3011″,”State”:”Vic”,”Suburb”:”Hills North”},”DateOfBirth”:”1970-08-21″,”Gender”:”Male”,”HomePhone”:”0300000000″,”BusinessPhone”:”0300000000″,”MaritalStatus”:”Single”},”PractitionerFrom”:{“Firstname”:”Benji”,”Surname”:”Dolittle”,”Title”:”Dr”,”Address”:{“AddressLine”:”33 Practice Lane”,”Country”:”Australia”,”Postcode”:”2003″,”State”:”NSW”,”Suburb”:”Valley North”},”ProviderNumber”:”2000000A”},”PractitionerTo”:{“Id”:”707191A6-824F-400A-9652-6128B9B2001C”,”Firstname”:”Sample”,”Surname”:”User1″,”Title”:”Ms”,”Address”:{“AddressLine”:”87 Therapy Ct”,”Country”:”Australia”,”Postcode”:”3089″,”State”:”Victoria”,”Suburb”:”Hawthorn Ponds”},”ProviderNumber”:”2152171F”}}
–e026ce10-d15a-4421-bd49-740c29ed0240–