For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Hi All,
I am trying to come up with code that can download invoice attachments. I am using the REST API (https://docs.oracle.com/en/cloud/saas/financials/18c/farfa/op-invoices-invoiceid-child-attachments-get.html) to try and download the attachment.
It works if the invoice is manually created ("name": "FileContents" JSON), however if the Invoice was sent as a Scanned one (via KOFAX) this fails. In fact the attachment Type (which indicates the type of attachment) is Managed URL vs a FILE. Has someone overcome this issue before?
Regards,
Comment
The only thing I can offer here is that you need to make sure the invoice has successfully been created and validated or at least needs validation. Then I would try the following (maybe you already have)
Or maybe someone else has some other options.
Be the first to rate this
|
Sign in to rate this
Thanks for the response Becky. All invoices are validated and posted and I do have an SR open :)
The SOAP service also fails (it basically downloads the login page). I think we have figured out a work around, Once I have it working will post the solution here.
Regards,
Be the first to rate this
|
Sign in to rate this
For Folks who are interested, here is the solution for this whole thing:
1. The REST API should be able to provide the file type, if the file type is FILE then use the FileContents link to download it
2. If the FILE type is managed URL that means you now have to go to the Web Center Image component. This is made up of two individual services
- Login Service (requires security header and comes back with Jsession cookie)
- Document Download service (will not take the security header but the cookie generated step before)
Reference - https://docs.oracle.com/cd/E29542_01/dev.1111/e12784/api.htm#IPMDV10139
Between the Login Service and download service when you knock up the code (I did .NET) you have to be innovative on passing off the security info.
Worked for me :).. Well I have not tried any other sources yet.
PS: I did not use the default attachment SOAP service as it would not download the imaged invoice or provide the file name for tracking.
Regards,
Be the first to rate this
|
Sign in to rate this
Krishnan,
Thank you so much for sharing this. I am sure many were interested and will benefit from your experience. This is why we created Customer Conned and we appreciate you sharing in the true spirit of collaboration.
Be the first to rate this
|
Sign in to rate this
Hi Krishnan,
We are also experiencing issues with the REST API to download an invoice attachment. We have also coded a solution in .NET to download or display in-browser the image... however we are interminently seeing HTTP 404 URI not found error returned. Some times it works and some times it doesn't.
Have you had the same issue when trying to download /view individual invoice attachments?
CHeers, Marcelo
Be the first to rate this
|
Sign in to rate this
No issues till date. We have already moved our code to Prod.
Regards,
Be the first to rate this
|
Sign in to rate this