updateCollection( )


Updates specified properties of a collection. To add products to a collection, call the addProductsToCollection function.

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Stores - all permissions
Manage Products
Learn more about app permissions.
Method Declaration
Copy
function updateCollection(
  _id: string,
  collection: UpdateCollection,
): Promise<UpdateCollectionResponse>;
Method Parameters
_idstringRequired

Collection ID (generated automatically by the catalog).


collectionUpdateCollectionRequired

Collection info to update.

Returns
Return Type:Promise<UpdateCollectionResponse>
JavaScript
import { products } from "wix-stores.v2"; async function updateCollection(id, collection) { try { const result = await products.updateCollection(id, collection); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?