Skip to main content
POST
/
products
/
variant-check
JavaScript
import HenrySDK from '@henrylabs/sdk';

const client = new HenrySDK({
  apiKey: 'My API Key',
});

const variantCheck = await client.products.variantCheck.create({
  product: {
    productId: 'P01145AC2',
    name: "Men's Cloud 6 Versa Shoes",
    price: '100',
    quantity: 1,
    metadata: { color: 'Black', size: '9' },
    productLink:
      'https://www.on.com/en-us/products/cloud-6-versa-m-3mf1004/mens/black-eclipse-shoes-3MF10040106',
  },
});

console.log(variantCheck.createdAt);
{
  "success": true,
  "requestId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "pending",
  "message": "Variant check request created. Use requestId to poll for results.",
  "createdAt": "2024-01-15T10:30:00.000Z"
}

Authorizations

x-api-key
string
header
required

Headers

x-user-id
string

Optional end-user identifier for tracking purposes

Body

application/json
product
object
required

Product details to check variant availability for

Response

Request accepted and processing started. Use the requestId to poll for results.

success
boolean
required
requestId
string<uuid>
required
status
enum<string>
required
Available options:
pending,
processing
message
string
required
createdAt
string
required