Introduction
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
We have implemented a 'soft' level of authentication for the API. This means you'll generate an API key in our dashboard which you may use in a public environment, and this will only retrieve non-sensitive information.
Generate your API key here: https://app.yakety-yak.io/integrations/api
Endpoints
GET api/v1/reviews
requires authentication
Example request:
curl --request GET \
--get "https://app.yakety-yak.io/api/v1/reviews?reviewable=c5bdadc4-a222-304a-a528-630427d6c49a" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://app.yakety-yak.io/api/v1/reviews';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
'query' => [
'reviewable' => 'c5bdadc4-a222-304a-a528-630427d6c49a',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.yakety-yak.io/api/v1/reviews'
params = {
'reviewable': 'c5bdadc4-a222-304a-a528-630427d6c49a',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
const url = new URL(
"https://app.yakety-yak.io/api/v1/reviews"
);
const params = {
"reviewable": "c5bdadc4-a222-304a-a528-630427d6c49a",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Success):
{
"data": [
{
"id": "10ad29d5-aadb-4e6f-bb57-35473071f509",
"body": "Great Product, I've been able to unleash the power of the Pyramid!",
"rating": "5.0",
"reviewer": {
"name": "Dwight S."
}
},
{
"id": "20ad29d5-aadb-4e6f-bb57-35473071f500",
"body": "It blew up in my face!",
"rating": "2.0",
"reviewer": {
"name": "Andy B."
}
}
],
"snapshot": {
"total_rating_average": "3.5",
"total_rating_count": {
"rating_0_count": 0,
"rating_1_count": 0,
"rating_2_count": 1,
"rating_3_count": 0,
"rating_4_count": 0,
"rating_5_count": 1
}
},
"pagination": {
"currentPage": 1,
"from": 1,
"lastPage": 1,
"perPage": 50,
"to": 2,
"total": 2
}
}
Example response (401, Unauthenticated):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
data
object
id
uuid
The UUID of the review
body
string|null
The body of the review
rating
string
A float value of rating for the review
reviewer
object
name
string
The semi-anonymous name of the reviewer
snapshot
object
total_rating_average
string
A float value of the mean average rating of the reviewable
total_rating_count
object
0
integer
Total count of all 0 star reviews
1
integer
Total count of all 1 star reviews
2
integer
Total count of all 2 star reviews
3
integer
Total count of all 3 star reviews
4
integer
Total count of all 4 star reviews
5
integer
Total count of all 5 star reviews
total_rating_percentage
object
0
integer
Percentage of total for 0 star reviews
1
integer
Percentage of total for 1 star reviews
2
integer
Percentage of total for 2 star reviews
3
integer
Percentage of total for 3 star reviews
4
integer
Percentage of total for 4 star reviews
5
integer
Percentage of total for 5 star reviews
pagination
object
currentPage
integer
The current page of the paginated result
from
integer
First item index of the paginated result
to
integer
Last item index of the paginated result
lastPage
integer
Last page of the paginated result
perPage
integer
How many items per page
total
integer
The total number of items regardless of pagination
GET api/v1/reviewables
requires authentication
Example request:
curl --request GET \
--get "https://app.yakety-yak.io/api/v1/reviewables" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://app.yakety-yak.io/api/v1/reviewables';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.yakety-yak.io/api/v1/reviewables'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
const url = new URL(
"https://app.yakety-yak.io/api/v1/reviewables"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (200, Success):
{
"data": [
{
"id": "6b0d9530-46fd-4e5e-846d-4fe5853755a9",
"name": "Sabre Printer",
"thumbnail_url": "https://placehold.co/600x600/B2DBD5/FA8D65/jpg",
"source": "Shopify",
"custom_id": "gid://shopify/Product/9125877418212"
},
{
"id": "5b0d9530-46fd-4e5e-846d-4fe5853755a8",
"name": "Sabre Pyramid",
"thumbnail_url": "https://placehold.co/600x600/B2DBD5/FA8D65/jpg",
"source": "Etsy",
"custom_id": "6b0491c4-d4d3-4a48-a196-893b00dabdc5"
}
],
"pagination": {
"currentPage": 1,
"from": 1,
"lastPage": 1,
"perPage": 50,
"to": 1,
"total": 2
}
}
Example response (401, Unauthenticated):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
data
object
id
uuid
The UUID of the reviewable
custom_id
string
The id of the reviewable from the source, eg Shopify
thumbnail_url
string
The current page of the paginated result
name
string
The name of the reviewable
pagination
object
currentPage
integer
The current page of the paginated result
from
integer
First item index of the paginated result
to
integer
Last item index of the paginated result
lastPage
integer
Last page of the paginated result
perPage
integer
How many items per page
total
integer
The total number of items regardless of pagination
GET api/v1/healthcheck
requires authentication
Example request:
curl --request GET \
--get "https://app.yakety-yak.io/api/v1/healthcheck" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://app.yakety-yak.io/api/v1/healthcheck';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://app.yakety-yak.io/api/v1/healthcheck'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
const url = new URL(
"https://app.yakety-yak.io/api/v1/healthcheck"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
Example response (401):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
{
"message": "Unauthenticated."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.