About Pro Gallery

The Pro Gallery API allows you to manage pro galleries on a Wix site's backend.

With the Pro Gallery API, you can:

  • Get, list, and update pro galleries created by a Wix site owner with the Editor.
  • Get, list, create, update, and delete items in a pro gallery.
  • Create or delete a pro gallery on a site's backend.

For the Pro Gallery API to synchronize with a site's frontend, a Wix site owner needs to add a pro gallery to their site using the Editor. When you use the Pro Gallery API to create, update, or delete an item from a pro gallery created with the Editor, or to delete a pro gallery, the site's frontend updates automatically.

Note: We do not recommend creating new pro galleries using the Pro Gallery API. When a Wix site owner adds a pro gallery to their site using the Editor, a corresponding pro gallery is created on the site's backend. You can then use the Pro Gallery API to manage items in this pro gallery or delete it, and all updates are reflected on the site's frontend. However, when you create a pro gallery using the Pro Gallery API, it's available only on the site's backend and doesn't appear on the live site. In order to display a backend pro gallery on a live site, the site owner needs to connect it manually to a gallery component using code. To learn more about how a site owner can do this using Velo, see Displaying a Pro Gallery on Your Site Using the Pro Gallery Backend API.

Before you begin

It's important to note the following points before starting to code:

Terminology

  • Pro Gallery: A responsive and customizable gallery that displays media items.
  • Gallery Items: Media items in a pro gallery, such as images, videos, and text files. You can read more about supported media.
Was this helpful?
Yes
No

Example Flows

This article shares some possible use cases for your app, as well as an example flow that could support each one. You're certainly not limited to these use cases, but they can be a helpful jumping-off point as you plan your app's implementation.

Your app can help the site owners upload media from a Pro Gallery to an external Social Media platform to increase their brand's popularity. You could retrieve the site's Pro Galleries, let the site owner select one, get the relevant media, and then upload the media items to the external platform.

  1. Retrieve the site's Pro Galleries via the List Galleries endpoint.
  2. Display the first image of each gallery to the site owners and let them select which Pro Gallery they want to upload to the external platform.
  3. Retrieve the media items belonging to the relevant gallery using the Get Gallery endpoint.
  4. Create a mapping for future syncs between the Pro Gallery and the external platform and store it on your servers.
  5. Upload the media files to the external platform.

Note: Make sure to include both the Wix media item IDs and the external media IDs in the mapping.

Part 1: Initial Setup

First, your app needs to create a mapping between the Wix media items and the external media. You can read about a possible way to do so in the Share a Pro Gallery on an External Platform example flow.

  1. Sign up for the following webhooks:
  2. Get notified when one of these webhooks is triggered and extract the item ID from the webhook data.
  3. For the Gallery Item Updated and Gallery Item Created webhooks, also extract the media URL, sort order, and other relevant information.
  4. Identify the corresponding media item in your mapping and update the mapping accordingly.
  5. Use the external platform's APIs to create, delete, or update the media item there.

Note: Ignore the resulting webhook, so you don’t create an endless loop of updates.

  1. Listen to changes in the external gallery.
  2. Update the mapping according to the changes.
  3. Upload media to Wix Media using the Media Manager API.
  4. Create, update, or delete the relevant media item in the Pro Gallery using the matching endpoint.
  5. Ignore the resulting Wix webhook, so you don’t create an endless loop of updates.
Was this helpful?
Yes
No


GetList Galleries

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves a list of galleries.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Galleries
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/progallery/v2/galleries

Was this helpful?
Yes
No