Skip to content
Esc
↑↓navigate↵open⌘Jpreview

v1ProductBySku

Query product by sku

QUERYv1ProductBySku
Arguments
skuString!required

Product or variant SKU. Required

marketSlugString!required

Market slug used to resolve prices and market-specific product data. Required

storeGroupSlugString!required

Store group slug used to resolve prices and store-specific product data. Required

relatedProducts[String!]

Relation type slugs to include on relatedProducts (e.g. color). Omit to return all relation types

localeString!required

Locale for translated fields (e.g. en, sv). Required

onlyActiveBoolean!required

When true, only products with active status are matched

hasActiveVariantsBoolean

When true, only products with an active variants are matched

channelSlugString

When set, the product must belong to this sales channel or the query returns not found

Returns
Try it
Server
Bodyapplication/json
Request
curl -X POST 'https://graphql.enad.io/{app_id}/graphql' \
  -H 'Content-Type: application/json' \
  -d '{
  "query": "query V1ProductBySku($sku: String!, $marketSlug: String!, $storeGroupSlug: String!, $relatedProducts: [String!], $locale: String!, $onlyActive: Boolean!, $hasActiveVariants: Boolean, $channelSlug: String) {\n  v1ProductBySku(sku: $sku, marketSlug: $marketSlug, storeGroupSlug: $storeGroupSlug, relatedProducts: $relatedProducts, locale: $locale, onlyActive: $onlyActive, hasActiveVariants: $hasActiveVariants, channelSlug: $channelSlug) {\n    id\n    sku\n    productType\n    slug\n    translatedSlugs {\n      locale\n      value\n    }\n    name\n    description\n    htmlDescription\n    shortDescription\n    htmlShortDescription\n    metaTitle\n    metaDescription\n    variantGroupName\n    variantGroupPriority\n    variantGroupSlug\n    variantGroupBaseProductID\n    customFields {\n      key\n      value\n    }\n    thirdPartyLinks {\n      id\n      type\n      title\n      url\n      createdAt\n      updatedAt\n    }\n    packageDimensions {\n      capacityMilliliter\n      depth\n      diameter\n      height\n      length\n      weight\n      width\n    }\n    productDimensions {\n      capacityMilliliter\n      depth\n      diameter\n      height\n      length\n      weight\n      width\n    }\n    hasActiveVariants\n    status\n    variants {\n      id\n      productId\n      sku\n      name\n      status\n      shippingAttributes\n      validateStock\n      createdAt\n      updatedAt\n      variantGroupId\n    }\n    images {\n      id\n      url\n      title\n      altText\n      copyright\n      sort\n      status\n      blurhash\n      createdWithAi\n      createdAt\n      updatedAt\n    }\n    videos {\n      id\n      url\n      title\n      description\n      sort\n      status\n      createdWithAi\n      createdAt\n      updatedAt\n    }\n    files {\n      id\n      url\n      title\n      fileType\n      createdWithAi\n      createdAt\n      updatedAt\n    }\n    categories {\n      id\n      slug\n      name\n      description\n      seoTitle\n      seoDescription\n      parentId\n      sortOrder\n      status\n      coverUrl\n      fullName\n      fullUri\n      createdAt\n      updatedAt\n      level\n      is_main_category\n    }\n    collections {\n      id\n      parentId\n      uri\n      title\n      status\n      createdAt\n      updatedAt\n    }\n    attributes {\n      id\n      key\n      name\n      description\n      templateKey\n      filterable\n      createdAt\n      updatedAt\n    }\n    tags {\n      id\n      key\n      name\n      filterable\n      status\n      createdAt\n      updatedAt\n    }\n    brand {\n      id\n      name\n      slug\n      description\n      logoUrl\n      coverUrl\n      email\n    }\n    relatedProducts {\n      name\n      relationType\n    }\n    variantGroups {\n      id\n      name\n      description\n      slug\n      priority\n      hasActiveVariants\n    }\n    createdAt\n    updatedAt\n  }\n}",
  "variables": {
    "sku": "string",
    "marketSlug": "string",
    "storeGroupSlug": "string",
    "relatedProducts": [
      "string"
    ],
    "locale": "string",
    "onlyActive": true,
    "hasActiveVariants": true,
    "channelSlug": "string"
  }
}'
Response
{
  "data": {
    "v1ProductBySku": {
      "id": "string",
      "sku": "string",
      "productType": "FLEXIBLE",
      "slug": "string",
      "translatedSlugs": [
        {
          "locale": "string",
          "value": "string"
        }
      ],
      "name": "string",
      "description": "string",
      "htmlDescription": "string",
      "shortDescription": "string",
      "htmlShortDescription": "string",
      "metaTitle": "string",
      "metaDescription": "string",
      "variantGroupName": "string",
      "variantGroupPriority": 0,
      "variantGroupSlug": "string",
      "variantGroupBaseProductID": "string",
      "customFields": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "thirdPartyLinks": [
        {
          "id": "string",
          "type": "string",
          "title": "string",
          "url": "string",
          "createdAt": "string",
          "updatedAt": null
        }
      ],
      "packageDimensions": {
        "capacityMilliliter": 0,
        "depth": 0,
        "diameter": 0,
        "height": 0,
        "length": 0,
        "weight": 0,
        "width": 0
      },
      "productDimensions": {
        "capacityMilliliter": 0,
        "depth": 0,
        "diameter": 0,
        "height": 0,
        "length": 0,
        "weight": 0,
        "width": 0
      },
      "hasActiveVariants": true,
      "status": "ACTIVE",
      "variants": [
        {
          "id": "string",
          "productId": "string",
          "sku": "string",
          "name": "string",
          "status": "ACTIVE",
          "shippingAttributes": [
            "string"
          ],
          "validateStock": true,
          "createdAt": "string",
          "updatedAt": null,
          "variantGroupId": "string"
        }
      ],
      "images": [
        {
          "id": "string",
          "url": "string",
          "title": "string",
          "altText": "string",
          "copyright": "string",
          "sort": 0,
          "status": "ACTIVE",
          "blurhash": "string",
          "createdWithAi": true,
          "createdAt": "string",
          "updatedAt": null
        }
      ],
      "videos": [
        {
          "id": "string",
          "url": "string",
          "title": "string",
          "description": "string",
          "sort": 0,
          "status": "ACTIVE",
          "createdWithAi": true,
          "createdAt": "string",
          "updatedAt": null
        }
      ],
      "files": [
        {
          "id": "string",
          "url": "string",
          "title": "string",
          "fileType": "string",
          "createdWithAi": true,
          "createdAt": "string",
          "updatedAt": null
        }
      ],
      "categories": [
        {
          "id": "string",
          "slug": "string",
          "name": "string",
          "description": "string",
          "seoTitle": "string",
          "seoDescription": "string",
          "parentId": "string",
          "sortOrder": 0,
          "status": "string",
          "coverUrl": "string",
          "fullName": [
            "string"
          ],
          "fullUri": "string",
          "createdAt": null,
          "updatedAt": null,
          "level": 0,
          "is_main_category": true
        }
      ],
      "collections": [
        {
          "id": "string",
          "parentId": "string",
          "uri": "string",
          "title": "string",
          "status": "string",
          "createdAt": null,
          "updatedAt": null
        }
      ],
      "attributes": [
        {
          "id": "string",
          "key": "string",
          "name": "string",
          "description": "string",
          "templateKey": "string",
          "filterable": true,
          "createdAt": null,
          "updatedAt": null
        }
      ],
      "tags": [
        {
          "id": "string",
          "key": "string",
          "name": "string",
          "filterable": true,
          "status": "string",
          "createdAt": null,
          "updatedAt": null
        }
      ],
      "brand": {
        "id": "string",
        "name": "string",
        "slug": "string",
        "description": "string",
        "logoUrl": "string",
        "coverUrl": "string",
        "email": "string"
      },
      "relatedProducts": [
        {
          "name": "string",
          "relationType": "string"
        }
      ],
      "variantGroups": [
        {
          "id": "string",
          "name": "string",
          "description": "string",
          "slug": "string",
          "priority": 0,
          "hasActiveVariants": true
        }
      ],
      "createdAt": "string",
      "updatedAt": null
    }
  }
}