# Quick Start

{% hint style="info" %}
**Are you a Shopify Site Owner:** If you are a Shopify site owner, please use this [Guide](/reference/shopify.md) to install and set up your Shopify store.&#x20;
{% endhint %}

## Setup your Store

### Discoverist Dashboard

Create an account at the [Discoverist Website](https://dashboard.discoverist.ai/auth). Follow the instructions to create your Store. For more information follow this Guide

{% content-ref url="/pages/v2BAWUojC39rpUKOgVLk" %}
[Discoverist Dashboard](/reference/discoverist-dashboard.md)
{% endcontent-ref %}

## Get your client\_id and  API keys

You will need a Client\_id to access and the API's for your store. Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error. After creating the store you will be provided with your client\_id and  API key.&#x20;

You can re-generate an API key by sending the request to Discoverist Team.&#x20;

## Make your first request

To make your first request, send an authenticated request to the bundles endpoint. This will return bundles for the product.&#x20;

## Get Bundles.

<mark style="color:green;">`POST`</mark> `https://api.discoverist.ai/recommend/v1/clients/{client_id}/products/bundles`

Returns the 2 bundles with 3 products in each bundle. Returns all the variants for the product. &#x20;

#### Request Body

| Name                                          | Type   | Description                                          |
| --------------------------------------------- | ------ | ---------------------------------------------------- |
| product\_id<mark style="color:red;">\*</mark> | string | Product Id from your Product Catalog                 |
| user\_id                                      | string | Unique user identifer for each user on your website. |

{% tabs %}
{% tab title="200 Get Bundles" %}

```json
{
    "results": [
        {
            "suggestion": "Casual Organic Cotton Look",
            "products": [
                {
                    "id": 7951758721191,
                    "name": "Preamble Organic Cotton Men's & Women's Tee",
                    "url": "https://cdn.shopify.com/s/files/1/0635/0959/4279/products/XnzEw0MKhg.png?v=1709600789",
                    "price": 35.0,
                    "handle": "preamble-organic-cotton-mens-womens-tee",
                    "options": [
                        {
                            "name": "Size",
                            "position": 1,
                            "values": [
                                "SMALL",
                                "MEDIUM",
                                "LARGE",
                                "XLARGE",
                                "2XLARGE"
                            ]
                        },
                        {
                            "name": "Color",
                            "position": 2,
                            "values": [
                                "WHITE",
                                "IVORY",
                                "BLACK",
                                "ASPHALT",
                                "RED",
                                "MOSS",
                                "ROYAL BLUE",
                                "STEEL BLUE",
                                "POWDER BLUE",
                                "NAVY BLUE"
                            ]
                        },
                        {
                            "name": "Style",
                            "position": 3,
                            "values": [
                                "MENS TEE",
                                "WOMENS TEE"
                            ]
                        }
                    ],
                    "sizes": "SMALL, MEDIUM, LARGE, XLARGE, 2XLARGE",
                    "variants": [
                        {
                            "id": 44802205515943,
                            "product_id": 7951758721191,
                            "title": "SMALL / WHITE / MENS TEE",
                            "price": "35.00",
                            "inventory_policy": "continue",
                            "compare_at_price": null,
                            "option1": "SMALL",
                            "option2": "WHITE",
                            "option3": "MENS TEE"
                        },
                        ...
                    ],
                    "images": [],
                    "age_group": ""
                },
                {
                    "id": 7951784280231,
                    "name": "Trifecta French Terry Stripe Jogger Lightning Iceberg",
                    "text": "Trifecta French Terry Stripe Jogger Lightning Iceberg",
                    "url": "https://cdn.shopify.com/s/files/1/0635/0959/4279/products/lRHSUSSMCG.jpg?v=1709603918",
                    "price": 145.0,
                    "handle": "trifecta-french-terry-stripe-jogger-lightning-iceberg",
                    "options": [
                        {
                            "name": "Size",
                            "position": 1,
                            "values": [
                                "XS",
                                "S",
                                "M",
                                "L",
                                "XL"
                            ]
                        },
                        {
                            "name": "Color",
                            "position": 2,
                            "values": [
                                "Lightning Iceberg"
                            ]
                        }
                    ],
                    "sizes": "XS, S, M, L, XL",
                    "variants": [
                        {
                            "id": 44802397274279,
                            "product_id": 7951784280231,
                            "title": "XS / Lightning Iceberg",
                            "price": "145.00",
                            "inventory_policy": "continue",
                            "compare_at_price": null,
                            "option1": "XS",
                            "option2": "Lightning Iceberg",
                            "option3": null
                        },
                        ...
                    ],
                    "images": [],
                    "age_group": ""
                },
                {
                    "id": 7951826583719,
                    "name": "Vermont House Shoes: Premium Italian Veg-Tan Camo Loafers",
                    "text": "Vermont House Shoes: Premium Italian Veg-Tan Camo Loafers",
                    "url": "https://cdn.shopify.com/s/files/1/0635/0959/4279/products/k1IaGo9osy.jpg?v=1709606904",
                    "price": 232.0,
                    "handle": "vermont-house-shoes-premium-italian-veg-tan-camo-loafers",
                    "options": [
                        {
                            "name": "Size",
                            "position": 1,
                            "values": [
                                "4",
                                "5",
                                "6",
                                "7",
                                "8",
                                "9",
                                "10",
                                "11",
                                "12",
                                "13",
                                "14",
                                "15"
                            ]
                        }
                    ],
                    "sizes": "4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15",
                    "variants": [
                        {
                            "id": 44802571534503,
                            "product_id": 7951826583719,
                            "title": "4",
                            "price": "232.00",
                            "inventory_policy": "continue",
                            "compare_at_price": null,
                            "option1": "4",
                            "option2": null,
                            "option3": null
                        },
                        "..."
                    ],
                    "images": [],
                    "age_group": ""
                }
            ]
        }
    ]
}
```

{% endtab %}

{% tab title="Error 404 product not found" %}

```json
{
    "error": "No matching document found."
}
```

{% endtab %}
{% endtabs %}

Take a look at how you might call this method using our official libraries, or via `curl`:

{% tabs %}
{% tab title="curl" %}

```
curl --location 'https://api.discoverist.ai/recommend/v1/clients/{YOUR_CLIENT_ID}/products/bundles' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "product_id": "7951758721191",
    "user_id": "XYZ"
}
```

{% endtab %}

{% tab title="Java Script" %}

```javascript
const apiKey = process.env.REACT_APP_API_KEY || 'YOUR_API_KEY'; // Replace with your actual API key (consider environment variables)
const clientId = 'YOUR_CLIENT_ID'; // Replace with your actual client ID
const url = `https://api.discoverist.ai/recommend/v1/clients/${clientId}/products/bundles`;
const headers = {
    'accept': 'application/json',
    'x-api-key': apiKey,
  };
const data = {
  product_id: "242424242",
  user_id: "XYZ"
};
const response = await fetch(url, {
      method: 'GET',
      headers,
      body: JSON.stringify(data),  
    });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os
api_key = os.environ.get("YOUR_API_KEY")
client_id = "YOUR_CLIENT_ID"  # Replace with your actual client ID
headers = {
    'accept': 'application/json',
    'x-api-key': YOUR_API_KEY,
}
data = {
    "product_id": "23232323",
    "user_id": "XYZ"
}
url = "https://api.discoverist.ai/recommend/v1/clients/" + client_id + "/products/bundles"
response = requests.get(url, headers=headers, json=data, verify=False)
```

{% endtab %}
{% endtabs %}

## Shopping Assistant

Use the following Guide to set up your Shopping Assistant.&#x20;

{% content-ref url="/pages/6HYS2FKrNil8PzFgMThq" %}
[Assistants](/reference/assistants.md)
{% endcontent-ref %}


---

# 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.discoverist.ai/quick-start.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.
