Add File to Attachment or Image Asset Attribute (POST)

Allows a file or image to be attached to an Attachment asset attribute.

 

URL

{RMUrl}/api/Organization/assets/<AssetCode>/attributes/<AttributeVariableName>/files

 

REQUEST METHOD

POST

 

URL PARAMETERS

AssetCode: This parameter is provided in the URL and does not need to be sent through POST.

AttributeVarName: This parameter is provided in the URL and does not need to be sent through POST.

 

FORM CONTENT

FileName (Required): Name used to identify the attachment.

Data (Required): The file to be attached to the asset specified. Maximum file size is 10 MB. The file bytes must be converted to a base64 string before sending.

Description (Optional): Optional comment for the attachment.

 

REQUEST EXAMPLE

{RMUrl}/api/Organization/assets/4104a112-dff9-42de-bc7c-a7046170d762/attributes/attachmentattribute/files

 

FORM CONTENT EXAMPLE

"FileName":"Receipt.pdf",

"Data": "TWFuIGlzIGR...WQsIG5vdCBvbm",

"Description":"Proof of payment sent."

}

 

SUCCESS RESPONSE

The ID of the file attached. Returns a Guid.

 

SUCCESS RESPONSE EXAMPLE

"443de4ae-2360-4b66-bf69-8c9e4ca09001"