updateMediaItem

put

/ccadmin/v1/files/mediaContents

Update Media Item. Rename a media item. Optionally takes the x-ccasset-language header to get translated content in another language.

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : updateMediaItem_request
Type: object
Show Source
Example:
{
    "metadata":{
        "altText":"altText",
        "titleText":"titleText"
    },
    "destinationFileName":"prod10001.jpg",
    "uploadType":"productImage",
    "overwrite":true,
    "sourcePath":"/products/prod123.jpg"
}
Nested Schema : metadata
Type: object
Seo meta info for product.
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : updateMediaItem_response
Type: object
Show Source
Nested Schema : assignResult
Type: object
The assignment result.
Show Source
Example Response (application/json)
{
    "assignResult":{
        "itemID":"prod10001",
        "itemType":"product",
        "statusCode":"ASSIGNED"
    },
    "renameSuccess":true
}

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| |------------------|------------------| |33130|The destination filename must contain a base name.| |33120|The destination file name cannot contain a path.| |33131|The file to update metadata does not exist.| |33117|The file to rename does not exist.| |33128|The file extension was not allowed for upload, or did not match the file contents.| |33125|The sourcePath parameter is required.| |33123|The filename must be 254 characters or less, and the following characters are not allowed in the filename: \ : " * < > ? | Please enter a different name.| |33124|The file cannot be renamed because the source file and the destination file are the same.| |33121|A file with this name exists in the folder. Please enter a different name.| |33132|The file to update metadata is not a file.| |33122|The destinationFileName param is required.| |33133|The file to update metadata is not a media file.| |33118|The file to rename is not a file.| |33129|There was an error while validating the file extension.| |33119|The file to rename is not a media file.|
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