Skip to main content
POST
/
product
/
details
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.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": {}
}

Authorizations

x-api-key
string
header
required

Body

application/json

Direct product URL

Example:

"https://www.nike.com/u/custom-nike-ja-3-by-you-10002205"

mode
enum<string>

Response mode. Use sync to wait up to 30 seconds for the backing worker flow to complete.

Available options:
async,
sync
Example:

"async"

selectedOptions
string[]

An ordered array of option values to select for the product. Will be selected in the order listed.

Example:
["regular", "black", "10-w"]
country
string

Country code for the product's location

Example:

"US"

Response

Product details queued successfully, use refId to check status and retrieve results

refId
string
required
Pattern: ^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$
status
enum<string>
required
Available options:
pending,
processing,
complete,
failed
result
object
error
object