> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # BulkUpdateProjects # Package: portfolio # Namespace: ProjectsService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/portfolio/projects/bulk-update-projects.md ## Permission Scopes: Manage Portfolio: SCOPE.PORTFOLIO.MANAGE-PORTFOLIO ## Introduction Updates multiple projects. To update a single project, call Update Project. --- ## REST API ### Schema ``` Method: bulkUpdateProjects Description: Updates multiple projects. To update a single project, call Update Project. URL: https://www.wixapis.com/portfolio/projects/projects/api/v1/bulk/portfolio/projects/update Method: PATCH # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: projects.project, projects.project.id, projects.project.revision Method parameters: param name: projects | type: array | description: Projects to update. - name: project | type: Project | description: Project to update. | required: true - ONE-OF: - name: coverImage | type: Image | description: Project cover image. - name: imageInfo | type: Image | description: Information about the Wix Media image. - name: id | type: string | description: WixMedia image GUID. Required. - name: height | type: integer | description: Original image height. Required. - name: width | type: integer | description: Original image width. Required. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: focalPoint | type: Point | description: Focal point of the image. - name: x | type: number | description: X-coordinate of the focal point. - name: y | type: number | description: Y-coordinate of the focal point. - name: coverVideo | type: Video | description: Project cover video. - name: videoInfo | type: VideoV2 | description: Information about the Wix Media video. - name: id | type: string | description: WixMedia GUID. Required. - name: url | type: string | description: Video URL. - name: resolutions | type: array | description: Available resolutions for the video, starting with the optimal resolution. - name: url | type: string | description: Video URL. Required. - name: height | type: integer | description: Video height. Required. - name: width | type: integer | description: Video width. Required. - name: format | type: string | description: Video format for example, mp4, hls. Required. - name: quality | type: string | description: Video quality for example 480p, 720p. - name: filename | type: string | description: Video filename. - name: filename | type: string | description: Video filename. - name: posters | type: array | description: Video posters. - name: durationInMillis | type: integer | description: Manually defined Video duration in milliseconds. - name: id | type: string | description: Project GUID. | required: true - name: revision | type: string | description: Revision number, which increments by 1 each time the project is updated. To prevent conflicting changes, the existing revision must be passed when updating the project object. | required: true - name: title | type: string | description: Project title. - name: description | type: string | description: Project description. - name: hidden | type: boolean | description: Whether the project is hidden from the portfolio. Default: `false` - name: collectionIds | type: array | description: IDs of the collections that include the project. - name: details | type: array | description: Project details. - ONE-OF: - name: text | type: string | description: Project label in plain text format. - name: link | type: DetailsLink | description: Project label in link format. - name: text | type: string | description: Display text of the link. - name: url | type: string | description: Target URL of the link. - name: target | type: string | description: Whether the link opens in a new tab or window. One of: * `'_blank'`: The link opens in a new tab or window. * `'_self'`: The link opens in the same tab or window. - name: label | type: string | description: Project label. - name: slug | type: string | description: Project slug. - name: seoData | type: SeoSchema | description: Project SEO data. - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: watermark | type: Watermark | description: Optional watermark that can be applied to all project's images. - name: position | type: Position | description: Position of the watermark on the image. - enum: NORTH_WEST, NORTH, NORTH_EAST, WEST, CENTER, EAST, SOUTH_WEST, SOUTH, SOUTH_EAST - name: size | type: integer | description: Size of the watermark, from 0 to 100. - name: opacity | type: integer | description: Opacity of the watermark. - name: imageUrl | type: string | description: Image GUID of the Watermark as saved in Media Platform. - name: enabled | type: boolean | description: Whether the watermark is to be displayed on Items & Cover Photos. param name: returnFullEntity | type: returnFullEntity | description: Whether to return the updated projects. Set to `true` to return the projects in the response. Default: `false` Return type: BulkUpdateProjectsResponse - name: results | type: array | description: List of individual Bulk Update Projects results. - name: itemMetadata | type: ItemMetadata | description: Information about the updated project. Including its GUID, index in the bulk request and whether it was successfully updated. - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: project | type: Project | description: Updated project. Only returned if `returnEntity` is set to `true` in the request. - ONE-OF: - name: coverImage | type: Image | description: Project cover image. - name: imageInfo | type: Image | description: Information about the Wix Media image. - name: id | type: string | description: WixMedia image GUID. Required. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. Required. - name: width | type: integer | description: Original image width. Required. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: focalPoint | type: Point | description: Focal point of the image. - name: x | type: number | description: X-coordinate of the focal point. - name: y | type: number | description: Y-coordinate of the focal point. - name: coverVideo | type: Video | description: Project cover video. - name: videoInfo | type: VideoV2 | description: Information about the Wix Media video. - name: id | type: string | description: WixMedia GUID. Required. - name: url | type: string | description: Video URL. - name: resolutions | type: array | description: Available resolutions for the video, starting with the optimal resolution. - name: url | type: string | description: Video URL. Required. - name: height | type: integer | description: Video height. Required. - name: width | type: integer | description: Video width. Required. - name: format | type: string | description: Video format for example, mp4, hls. Required. - name: quality | type: string | description: Video quality for example 480p, 720p. - name: filename | type: string | description: Video filename. - name: filename | type: string | description: Video filename. - name: posters | type: array | description: Video posters. - name: durationInMillis | type: integer | description: Manually defined Video duration in milliseconds. - name: id | type: string | description: Project GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the project is updated. To prevent conflicting changes, the existing revision must be passed when updating the project object. - name: title | type: string | description: Project title. - name: description | type: string | description: Project description. - name: hidden | type: boolean | description: Whether the project is hidden from the portfolio. Default: `false` - name: collectionIds | type: array | description: IDs of the collections that include the project. - name: details | type: array | description: Project details. - ONE-OF: - name: text | type: string | description: Project label in plain text format. - name: link | type: DetailsLink | description: Project label in link format. - name: text | type: string | description: Display text of the link. - name: url | type: string | description: Target URL of the link. - name: target | type: string | description: Whether the link opens in a new tab or window. One of: * `'_blank'`: The link opens in a new tab or window. * `'_self'`: The link opens in the same tab or window. - name: label | type: string | description: Project label. - name: slug | type: string | description: Project slug. - name: createdDate | type: string | description: Date and time the project was created. - name: updatedDate | type: string | description: Date and time the project was updated. - name: url | type: PageUrlV2 | description: Project page URL and relative path. Returned when `includePageUrl` is `true` in the request. - name: relativePath | type: string | description: The relative path for the page within the site. For example, `/product-page/a-product`. - name: url | type: string | description: The page's full URL. For example, `https://mysite.com/product-page/a-product`. - name: seoData | type: SeoSchema | description: Project SEO data. - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: watermark | type: Watermark | description: Optional watermark that can be applied to all project's images. - name: position | type: Position | description: Position of the watermark on the image. - enum: NORTH_WEST, NORTH, NORTH_EAST, WEST, CENTER, EAST, SOUTH_WEST, SOUTH, SOUTH_EAST - name: size | type: integer | description: Size of the watermark, from 0 to 100. - name: opacity | type: integer | description: Opacity of the watermark. - name: imageUrl | type: string | description: Image GUID of the Watermark as saved in Media Platform. - name: enabled | type: boolean | description: Whether the watermark is to be displayed on Items & Cover Photos. - name: bulkActionMetadata | type: BulkActionMetadata | description: Total number of successes and failures for Bulk Update Projects. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### Bulk Update Project ```curl curl -X PATCH \ 'https://www.wixapis.com/api/v1/bulk/portfolio/projects/update' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "projects": [ { "project": { "id": "123e4567-e89b-12d3-a456-426614174000", "revision": 1, "title": "Updated Project Title 1", "description": "Updated project description 1.", "hidden": false, "coverImage": { "imageInfo": { "id": "9ab44e4567-e89b-12d3-a456-4266141747", "url": "https://example.com/updated_cover_image1.jpg" } }, "slug": "updated-project-title-1", } }, { "project": { "id": "223e4567-e89b-12d3-a456-426614174000", "revision": 2, "title": "Updated Project Title 2", "description": "Updated project description 2.", "hidden": false, "coverImage": { "imageInfo": { "id": "229b44e4567-e89b-12d3-a456-426618885", "url": "https://example.com/updated_cover_image2.jpg" } }, "slug": "updated-project-title-2", }, } ], "returnFullEntity": true }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.portfolio.ProjectsService.bulkUpdateProjects(options) Description: Updates multiple projects. To update a single project, call Update Project. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: options.projects.project, options.projects.project._id, options.projects.project.revision Method parameters: param name: options | type: BulkUpdateProjectsOptions none - name: projects | type: array | description: Projects to update. - name: project | type: Project | description: Project to update. - ONE-OF: - name: coverImage | type: Image | description: Project cover image. - name: imageInfo | type: string | description: Information about the Wix Media image. - name: focalPoint | type: Point | description: Focal point of the image. - name: x | type: number | description: X-coordinate of the focal point. - name: y | type: number | description: Y-coordinate of the focal point. - name: coverVideo | type: Video | description: Project cover video. - name: videoInfo | type: string | description: Information about the Wix Media video. - name: durationInMillis | type: integer | description: Manually defined Video duration in milliseconds. - name: title | type: string | description: Project title. - name: description | type: string | description: Project description. - name: hidden | type: boolean | description: Whether the project is hidden from the portfolio. Default: `false` - name: collectionIds | type: array | description: IDs of the collections that include the project. - name: details | type: array | description: Project details. - ONE-OF: - name: text | type: string | description: Project label in plain text format. - name: link | type: DetailsLink | description: Project label in link format. - name: text | type: string | description: Display text of the link. - name: url | type: string | description: Target URL of the link. - name: target | type: string | description: Whether the link opens in a new tab or window. One of: * `'_blank'`: The link opens in a new tab or window. * `'_self'`: The link opens in the same tab or window. - name: label | type: string | description: Project label. - name: slug | type: string | description: Project slug. - name: seoData | type: SeoSchema | description: Project SEO data. - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: watermark | type: Watermark | description: Optional watermark that can be applied to all project's images. - name: position | type: Position | description: Position of the watermark on the image. - enum: NORTH_WEST, NORTH, NORTH_EAST, WEST, CENTER, EAST, SOUTH_WEST, SOUTH, SOUTH_EAST - name: size | type: integer | description: Size of the watermark, from 0 to 100. - name: opacity | type: integer | description: Opacity of the watermark. - name: imageUrl | type: string | description: Image GUID of the Watermark as saved in Media Platform. - name: enabled | type: boolean | description: Whether the watermark is to be displayed on Items & Cover Photos. - name: returnFullEntity | type: boolean | description: Whether to return the updated projects. Set to `true` to return the projects in the response. Default: `false` Return type: PROMISE - name: results | type: array | description: List of individual Bulk Update Projects results. - name: itemMetadata | type: ItemMetadata | description: Information about the updated project. Including its GUID, index in the bulk request and whether it was successfully updated. - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item). - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items. - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated. - name: error | type: ApplicationError | description: Details about the error in case of failure. - name: code | type: string | description: Error code. - name: description | type: string | description: Description of the error. - name: data | type: object | description: Data related to the error. - name: project | type: Project | description: Updated project. Only returned if `returnEntity` is set to `true` in the request. - ONE-OF: - name: coverImage | type: Image | description: Project cover image. - name: imageInfo | type: string | description: Information about the Wix Media image. - name: focalPoint | type: Point | description: Focal point of the image. - name: x | type: number | description: X-coordinate of the focal point. - name: y | type: number | description: Y-coordinate of the focal point. - name: coverVideo | type: Video | description: Project cover video. - name: videoInfo | type: string | description: Information about the Wix Media video. - name: durationInMillis | type: integer | description: Manually defined Video duration in milliseconds. - name: _id | type: string | description: Project GUID. - name: revision | type: string | description: Revision number, which increments by 1 each time the project is updated. To prevent conflicting changes, the existing revision must be passed when updating the project object. - name: title | type: string | description: Project title. - name: description | type: string | description: Project description. - name: hidden | type: boolean | description: Whether the project is hidden from the portfolio. Default: `false` - name: collectionIds | type: array | description: IDs of the collections that include the project. - name: details | type: array | description: Project details. - ONE-OF: - name: text | type: string | description: Project label in plain text format. - name: link | type: DetailsLink | description: Project label in link format. - name: text | type: string | description: Display text of the link. - name: url | type: string | description: Target URL of the link. - name: target | type: string | description: Whether the link opens in a new tab or window. One of: * `'_blank'`: The link opens in a new tab or window. * `'_self'`: The link opens in the same tab or window. - name: label | type: string | description: Project label. - name: slug | type: string | description: Project slug. - name: _createdDate | type: Date | description: Date and time the project was created. - name: _updatedDate | type: Date | description: Date and time the project was updated. - name: url | type: string | description: Project page URL and relative path. Returned when `includePageUrl` is `true` in the request. - name: seoData | type: SeoSchema | description: Project SEO data. - name: tags | type: array | description: SEO tag information. - name: type | type: string | description: SEO tag type. Supported values: `title`, `meta`, `script`, `link`. - name: props | type: object | description: A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value. For example: `{"name": "description", "content": "the description itself"}`. - name: meta | type: object | description: SEO tag metadata. For example, `{"height": 300, "width": 240}`. - name: children | type: string | description: SEO tag inner content. For example, ` inner content `. - name: custom | type: boolean | description: Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). - name: disabled | type: boolean | description: Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. - name: settings | type: Settings | description: SEO general settings. - name: preventAutoRedirect | type: boolean | description: Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled. Default: `false` (automatical redirect is enabled). - name: keywords | type: array | description: User-selected keyword terms for a specific page. - name: term | type: string | description: Keyword value. - name: isMain | type: boolean | description: Whether the keyword is the main focus keyword. - name: origin | type: string | description: The source that added the keyword terms to the SEO settings. - name: watermark | type: Watermark | description: Optional watermark that can be applied to all project's images. - name: position | type: Position | description: Position of the watermark on the image. - enum: NORTH_WEST, NORTH, NORTH_EAST, WEST, CENTER, EAST, SOUTH_WEST, SOUTH, SOUTH_EAST - name: size | type: integer | description: Size of the watermark, from 0 to 100. - name: opacity | type: integer | description: Opacity of the watermark. - name: imageUrl | type: string | description: Image GUID of the Watermark as saved in Media Platform. - name: enabled | type: boolean | description: Whether the watermark is to be displayed on Items & Cover Photos. - name: bulkActionMetadata | type: BulkActionMetadata | description: Total number of successes and failures for Bulk Update Projects. - name: totalSuccesses | type: integer | description: Number of items that were successfully processed. - name: totalFailures | type: integer | description: Number of items that couldn't be processed. - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded. ``` ### Examples ### bulkUpdateProjects ```javascript import { projects } from '@wix/portfolio'; async function bulkUpdateProjects(options) { const response = await projects.bulkUpdateProjects(options); }; ``` ### bulkUpdateProjects (with elevated permissions) ```javascript import { projects } from '@wix/portfolio'; import { auth } from '@wix/essentials'; async function myBulkUpdateProjectsMethod(options) { const elevatedBulkUpdateProjects = auth.elevate(projects.bulkUpdateProjects); const response = await elevatedBulkUpdateProjects(options); } ``` ### bulkUpdateProjects (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { projects } from '@wix/portfolio'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { projects }, // Include the auth strategy and host as relevant }); async function bulkUpdateProjects(options) { const response = await myWixClient.projects.bulkUpdateProjects(options); }; ``` ---