Skip to main content

Alt-View Functionality via our API

Updated over 4 years ago

Some clients have integrated UGC into their stock photography carousel that lives on product pages via our API. In the Earned Content Platform, you are able to specify a user photo that can be used as a "featured image". A featured image is a user photo that can be specified as the image that represents the product/property in the API response.

Note that when making a user image a featured image, it does not replace the stock photography of a given product, but simply gives you an option to use UGC to represent a product/property when building custom implementations.

Instructions

There are 2 parts to achieve the Alt-View functionality using our API:

  1. First, set a Featured Image using the admin for a product stream

  2. Second, traverse through the API to grab the "feature image" related to the specific product stream

Setting the Featured Image

The first step is to decide which image you would like to use as the featured image for a stream or streams you would like to leverage this feature for. To begin that process, you must first go to the Photorank admin and follow these steps:

  1. Navigate to the Media tab and click on Streams

  2. Find the stream and click on the stream card or search result.

  3. In the overlay, slide the Manual Sort slider in the top left to ‘1’. Click on the image that you would like to use as the featured image, then click the green arrow icon in the bottom-left corner of the overlay. This will move the selected photo to the first position. Click the ‘Save’ button to save your changes.

Grabbing the Featured Image from the API

Once you set the featured photo in the Streams section, the featured image can be surfaced in the API response.

Please follow these instructions:

  1. Within the API response, look for the media embedded list. Within that list, the first occurring media is your featured image:

  2. Within this media object, select the image resolution you wish to surface in the images parameter.

Did this answer your question?