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.pollSearch({ refId: 'prs-ref_3fa85f64-5717-4562-b3fc' });
console.log(response.refId);{
"refId": "<string>",
"result": {
"products": [
{
"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>"
]
}
]
}
}
],
"pagination": {
"nextCursor": 123,
"previousCursor": 123
}
},
"error": {}
}Product
Product Search Status
Check the status of a product search retrieval job and get results when ready.
GET
/
product
/
search
/
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.pollSearch({ refId: 'prs-ref_3fa85f64-5717-4562-b3fc' });
console.log(response.refId);{
"refId": "<string>",
"result": {
"products": [
{
"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>"
]
}
]
}
}
],
"pagination": {
"nextCursor": 123,
"previousCursor": 123
}
},
"error": {}
}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:
"prs-ref_3fa85f64-5717-4562-b3fc"
Was this page helpful?
⌘I