Product Images

Use this endpoint to retrieve images curated to product albums.

curl --request GET \
  --url 'https://api.yotpo.com/v1/widget/app_key/albums/product/product_id?page=1&per_page=10' \
  --header 'content-type: application/json'
var request = require("request");

var options = {
  method: 'GET',
  url: 'https://api.yotpo.com/v1/widget/app_key/albums/product/product_id',
  qs: {page: '1', per_page: '10'},
  headers: {'content-type': 'application/json'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.yotpo.com/v1/widget/app_key/albums/product/product_id?page=1&per_page=10")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
var data = null;

var xhr = new XMLHttpRequest();

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.yotpo.com/v1/widget/app_key/albums/product/product_id?page=1&per_page=10");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
import requests

url = "https://api.yotpo.com/v1/widget/app_key/albums/product/product_id"

querystring = {"page":"1","per_page":"10"}

headers = {'content-type': 'application/json'}

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
{
    "status": {
        "code": 200,
        "message": "OK"
    },
    "response": {
        "pagination": {
            "page": 1,
            "per_page": 3,
            "total": 0
        },
        "images": [
            {
                "source": "instagram",
                "image_id": "5acc67ab4e904b4f68197b7e",
                "low_resolution_image_url": "//scontent.cdninstagram.com/vp/768b1d9ebd06f60cf12c7847821fbd6d/5B681B7F/t51.2885-15/s320x320/e35/20986874_695325423991497_2749685599597232128_n.jpg",
                "original_image_url": "//scontent.cdninstagram.com/vp/d7ec5f13b54c190010edc3a3511aa348/5B686E3C/t51.2885-15/s640x640/sh0.08/e35/20986874_695325423991497_2749685599597232128_n.jpg",
                "image_url": "//scontent.cdninstagram.com/vp/8548e36d016cdafb184ecad8237aaf8f/5B59C938/t51.2885-15/s150x150/e35/20986874_695325423991497_2749685599597232128_n.jpg",
                "external_media_id": "1587020048554520701_27693384",
                "tagged_products": [
                    {
                        "id": 23626629,
                        "name": "Athletic T-Shirt",
                        "domain_key": "8",
                        "product_link": "https://yotpo.com/go/n78k812O",
                        "product_url": "https://yotpos-demo-store-2.myshopify.com/products/athletic",
                        "image_url": "https://ddcfq0gxiontw.cloudfront.net/Product/23827967/18687701/square.jpg?1499177862",
                        "score": null,
                        "reviews_count": null
                    },
                    {
                        "id": 23626635,
                        "name": "Deep V-Neck",
                        "domain_key": "7",
                        "product_link": "https://yotpo.com/go/ej5VgEIZ",
                        "product_url": "https://yotpos-demo-store-2.myshopify.com/products/deep-cut",
                        "image_url": "https://ddcfq0gxiontw.cloudfront.net/Product/23827971/18687696/square.jpg?1499177861",
                        "score": null,
                        "reviews_count": null
                    },
                    {
                        "id": 23626639,
                        "name": "Striped V-Neck",
                        "domain_key": "3",
                        "product_link": "https://yotpo.com/go/fCH2ZGUC",
                        "product_url": "https://yotpos-demo-store-2.myshopify.com/products/striped-v",
                        "image_url": "https://ddcfq0gxiontw.cloudfront.net/Product/23827975/18687702/square.jpg?1499177861",
                        "score": null,
                        "reviews_count": null
                    }
                ],
                "media_type":"image",
                "permission_request_status":"approved",
                "post": {
                    "profile_picture": "https://scontent.cdninstagram.com/vp/071f4a200310eb9eec2beaa53c7eb810/5B5D8455/t51.2885-19/s150x150/10598276_885098761603741_1222504716_a.jpg",
                    "username": "pakalupapito",
                    "location_name": "Yotpo",
                    "created_time": "2017-08-22T13:12:34.000+00:00",
                    "hashtags": [
                        "movingday",
                        "yotpo"
                    ],
                    "content": "",
                    "votes_up": 0,
                    "votes_down": 0
                }
            },
            {
                "source": "review",
                "image_id": 18075918,
                "review_id": 40490790,
                "low_resolution_image_url": "//ddcfq0gxiontw.cloudfront.net/Review/40490790/18075918/medium_square.jpg?1497174598",
                "image_url": "//ddcfq0gxiontw.cloudfront.net/Review/40490790/18075918/square.jpg?1497174598",
                "original_image_url": "//ddcfq0gxiontw.cloudfront.net/Review/40490790/18075918/original.jpg?1497174598",
                "review": {
                    "id": 40490790,
                    "review_type_id": 1,
                    "rejected": false,
                    "title": "Quality product",
                    "content": "Nice to purchase from a company with a wide selection of products locally. Product was exactly what I wanted and shipment arrived in a couple of days. Quality product and excellent experience. Highly recommend this vendor.",
                    "score": 5,
                    "created_at": "2017-06-11T09:49:59.000Z",
                    "verified_buyer": 1,
                    "archived": 0,
                    "deleted": 0,
                    "votes_up": 0,
                    "votes_down": 0,
                    "user": {
                        "display_name": "jerrod_demetrius_owen_59124",
                        "social_image": null,
                        "email": "[email protected]"
                    }
                },
                "product": {
                    "domain_key": "8",
                    "name": "Athletic T-Shirt",
                    "product_url": "https://yotpos-demo-store-2.myshopify.com/products/athletic",
                    "product_link": "https://yotpo.com/go/zqQETbVo",
                    "image_url": "https://ddcfq0gxiontw.cloudfront.net/Product/23827967/18687701/square.jpg?1499177862"
                },
                "album_image": {
                    "_id": {
                        "$oid": "5ac9e59d4e904b1529183d4d"
                    },
                    "album_id": {
                        "$oid": "5ac9e59d4e904b1529183d4c"
                    },
                    "created_at": "2018-04-08T09:49:17.402Z",
                    "favorite": false,
                    "image": {
                        "_id": {
                            "$oid": "5ae9cd331b0ee532a2409b59"
                        },
                        "created_at": null,
                        "external_id": "18075918",
                        "source": "Review",
                        "updated_at": null
                    },
                    "image_created_date": "2017-06-11T09:49:59.000+00:00",
                    "invalidated": false,
                    "updated_at": "2018-04-08T09:49:17.402Z"
                }
            }
        ]
    }
}
{}

PATH PARAMS

ParameterTypeDescription
app_key*stringYour Yotpo account API key
product_id*stringThe unique product identifier

QUERY PARAMS

ParameterTypeDescription
pageintegerThe page number of a paginated response.
Must be greater than zero.
Default: 1
per_pageintegerThe number of results to return per page
favorite=truestringRetrieve only starred images
favorite=falsestringRetrieve only unstarred images