In Workday, you have an option to add attachments to Suppliers & Supplier-Invoices using Manage Attachments & Add Attachment. The same can be achieved in Cloud Elements using the objectName resource. This article describes on how to add attachments to different objects which support this functionality.
Currently, attachments upload is supported for Suppliers and Supplier-Invoices in Workday and the same can be done through CE API calls.
Please find the steps below on how to add attachments using Cloud Elements endpoints for Invoice; similar steps can be followed for other objects to add attachments.
To add an attachment while creating a new supplier-invoice, use the below endpoint in objectName resource:
POST /{objectName}/attachments
if you want to add an attachment to the existing supplier-invoice, use the below endpoint in objectName resource:
PATCH /{objectName}/{objectId}/attachments
Below are the screenshots for Creating/Updating attachments in Supplier Invoices and the parameter values to be used while creating/updating supplier-invoices with attachments. In the JSON body, attachment data object should not be passed; instead, select the File to be uploaded.
To verify if the attachments were added successfully to the supplier-invoice, you can use the below endpoint in supplier-invoices resource:
GET /supplier-invoices/{id}
In the response, you can see the "Attachment_Data" object which has the details of file uploaded like Filename, Content Type, and FileContent in binary-encoded.
This can also be validated by logging into workday UI.