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.details({
link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',
country: 'US',
mode: 'async',
});
console.log(response.refId);{
"refId": "<string>",
"status": "pending",
"result": {
"link": "<string>",
"merchant": "<string>",
"host": "<string>",
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"price": {
"value": 123,
"currency": "USD"
},
"originalPrice": {
"value": 123,
"currency": "USD"
},
"availability": "in_stock",
"options": {
"status": "<string>",
"values": [
{
"value": "<string>",
"label": "<string>",
"availability": "in_stock",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"link": "<string>",
"nextOption": "<unknown>"
}
],
"label": "<string>"
}
},
"error": {}
}Fetch detailed information about a product from a given URL. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.
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.details({
link: 'https://www.nike.com/u/custom-nike-ja-3-by-you-10002205',
country: 'US',
mode: 'async',
});
console.log(response.refId);{
"refId": "<string>",
"status": "pending",
"result": {
"link": "<string>",
"merchant": "<string>",
"host": "<string>",
"name": "<string>",
"sku": "<string>",
"description": "<string>",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"price": {
"value": 123,
"currency": "USD"
},
"originalPrice": {
"value": 123,
"currency": "USD"
},
"availability": "in_stock",
"options": {
"status": "<string>",
"values": [
{
"value": "<string>",
"label": "<string>",
"availability": "in_stock",
"images": [
{
"url": "<string>",
"isFeatured": true
}
],
"link": "<string>",
"nextOption": "<unknown>"
}
],
"label": "<string>"
}
},
"error": {}
}Direct product URL
"https://www.nike.com/u/custom-nike-ja-3-by-you-10002205"
Response mode. Use sync to wait up to 30 seconds for the backing worker flow to complete.
async, sync "async"
An ordered array of option values to select for the product. Will be selected in the order listed.
["regular", "black", "10-w"]Country code for the product's location
"US"
Product details queued successfully, use refId to check status and retrieve results
Was this page helpful?