Upload a file

post

/api/erp/integrations/resources/v1/{locale}/files/upload

Uploads files to the specified locale on the server.

Request

Path Parameters
Supported Media Types
Request Body - multipart/form-data ()
Root Schema : schema
Type: object
Show Source
Match One Schema
Show Source
Back to Top

Response

Supported Media Types

201 Response

File uploaded and processed successfully.
Body ()
Root Schema : schema
Type: object
Show Source

400 Response

Bad Request. Invalid parameters or file.

401 Response

Unauthorized. Bearer token is missing or invalid.

500 Response

Internal Server Error. Something went wrong on the server.
Body ()
Root Schema : schema
Type: object
Show Source
  • The error code used to identify the type of error.
    Example: 5110
  • A brief description of an error.
    Example: The ERP_AP_VCC_CARD_STATEME process can't be completed. Please contact your help desk.
Back to Top

Examples

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"
} 
Back to Top