doFileUploadMultipart

post

/ccadmin/v1/files

Upload a file using multipart/form-data (not JSON). Uses the same return format as doFileUpload.

NOTE: Use the appropriate uploadType for the type of data being uploaded. For example, if uploading a file containing a very large number of records for bulk import, use 'uploadType=bulkImport' to greatly improve overall system performance.

Request

Supported Media Types
Query Parameters
  • An optional query parameter that can specify an optional change context.
    Allowed Values: [ "designStudioItem", "importAssets" ]
Form Parameters
  • The file form input element.
  • The file name.
  • Indicates the type of file upload to be performed.
    Allowed Values: [ "collectionImage", "crashReport", "general", "manualCollectionImage", "manualProductImage", "productImage", "thirdPartyFile", "bulkImport" ]
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : doFileUploadMultipart_response
Type: object
Show Source
Nested Schema : result
Type: object
Indicates the upload result
Show Source
Nested Schema : failedFilesReasons
Type: object
Additional Properties Allowed
Show Source
  • The table of rejection reasons. Can be any of 'UNKNOWN_REASON', 'INVALID_NAME', 'INVALID_EXTENSION', 'VIRUS_DETECTED', 'VIRUS_SCAN_FAILED', 'INVALID_CONTENT', 'INVALID_ENCODING'
Nested Schema : failedImagesReasons
Type: object
Additional Properties Allowed
Show Source
  • The table of rejection reasons. Can be any of 'UNKNOWN_REASON', 'INVALID_NAME', 'INVALID_EXTENSION', 'VIRUS_DETECTED', 'VIRUS_SCAN_FAILED', 'INVALID_CONTENT', 'INVALID_ENCODING'
Nested Schema : fileResults
Type: array
File uploading results.
Show Source
Nested Schema : items
Type: object
The result of uploading one file.
Show Source
Nested Schema : associatedItems
Type: array
The list of URIs for the items this file was associated with.
Show Source
Example Response (application/json)
{
    "result":{
        "formattedResult":null,
        "unzipped":false,
        "uploadType":null,
        "fileResults":[
            {
                "new":false,
                "rejected":false,
                "overwritten":false,
                "success":true,
                "destination":"sample.zip",
                "associatedItems":[
                ],
                "source":"sample.zip",
                "rejection":null
            }
        ],
        "hadSuccess":true
    },
    "success":true,
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:9080/ccadmin/v1/files"
        }
    ],
    "token":"1a9a25ea2d61_2d6d"
}

Default Response

The error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |20306|The filename is invalid|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top