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.
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
- multipart/form-data
Query Parameters
-
changeContext: string
An optional query parameter that can specify an optional change context.Allowed Values:
[ "designStudioItem", "importAssets" ]
Form Parameters
-
fileUpload: file
The file form input element.
-
filename: string
The file name.
-
uploadType: string
Indicates the type of file upload to be performed.Allowed Values:
[ "collectionImage", "crashReport", "general", "manualCollectionImage", "manualProductImage", "productImage", "thirdPartyFile", "bulkImport" ]
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : doFileUploadMultipart_response
Type:
Show Source
object
-
result(optional):
object result
Indicates the upload result
-
success(optional):
boolean
Indicates whether at least one file uploaded successfully.
-
token(optional):
string
Token generated for multipart upload.
Nested Schema : result
Type:
object
Indicates the upload result
Show Source
-
allFilesFailed(optional):
boolean
Indicates whether upload for all files failed or not
-
allImagesFailed(optional):
boolean
Indicates whether upload for all images failed or not
-
assignedImages(optional):
integer
Number of assigned images
-
failedFiles(optional):
integer
Number of failed files.
-
failedFilesReasons(optional):
object failedFilesReasons
Additional Properties Allowed: additionalProperties
-
failedImages(optional):
integer
Number of failed images.
-
failedImagesReasons(optional):
object failedImagesReasons
Additional Properties Allowed: additionalProperties
-
fileResults(optional):
array fileResults
File uploading results.
-
hadSuccess(optional):
boolean
Indicates whether at least one file uploaded successfully
-
modifiedFiles(optional):
integer
Number of files modified
-
modifiedImages(optional):
integer
Number of images modified
-
newFiles(optional):
integer
Number of new files uploaded.
-
newImages(optional):
integer
Number of new images uploaded.
-
unzipped(optional):
boolean
Indicates whether the file upload was unzipped or not.
-
uploadType(optional):
string
The type of upload for this result.
Nested Schema : failedFilesReasons
Type:
object
Additional Properties Allowed
Show Source
-
integer
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
-
integer
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
-
Array of:
object items
The result of uploading one file.
Nested Schema : items
Type:
object
The result of uploading one file.
Show Source
-
associatedItems(optional):
array associatedItems
The list of URIs for the items this file was associated with.
-
destination(optional):
string
The destination file path.
-
new(optional):
boolean
Whether this is a new file. A false value means it is replacing an existing file.
-
overwritten(optional):
boolean
Whether this file was overwritten by another in the same upload.
-
rejected(optional):
boolean
Indicates whether the file was rejected.
-
rejection(optional):
string
Reason for rejection.
-
source(optional):
string
The source file path.
-
success(optional):
boolean
Indicates whether file upload was successfull or not.
Nested Schema : associatedItems
Type:
array
The list of URIs for the items this file was associated with.
Show Source
-
Array of:
string
The URI for the item this file was associated with.
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|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code