JavaScript
import HenrySDK from '@henrylabs/sdk';
const client = new HenrySDK({
apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
});
const response = await client.products.pollDetails({ refId: 'prd-ref_3fa85f64-5717-4562-b3fc' });
console.log(response.refId);curl --request GET \
--url https://api.henrylabs.ai/v1/product/details/status \
--header 'x-api-key: <api-key>'import requests
url = "https://api.henrylabs.ai/v1/product/details/status"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.henrylabs.ai/v1/product/details/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.henrylabs.ai/v1/product/details/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.henrylabs.ai/v1/product/details/status")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.henrylabs.ai/v1/product/details/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"refId": "<string>",
"result": {
"link": "<string>",
"merchant": "<string>",
"host": "<string>",
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"price": {
"value": 123
},
"originalPrice": {
"value": 123
},
"options": {
"status": "<string>",
"values": [
{
"value": "<string>",
"label": "<string>",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"link": "<string>",
"nextOption": "<unknown>"
}
],
"label": "<string>"
},
"reviews": {
"rating": 123,
"count": 0,
"histogram": [
{
"stars": 0,
"count": 0
}
],
"criticRatings": [
{
"name": "<string>",
"rating": "<string>",
"link": "<string>"
}
],
"userReviews": [
{
"text": "<string>",
"title": "<string>",
"author": "<string>",
"rating": 123,
"date": "<string>",
"source": "<string>",
"images": [
"<string>"
]
}
],
"insights": [
{
"title": "<string>",
"snippets": [
"<string>"
]
}
]
},
"sections": [
{
"title": "<string>",
"body": "<string>"
}
]
},
"error": {}
}{
"success": true,
"status": "<string>",
"message": "<string>"
}{
"success": true,
"status": "<string>",
"message": "<string>"
}Product
Product Details Status
Check the status of a product details retrieval job and get results when ready.
GET
/
product
/
details
/
status
JavaScript
import HenrySDK from '@henrylabs/sdk';
const client = new HenrySDK({
apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
});
const response = await client.products.pollDetails({ refId: 'prd-ref_3fa85f64-5717-4562-b3fc' });
console.log(response.refId);curl --request GET \
--url https://api.henrylabs.ai/v1/product/details/status \
--header 'x-api-key: <api-key>'import requests
url = "https://api.henrylabs.ai/v1/product/details/status"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.henrylabs.ai/v1/product/details/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.henrylabs.ai/v1/product/details/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.henrylabs.ai/v1/product/details/status")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.henrylabs.ai/v1/product/details/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"refId": "<string>",
"result": {
"link": "<string>",
"merchant": "<string>",
"host": "<string>",
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"price": {
"value": 123
},
"originalPrice": {
"value": 123
},
"options": {
"status": "<string>",
"values": [
{
"value": "<string>",
"label": "<string>",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"link": "<string>",
"nextOption": "<unknown>"
}
],
"label": "<string>"
},
"reviews": {
"rating": 123,
"count": 0,
"histogram": [
{
"stars": 0,
"count": 0
}
],
"criticRatings": [
{
"name": "<string>",
"rating": "<string>",
"link": "<string>"
}
],
"userReviews": [
{
"text": "<string>",
"title": "<string>",
"author": "<string>",
"rating": 123,
"date": "<string>",
"source": "<string>",
"images": [
"<string>"
]
}
],
"insights": [
{
"title": "<string>",
"snippets": [
"<string>"
]
}
]
},
"sections": [
{
"title": "<string>",
"body": "<string>"
}
]
},
"error": {}
}{
"success": true,
"status": "<string>",
"message": "<string>"
}{
"success": true,
"status": "<string>",
"message": "<string>"
}Authorizations
Query Parameters
Reference ID used for checking status
Pattern:
^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$Example:
"prd-ref_3fa85f64-5717-4562-b3fc"
Was this page helpful?
⌘I