The Portfolio Settings API allows you to manage a site's portfolio settings, including configurations for its media and project items. Learn more about the Wix Portfolio feature.
With the Portfolio Settings API, you can:
It’s important to note the following points before starting to code:
'Entity already exists'
error message.This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.
When integrating with Wix Portfolio, you can configure a site's portfolio settings.
Call Get Portfolio Settings to check for existing portfolio settings.
If there are existing settings, call Update Portfolio Settings to update the portfolio settings as desired. If there aren't existing settings, proceed to the next step.
Call Create Portfolio Settings to configure the portfolio settings for a site.
You can update portfolio settings for a Wix user.
A Wix user wants to update their portfolio settings such as media display options or project item organization.
Call Get Portfolio Settings to retrieve the current portfolio settings. This allows you to review and confirm the existing configuration before making updates.
Based on the new preferences provided by the Wix user, call Update Portfolio Settings to adjust the settings.
Revision number. Increments by 1 each time the portfolio settings object is updated. To prevent conflicting changes, the existing revision must be passed when updating the portfolio settings object.
Portfolio's project item settings.
Portfolio's media settings.
Date and time the portfolio settings were created.
Date and time the portfolio settings were updated.
{
"portfolioSettings": {
"revision": 5,
"projectItemSettings": {
"addItemDirection": "GALLERY_END",
"defaultItemName": "FILE_NAME"
},
"mediaSettings": {
"folderId": "5f6197ab-a4b4-426d-b1fb-02603e24c0be"
},
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-10-27T09:30:00Z"
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a site's portfolio settings.
You can only call this method when authenticated as a Wix app or Wix user identity.
Portfolio settings.
curl -X GET \
'https://www.wixapis.com/portfolio/v1/settings' \
-H 'Authorization: <AUTH>'
{
"portfolioSettings": {
"revision": 1,
"projectItemSettings": {
"addItemDirection": "GALLERY_END",
"defaultItemName": "FILE_NAME"
},
"mediaSettings": {
"folderId": "5f6197ab-a4b4-426d-b1fb-02603e24c0be"
},
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-07-31T12:00:00Z"
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a site's portfolio settings.
Note:
This method is intended for creating portfolio settings. If settings already exist, the request will return an error. To update existing settings, call Update Portfolio Settings.
You can only call this method when authenticated as a Wix app or Wix user identity.
The portfolio settings to create.
Newly created portfolio settings.
curl -X POST \
'https://www.wixapis.com/portfolio/v1/settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
"portfolioSettings": {
"projectItemSettings": {
"addItemDirection": "GALLERY_END",
"defaultItemName": "FILE_NAME"
},
"mediaSettings": {
"folderId": "5f6197ab-a4b4-426d-b1fb-02603e24c0be"
}
}
}'
{
"portfolioSettings": {
"revision": 1,
"projectItemSettings": {
"addItemDirection": "GALLERY_END",
"defaultItemName": "FILE_NAME"
},
"mediaSettings": {
"folderId": "5f6197ab-a4b4-426d-b1fb-02603e24c0be"
},
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-07-31T12:00:00Z"
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates a site's portfolio settings.
You can only call this method when authenticated as a Wix app or Wix user identity.
The portfolio settings to update.
Updated portfolio settings.
curl -X PATCH \
'https://www.wixapis.com/portfolio/v1/settings' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
-d '{
"portfolioSettings": {
"revision": 2,
"projectItemSettings": {
"addItemDirection": "GALLERY_START",
"defaultItemName": "EMPTY"
},
"mediaSettings": {
"folderId": "42460836-02b9-4640-8d47-2d9fe9aba7e4"
}
}
}'
{
"updatedPortfolioSettings": {
"revision": 2,
"projectItemSettings": {
"addItemDirection": "GALLERY_START",
"defaultItemName": "EMPTY"
},
"mediaSettings": {
"folderId": "42460836-02b9-4640-8d47-2d9fe9aba7e4"
}
"createdDate": "2024-07-31T12:00:00Z",
"updatedDate": "2024-07-31T12:05:00Z"
}
}
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when portfolio settings are created.
Unique event ID. Allows clients to ignore duplicate webhooks.
Fully qualified domain name of the entity associated with the event. Expected wix.portfolio.portfolio_app.v1.portfolio_settings
.
Event name. Expected created
.
ID of the entity associated with the event.
Event timestamp.
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
If present, indicates the action that triggered the event.
Event information.
The data payload will include the following as an encoded JWT:
{
"data": {
"eventType": "wix.portfolio.portfolio_app.v1.portfolio_settings_created",
"instanceId": "<app-instance-id>",
"data": "<stringified-JSON>",
// The identity field is sent as a stringified JSON
"identity": {
"identityType": "<identityType>", // ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
"anonymousVisitorId": "<anonymousVisitorId>", // in case of ANONYMOUS_VISITOR
"memberId": "<memberId>", // in case of MEMBER
"wixUserId": "<wixUserId>", // in case of WIX_USER
"appId": "<appId>" // in case of APP
}
}
}