updatePromotionFolder
put
/ccadmin/v1/promotionFolders/{id}
Update Promotion Folder. Update an existing promotion folder.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
Promotion folder ID corresponding to the promotion folder to be updated.
Body Parameter
Root Schema : updatePromotionFolder_request
{
"parentFolder":{
"repositoryId":"promoFolder100001"
},
"name":"Winter Discount"
}
- name
-
Type:
string
Required:true
The name of the promotion folder. - parentFolder
-
Type:
object
parentFolderAdditional Properties Allowed:Map of promotion folder's repository ID key and value. In order to remove the folder assignment, set parentFolder to null e.g. "parentFolder": null
Nested Schema : parentFolder
Type:
object
Map of promotion folder's repository ID key and value. In order to remove the folder assignment, set parentFolder to null e.g. "parentFolder": null
- repositoryId
-
Type:
string
The promotion folder's repository ID
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updatePromotionFolder_response
- name
-
Type:
string
The name of the promotion folder. - parentFolder
-
Type:
object
parentFolderAdditional Properties Allowed:Parent Folder object of the current folder. - path
-
Type:
string
Promotion folder's absolute path, it is a concatenation of it's parent folder's names and it's own name separated by '/' - repositoryId
-
Type:
string
The promotion folder ID.
Nested Schema : parentFolder
Type:
object
Parent Folder object of the current folder.
- repositoryId
-
Type:
string
The promotion folder's repository ID
Example application/json
{
"path":"Holiday Discount/Winter Discount",
"parentFolder":{
"repositoryId":"promoFolder100001"
},
"name":"Winter Discount",
"repositoryId":"promoFolder10001"
}
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|
|------------------|------------------|
|21247|Invalid format for parentFolder property|
|21246|Promotion folder cannot have a circular reference through it's parent folder|
|21245|Promotion folder cannot be added as a parent of itself|
|21244|No item found for the following type and ID: promotionFolder, invalidId|
|21243|Missing required property: name|
|21241|promotion folder not found for the given ID : nonExistingId|
|21240|Promotion folder ID is blank|
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Request:
{ "parentFolder": {"repositoryId": "promoFolder100001"}, "name": "Winter Discount" }
Sample Response Payload returned by endpoint:
{ "path": "Holiday Discount/Winter Discount", "parentFolder": {"repositoryId": "promoFolder100001"}, "name": "Winter Discount", "repositoryId": "promoFolder10001" }