createPromotionFolder
post
/ccadmin/v1/promotionFolders
Create Promotion Folder. Create a new promotion folder.
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : createPromotionFolder_request
{
"parentFolder":{
"repositoryId":"promoFolder100001"
},
"name":"Winter Discount"
}
- name
-
Type:
stringRequired:trueThe name of the promotion folder. - parentFolder
-
Type:
objectparentFolderAdditional Properties Allowed:Map of parent promotion folder's repository ID key and value
Nested Schema : parentFolder
Type:
objectMap of parent promotion folder's repository ID key and value
- repositoryId
-
Type:
stringThe promotion folder's repository ID
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : createPromotionFolder_response
- name
-
Type:
stringThe name of the promotion folder. - parentFolder
-
Type:
objectparentFolderAdditional Properties Allowed:Parent Folder object of the current folder. - path
-
Type:
stringPromotion folder's absolute path, it is a concatenation of it's parent folder's names and it's own name separated by '/' - repositoryId
-
Type:
stringThe promotion folder ID.
Nested Schema : parentFolder
Type:
objectParent Folder object of the current folder.
- repositoryId
-
Type:
stringThe 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|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe 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"
}