[Fusion] REST API to upload attachments to AP Invoices in Oracle Fusion

 


Tired of manually uploading PDFs to every invoice in Oracle Fusion? In this post, we break down how to use REST APIs to automatically attach documents to your AP Invoices.


1. The Endpoint

  • Method: POST
  • URL: /fscmRestApi/resources/11.13.18.05/invoices/{invoicesUniqID}/child/attachments



invoicesUniqID - This is invoice id of the invoice. You can run the below query to get it:

SELECT invoice_id, invoice_num FROM invoice_num = '<Invoice_Id>'


Use as below in Postman (here 1808160 is the Invoice Id):




Below is the request payload:

{
    "Type":"File",
    "FileName":"abc.pdf",
    "Title":"Sample Title",
    "Description":"Sample Description",
    "Category":"To Payables",
    "FileUrl":"",
    "FileContents":"Base64ContentOfFile",
    "UploadedFileContentType":"application/pdf"  
}

To get Base64 of any file use the below URL:




Comments

All Categories

Show more