Detect datasets for a Shopify store

get/v1/datasets/detect

Finds the active datasets that are fed by a given Shopify store. It is built for storefront integrations (such as a theme extension) that know the shop's myshopify.com domain but not which dataset to point the widget at.

How matching works

  1. .myshopify.com is stripped from the domain to get the shop slug (my-store.myshopify.com → my-store), case-insensitively.
  2. Your organization's active Shopify data sources whose endpoint contains that slug are collected.
  3. Their parent datasets are returned — but only those in active status.

A store with no matching source, or whose datasets are all draft or archived, yields detected: false and an empty list rather than an error.

Good to know

  • Because matching is a substring test on the slug, a short slug can match more than one store (shop matches my-shop and shop-two). Use the full domain.
  • Only datasetId, name and the four store fields of config are returned per dataset.
Private keyapi.v1.datasets.detectNo demo

Query parameters

1
shopDomainstringrequired

The store's Shopify domain, for example my-store.myshopify.com. Trimmed and lower-cased before matching.

Response

200The datasets that match, if any.
detectedbooleanrequired

true when at least one active dataset matched.

array<DetectedDataset>required

Matching active datasets. Empty when detected is false.

datasetIdstring (uuid)required

Unique id of the dataset.

namestringrequired

Display name.

objectrequired

The four store fields of the dataset's configuration. Any that were never set are omitted.

Errors

19

Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.

422
shopDomain is required and must be a string.

The shopDomain query parameter is absent or empty.

422
shopDomain cannot be empty.

shopDomain is blank after trimming.

curl -X GET "https://stylor.ai/api/v1/datasets/detect?shopDomain=my-store.myshopify.com" \
  -H "Authorization: Bearer $STYLOR_API_KEY"
Response · 200
{
  "detected": true,
  "datasets": [
    {
      "datasetId": "c9b3c6c0-9b0f-4f42-bf3f-2b7a6b1b9d31",
      "name": "Spring 2026",
      "config": {
        "storeDomain": "example-boutique.com",
        "storeUrl": "https://example-boutique.com",
        "storeName": "Example Boutique",
        "storeId": "58712345678"
      }
    }
  ]
}