moveCollection
put
/ccadmin/v1/collections
Move Collection. Move a child collection from one parent to another parent.
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : moveCollection_request
{
"parent":"catMen",
"fromParent":"cat50001",
"index":"0",
"child":"cat70004"
}
- child
-
Type:
string
Required:true
Child category. - fromParent
-
Type:
string
Required:true
Source parent collection. - index
-
Type:
integer
Required:true
Index in parent collection. - parent
-
Type:
string
Required:true
Target parent collection.
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : moveCollection_response
- success
-
Type:
boolean
true if the move operation was successful
Example application/json
{
"success":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|
|------------------|------------------|
|20089|Organize Child Internal Error|
|20085|Collection does not have parent collection|
|20084|Invalid index provided. Index should be -1 or greater|
|20083|Child collection cannot be assigned to parent collection because it would create a circular collection structure|
|20071|Collection Id is invalid or non-existent|
|20070|Collection Id passed is null or empty|
|20081|Cannot find child collection|
|20080|Invalid index provided. Index should be -1 or greater|
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:
{ "parent": "catMen", "fromParent": "cat50001", "index": "0", "child": "cat70004" }
Sample Response Payload returned by endpoint:
{"success": true}