Fetches the custom album payload including album images, tags, names, and IDs of all existing custom albums per account app_key
.
import requests
url = "https://api.yotpo.com/v1/widget/app_key/albums/by_name"
querystring = {"album_name":"album_name","page":"1"}
headers = {'content-type': 'application/json'}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
var request = require("request");
var options = {
method: 'GET',
url: 'https://api.yotpo.com/v1/widget/app_key/albums/by_name',
qs: {album_name: 'album_name', page: '1'},
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/by_name?album_name=album_name&page=1")
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/by_name?album_name=album_name&page=1");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://api.yotpo.com/v1/widget/app_key/albums/by_name"
querystring = {"album_name":"album_name","page":"1"}
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": "5a98197f6efb092db231f695",
"low_resolution_image_url": "//scontent.cdninstagram.com/vp/da9f5101451fa862caabf874716755f6/5B2B50AF/t51.2885-15/e35/p320x320/28156507_165346500940639_6306343443274661888_n.jpg",
"original_image_url": "//scontent.cdninstagram.com/vp/88cae9a00ac8b10265bd97b7d5ef1159/5B3ECDF8/t51.2885-15/sh0.08/e35/p640x640/28156507_165346500940639_6306343443274661888_n.jpg",
"image_url": "//scontent.cdninstagram.com/vp/c26ee077c49ceb4567d77ff073439d4e/5B37EEA0/t51.2885-15/s150x150/e35/c0.43.1080.1080/28156507_165346500940639_6306343443274661888_n.jpg",
"external_media_id": "1724914648462926403_3220168402",
"tagged_products": [
{
"id": 23626625,
"name": "Classy Signature T-Shirt",
"domain_key": "6",
"product_link": "https://yotpos-demo-store-2.myshopify.com/products/classy-signature",
"product_url": "https://yotpos-demo-store-2.myshopify.com/products/classy-signature",
"image_url": "https://ddcfq0gxiontw.cloudfront.net/Product/23827964/18687703/square.jpg?1499177861",
"score": null,
"reviews_count": null
}
],
"media_type":"image",
"permission_request_status":"approved",
"post": {
"profile_picture": "https://scontent.cdninstagram.com/vp/ad77096025c93ac62127bc4788dd5350/5B35AAB4/t51.2885-19/s150x150/18879688_1351838138239441_1502256565162344448_a.jpg",
"username": "dey_ag1112",
"location_name": "",
"created_time": "2018-02-28T19:24:31.000+00:00",
"hashtags": [
"spicyblackbeanburger",
"lemon",
"terradelyssa",
"saladfordays",
"lunchtime",
"himalayansalt",
"homemadedressing",
"morningstarfarms",
"oliveoil"
],
"content": "🍴\n#lunchtime #saladfordays #morningstarfarms #spicyblackbeanburger #homemadedressing #oliveoil #lemon #himalayansalt #terradelyssa",
"votes_up": 0,
"votes_down": 0
}
},
{
"source": "review",
"image_id": 29087960,
"review_id": 48902637,
"low_resolution_image_url": "//ddcfq0gxiontw.cloudfront.net/Review/48902637/29087960/medium_square.jpg?1511673183",
"image_url": "//ddcfq0gxiontw.cloudfront.net/Review/48902637/29087960/square.jpg?1511673183",
"original_image_url": "//ddcfq0gxiontw.cloudfront.net/Review/48902637/29087960/original.jpg?1511673183",
"review": {
"id": 48902637,
"review_type_id": 1,
"rejected": false,
"title": "Excellent",
"content": "Thank you I love them",
"score": 5,
"created_at": "2017-11-26T05:13:05.000Z",
"verified_buyer": 1,
"archived": 0,
"deleted": 0,
"votes_up": 0,
"votes_down": 0,
"user": {
"display_name": "renee",
"social_image": null,
"email": "[email protected]"
}
},
"product": {
"domain_key": "1",
"name": "Crewneck Pocket T-Shirt",
"product_url": "https://yotpos-demo-store-2.myshopify.com/products/crewneck-pocket",
"product_link": "https://yotpos-demo-store-2.myshopify.com/products/crewneck-pocket",
"image_url": "https://ddcfq0gxiontw.cloudfront.net/Product/23827969/18687695/square.jpg?1499177859"
},
"album_image": {
"_id": {
"$oid": "5ad367f076798169130df80d"
},
"album_id": {
"$oid": "5a97d283e31670685bc87539"
},
"image_created_date": "2017-11-26T05:13:05.000Z",
"image": {
"external_id": "29087960",
"source": "Review",
"_id": {
"$oid": "5ae9c7131b0ee527fb4098e7"
}
},
"favorite": false,
"invalidated": false,
"created_at": "2018-04-15T14:55:44.423Z",
"updated_at": "2018-04-15T14:55:44.423Z",
"album_name": "UGC Gallery"
}
},
{
"source": "instagram",
"image_id": "59f73c3b3fa5a35e927847ae",
"low_resolution_image_url": "//scontent.cdninstagram.com/vp/b4fbe8dc582627cd755d961533559c7b/5B4EB108/t51.2885-15/s320x320/e35/22860435_1627650820618673_6136770394897514496_n.jpg",
"original_image_url": "//scontent.cdninstagram.com/vp/af4b4d91706d4f7e4ac281c8c8c6884e/5B544D45/t51.2885-15/s640x640/sh0.08/e35/22860435_1627650820618673_6136770394897514496_n.jpg",
"image_url": "//scontent.cdninstagram.com/vp/9a1be59c71d9258922e947ff484c3f4a/5B6FD538/t51.2885-15/s150x150/e35/22860435_1627650820618673_6136770394897514496_n.jpg",
"external_media_id": "1636642758793837508_4065356078",
"tagged_products": [
],
"media_type":"image",
"permission_request_status":"approved",
"post": {
"profile_picture": "https://scontent.cdninstagram.com/vp/d2a9ff0d24c73924ed59ef664b0a9082/5B397663/t51.2885-19/s150x150/14717358_368701900129822_7310002550739042304_a.jpg",
"username": "boz_rich",
"location_name": "",
"created_time": "2017-10-30T00:24:02.000+00:00",
"hashtags": [
"wornandwound",
"danhenrywatches",
"windupnyc"
],
"content": "Not too crazy about quartz these days but if there is ever a quartz to have in my collection, this is the one. Enter the Dan Henry Multiscale Chronograph 1939. Saw this at Wind-up Watch Fair today. And yes I will get this soon. @danhenrywatches @wornandwound #danhenrywatches #windupnyc #wornandwound",
"votes_up": 0,
"votes_down": 0
}
}
]
}
}
{}
PATH PARAMS
Parameter | Type | Description |
---|---|---|
app_key* | string | Your Yotpo account API key |
QUERY PARAMS
Parameter | Type | Description |
---|---|---|
album_name* | string | The name of your custom album. The album name can be found by using the Get All Album Names endpoint. |
page | integer | The page number of a paginated response. Must be greater than zero. Default: 1 |
per_page | integer | The number of results to return per page |
favorite=true | string | Retrieve only starred images |
favorite=false | string | Retrieve only unstarred images |