SAP Open Connectors

Workday - Adding Attachments to Objects

In Workday, you have an option to add attachments to Suppliers & Supplier-Invoices using Manage Attachments & Add Attachment. The same can be achieved in SAP Open Connectors 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 SAP Open Connectors 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. 

 Image_2019-08-13_at_11.27.13_AM.png

 

Image_2019-08-12_at_5.43.45_PM_Latest.png

 

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.

 

Image_2019-08-12_at_5.54.56_PM_Latest.png

 

Image_2019-08-12_at_6.01.20_PM.png