# V1

## Getting Started

For our script to properly integrate the variants, all of the **required metadata** described below will be fetched through the product page by our implantation team. Here's the final object's schema:

```
{
  sku: number | string;
  productId: number | string;
  source: "https://storename.com/your/catalog/url?skuId=SKU_ID&productId=PRODUCT_ID";

  images: string[]; // a list of colors (hex, hsl, rgb, etc)
  variants: { color: string; variant: string | number }[];
};

```

Let's now dissect it:

* `sku`: Product `SKU`
* `productId`: Product `ID`
* `source`: your catalog endpoint. It will be used by the Virtual Fitting Room to fetch the variants' metadata, based on their `SKU` and `PRODUCT_ID`. If your endpoint expects a different set of query parameters, please contact our team at <support@sizebay.com>.
* `variants`: As of today, our variants integration only detects the color and which variant ID it corresponds to.

After that, we'll add to the store domain's cookies the key `SIZEBAY_METADATA`, which serves as a middleware so the Virtual Fitting Room can detect the variants, thus rendering them into the screen.

### Aftermath

If everything is properly configured, this is what your Recommendation screen will look like:

![Product Variants carousel and photo slider](/files/-MeAuKTqBh1cP8WrGwBv)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sizebay.com/size-and-fit-data-integration/product-variants-integration/v1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
