updateCollection

put

/ccadmin/v1/collections/{id}

Update Collection. Update a collection by ID. **Requires the x-ccasset-language header so translated content can be set for a specific language.** Update childProducts property: Set the type property to either appendProducts or updateProducts to update the child products of a collection. EXAMPLE INPUT: Remove prod1, prod2 and prod3 {'op': 'remove', 'products': ['prod1', 'prod2', 'prod3]} Move the group of products at indices 5-10 (inclusive) to appear starting at index 2 (shorthand for 'move product 5 to index 2, product 6 to index 3, etc.') {'op': 'move', 'fromStart': 5, 'fromEnd': 10, 'to' : 2}

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
Root Schema : updateCollection_request
Type: object
Show Source
Example:
{
    "catalogId":"cloudLakeCatalog",
    "categoryImages":{
        "metadata":{
            "altText":"Gift Shop-New",
            "titleText":"Gift Shop-New"
        }
    },
    "repositoryId":"cat90016",
    "properties":{
        "displayName":"Electronics",
        "seoMetaInfo":{
            "seoDescription":"Gift Shop-New, Looking for an inspired quality gift? ATG Store gift shop has a wide choice of gifts for both men and women suitable for every occassion. Shopping for gifts is simple and convenient at ATG Store.com.",
            "seoTitle":"Gift Shop-New",
            "seoKeywords":"Gift Shop-New",
            "seoUrlSlug":"gift-shop-new"
        }
    }
}
Nested Schema : categoryImages
Type: array
List of category images to assign to the product.
Show Source
Nested Schema : moves
Type: array
If type is updateProducts, and op is move, then this value is an array of objects specifying details for re-ordring whole groups of child products.
Show Source
Nested Schema : parentCategoryIds
Type: array
ID of multiple parent categories for the new collection.
Show Source
Nested Schema : productMap
Type: array
Map of product IDs to corresponding order index when performing a reorder operation on childProducts property.
Show Source
Nested Schema : products
Type: array
If type is appendProducts, or type is updateProducts and op is remove, then this value is equal to the list of IDs for child products that will be appened or removed.
Show Source
Nested Schema : properties
Type: object
List of properties of the collection.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : metadata
Type: object
Seo meta info for category.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : seoMetaInfo
Type: object
Seo meta info for category.
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : updateCollection_response
Type: object
Show Source
Nested Schema : ancestorCategories
Type: array
Array of category objects.
Show Source
Nested Schema : categoryIdPaths
Type: array
An array of category ids forming a category Path
Show Source
Nested Schema : categoryImages
Type: array
Array of image objects.
Show Source
Nested Schema : categoryPaths
Type: array
An array of category paths.
Show Source
Nested Schema : childCategories
Type: array
Array of category objects.
Show Source
Nested Schema : childProducts
Type: array
Array of child products.
Show Source
Nested Schema : fixedChildCategories
Type: array
Array of category objects.
Show Source
Nested Schema : fixedParentCategories
Type: array
Array of category objects.
Show Source
Nested Schema : keywords
Type: array
Array of keywords.
Show Source
Nested Schema : parentCategory
Type: object
Default parent collection of the product.
Show Source
Nested Schema : seoMetaInfo
Type: object
Seo meta info for category.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : metadata
Type: object
Seo meta info for category.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "longDescription":"Looking for an inspired quality gift? ATG Store gift shop has a wide choice of gifts for both men and women suitable for every occassion. Shopping for gifts is simple and convenient at ATG Store.com.",
    "childProducts":null,
    "childProductsCount":0,
    "keywords":[
        "gift",
        "ideas",
        "gifts",
        "ideas",
        "gift ideas",
        "present",
        "presents",
        "special occasion",
        "special occasions",
        "birthday",
        "christmas",
        "anniversary",
        "romantic",
        "valentines",
        "wedding",
        "him",
        "her",
        "ATG Store.com"
    ],
    "categoryImages":[
        {
            "metadata":{
                "altText":"Gift Shop-New",
                "titleText":"Gift Shop-New"
            },
            "repositoryId":"m10002"
        }
    ],
    "categoryPaths":[
        "/Commerce Root/Gift Shop-New"
    ],
    "displayName":"Gift Shop-New",
    "seoKeywordsDerived":"Gift Shop-New",
    "fixedChildCategories":[
        {
            "repositoryId":"cat50067"
        },
        {
            "repositoryId":"cat60001"
        }
    ],
    "seoUrlSlugDerived":"gift-shop-new",
    "seoDescriptionDerived":"Gift Shop-New, Looking for an inspired quality gift? ATG Store gift shop has a wide choice of gifts for both men and women suitable for every occassion. Shopping for gifts is simple and convenient at ATG Store.com.",
    "active":true,
    "description":null,
    "childCategories":[
        {
            "repositoryId":"cat50067"
        },
        {
            "repositoryId":"cat60001"
        }
    ],
    "seoTitleDerived":"Gift Shop-New",
    "fixedParentCategories":[
        {
            "repositoryId":"rootCategory"
        }
    ],
    "seoMetaInfo":{
        "seoDescription":"Gift Shop-New, Looking for an inspired quality gift? ATG Store gift shop has a wide choice of gifts for both men and women suitable for every occassion. Shopping for gifts is simple and convenient at ATG Store.com.",
        "repositoryId":"100003",
        "seoTitle":"Gift Shop-New",
        "seoKeywords":"Gift Shop-New",
        "seoUrlSlug":"gift-shop-new"
    },
    "route":"/gift-shop-new/category/cat50056",
    "repositoryId":"cat50056",
    "name":null,
    "parentCategory":{
        "repositoryId":"rootCategory"
    },
    "ancestorCategories":[
        {
            "repositoryId":"rootCategory"
        }
    ],
    "id":"cat50056"
}

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| |------------------|------------------| |20130|category Internal Error| |26115|Could not update item image list| |26114|Missing item images list| |26116|Update images internal error (invalid item type)| |20999|Internal Error| |26110|The image path was invalid. It cannot contain a backslash.| |26113|Could not get item for update| |26112|Update Category Images Internal Error| |20094|Cannot find the product for the given product id| |20093|All products are already in the parent collection| |20092|No products provided.| |20091|Collection Id is invalid or non-existent| |20090|Collection Id passed is null or empty| |20202|Invalid Operation| |20089|Organize child Internal Error| |25015|setPropertyRepositoryItem Internal Error| |26104|Could not locate parent folder of media items.| |25014|Convert Input Property Internal Error| |26106|The image name was empty.| |20109|Internal Error| |25016|Internal Error| |26105|No collection image list was provided.| |26108|The image path was invalid. It must start with a "/".| |26107|The image path was empty.| |20502|There was an error while retrieving seo metadata from repository.| |26109|The image path was invalid. It must end with ".gif", ".jpg" or ".png".| |26100|Update Product Images Internal Error| |26102|The image could not be added to the item's image list.| |20085|Collection does not have parent collection | |20140|Collection Id is invalid or non-existent| |37202|Invalid move products range| |20084|Invalid index provided. Index should be -1 or greater| |37203|Internal Error| |20083|Cannot be assigned to parent collection because it would create a circular collection structure| |20060|Create Category Type Internal Error| |20081|Cannot find child collection| |20080|Child Collection passed is null| |20131|Must provide new property values.| |200225|CRUD operation on collection is not allowed for the custom catalog|
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