Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
http://reviews-api.belezalab.com.br
Authenticating requests
This API is not authenticated.
Endpoints
Shows authenticated user information
This endpoint allows you to add a word to the list. It's a really useful endpoint, and you should play around with it for a bit.
Example request:
curl -X GET \
-G "http://reviews-api.belezalab.com.br/api/products" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://reviews-api.belezalab.com.br/api/products"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://reviews-api.belezalab.com.br/api/products',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"id": 25,
"nome": "Seda Super Condicionador - Hidratação",
"marca": {
"nombre": "Seda"
},
"reviews": [
{
"user_name": "Isabela",
"user_email": "contato@bernardomota.com",
"coments": "Adoro Muito bom para hidratar",
"general_rating": "5",
"presentacion": "5",
"aroma": "5",
"textura": "5",
"durabilidad": "5",
"fac_uso": "5",
"eficacia": "5",
"compraria": "5",
"calidad_precio": "5",
"sustentabilidad": null,
"user_registered": null,
"profile": null,
"image": null,
"product_name": "Seda Super Condicionador - Hidratação"
},
{
"user_name": "Claudia",
"user_email": "contato@bernardomota.com",
"coments": "Deixa o cabelo super sedoso\r\nVale a pena! \r\nJá usei todos.",
"general_rating": "5",
"presentacion": "5",
"aroma": "5",
"textura": "5",
"durabilidad": "5",
"fac_uso": "5",
"eficacia": "5",
"compraria": "5",
"calidad_precio": "5",
"sustentabilidad": null,
"user_registered": null,
"profile": null,
"image": null,
"product_name": "Seda Super Condicionador - Hidratação"
},
]
}
Example response (400, Unauthenticated):
{
"message": "Unauthenticated."
}
Received response:
Request failed with error: