POST Add attachment into referral

POST Add attachment into referral

Description
Add attachment into existing referral

URI
https://{server}/referrals-api/services/v1/practices/{practiceUuid}/referrals/{referralUuid}/attachments
HTTP Method
POST
Required URI Values
Server
The domain name of the test or production system.

  • Test system: integration.demo.medfusion.net
  • Production system: integration.medfusion.net
PracticeUuid
The unique practice integration ID for a given practice. Medfusion will provide a practice ID that you can use during development.
Required Data
Multi part data that includes following two parts:

Part 1
JSON containing following data:

fileName
string up to 1000 characters long. Must contain file extension.

createdBy
JSON object containing following fields:

actorType
externalStaff
externalStaffId
string up to 100 characters long
Part 2
Attachment content as application/octet-stream

Success Response
  • 200 – Success with referral types listed in response
  • 400 – Bad request
  • 401 – Unauthorized request

Sample Call
HTTP Request

POST https://integration.medfusion.net/referrals-api/services/v1/practices/12345678-1234-1234-1234-1234567890ab/referrals/12345678-1234-1234-1234-1234567890ac /attachments

Header

•	Authorization: Bearer {OAuth token}
•	ExternalSystemId: {External System ID}
•	Content-Type: application/json
Multipart Body

•	{
  fileName: “sample.txt”,
  createdBy: {
    actorType: “externalStaff”,
    externalStaffId: “PracticeStaff1”
  }
}
•	Attachment content as application/octet-stream


Sample Response
Response Header

Location: https://integration.medfusion.net/referrals-api/services/v1/practices/12345678-1234-1234-1234-1234567890ab/referrals/12345678-1234-1234-1234-1234567890ac /attachments/12345678-1234-1234-1234-1234567890ae

Response Body

No Body