Upload a File

let's say you have an Accounting Hub Transaction File for import and downstream processing. You can use this POST REST operation to upload a file.

Example URL

Here's an example of the resource URL to upload a file:

POST

api/erp/integrations/resources/v1/en-us/files/upload

Example Request

Here's an example of the request body in JSON format:

curl --location --request POST 'https://ewpb.apps.us.ocs.oraclecloud.com/api/erp/integrations/resources/v1/en-us/files/upload' \
--header 'Authorization: Bearer <Bearer Token> \
--form 'flowName=<FLOWNAME>' \
--form 'dateFormat=<DATEFORMAT>' \
--form 'file=@<FILEPATH>'

Example Response

The Response output provides the file identifier and timestamp to confirm the file has been received and the Accounting Hub flow has been initiated. You can ignore the Date Format field if the default date format YYYY-MM-DD is used in the file.

Here's an example of the response body in JSON format:

{
  {
    "fileID": "130560872745308160",
    "zipFileName": "XlaTrxHSparkRejections.zip",
    "flowName": "fah-import",
    "dateFormat": "YYYY-MM-DD",
    "uploadedTime": "2022-02-28T07:27:09.417446Z"
}