- 17 Oct 2024
- 3 Minutes to read
- Print
- DarkLight
ECM | Uploading Attachments to Imaging Invoices
- Updated on 17 Oct 2024
- 3 Minutes to read
- Print
- DarkLight
Introduction
This document will outline the best practices and processes that should be followed when using CMiC’s ECM APIs.
ECM Endpoints
ECM offers several APIs meant for a multitude of use cases for uploading files and/or linking attachments to a CMiC pre-posted voucher/invoice. Below is a list of available APIs.
Application | Endpoint |
---|---|
AP Registered Invoice + Attachment | ecm-rest-api/jersey/v1/UploadData/uploadApRegInvoice |
Linking Existing AP Voucher to attachment | ecm-rest-api/jersey/v1/uploadDoc/upload |
Subcontract Invoice + Attachment | ecm-rest-api/jersey/v1/UploadData/uploadRegPayRequest |
Purchase Order Invoice + Attachment | ecm-rest-api/jersey/v1/UploadData/uploadPoInvoice |
Imaging | ecm-rest-api/rest/v1/ImgSources ecm-rest-api/rest/v1/ImgSourceDocTypeV ecm-rest-api/jersey/v1/UploadData/createDoc |
Considerations
APIs 2, 3 and 4 were designed for their corresponding objects in CMiC. The APIs have built-in validations (shown as error messages) to indicate when required data is missing from the payload. The sample payloads seen in the screenshots include the required fields, but also other additional ones.
NOTE: Any field exposed on the flysheet in the Imaging Setup can be sent in via the API to include data on the flysheet. Limitations to front-end UI fields do not apply. This rule applies to APIs 2 through 5.
Step-by-Step Process
- Call /ecm-rest-api/rest/v1/ImgSources
- This web service is used to retrieve the list of Imaging Sources.
- Find the source you plan to upload to and make note of the ImgsVUuid value.
NOTE: This cannot be the “All Sources” source.
- Call /ecm-rest-api/rest/v1/ImgSourceDocTypeV
- This web service is used to retrieve the list of all available Document Types.
- Find the document type you plan to upload to and make note of the ImgsdtDocTypeUuid value.
- This document type must be linked to the source you will be uploading to. It can be verified on the front end.
Once you have these details, there are five options for uploading web services, depending on your use case.
NOTE: For these web services, the Content-Type MUST be multipart/form-data, where the flysheet payload data is passed in as fileDetails and the Imaging document as document-content-file.
- /ecm-rest-api/jersey/v1/uploadDoc/upload
- This is used to link a new attachment via CMiC Imaging to an existing voucher in CMiC.
- It is commonly used by Textura integration.
- Refer to the Developers Guide: Linking Attachments to an existing AP Voucher
- The payload enclosed in fileDetails would take on the structure as shown in the screenshot below:
NOTE: This API is linked to existing vouchers in the system, so the payload only consists of the shown five fields. Anything else that gets passed in the payload will be ignored.
- /ecm-rest-api/jersey/v1/UploadData/uploadPoInvoice
- This is used to upload a new document with associated PO invoice data.
- Pre-requisite: The PO Invoice header and detail flysheets must be set up on the document type in CMiC Imaging to upload the backup attachment.
- Refer to the Developers Guide: Linking an attachment to PO invoice under CMiC Imaging.
- The payload enclosed in fileDetails would take on the structure as shown in the screenshot below:
- /ecm-rest-api/jersey/v1/UploadData/uploadRegPayRequest
- This is used to upload a new document with associated Registered RFP data.
- Pre-requisite: A registered RFP header and detail flysheets MUST be set up on the document type In CMiC Imaging to upload an attachment.
- Refer to Developers Guide: Linking an attachment to a Registered Pay Request under CMiC Imaging.
- The payload enclosed in fileDetails would take on the structure as shown in the screenshot below:
- /ecm-rest-api/jersey/v1/UploadData/uploadApRegInvoice
- This is used to upload a new document with associated Registered Invoice data.
- Pre-requisite: A Registered Invoice header and detailed flysheets MUST be set up on the document type in CMiC Imaging to upload an attachment.
- Refer to Developers Guide: Creating an AP Registered Invoice with attachment in CMiC Imaging.
- The payload enclosed in fileDetails would take on the structure as shown in the screenshot below:
- /ecm-rest-api/jersey/v1/UploadData/createDoc
- This is used to upload a new document and flysheet data for custom user-defined flysheets.
- Refer to Developers Guide: Creating a new attachment and custom flysheet in CMiC Imaging.
- The payload enclosed in fileDetails would take on the structure as shown in the screenshot below:
Additional Resources
- For details on access to ECM APIs, please contact CMiC Support.
- CMiC Service Account for API Authentication
- It is also recommended that users of ECM APIs have the following applications set up and configured before API usage.