v1ProductBySlug
Query product by slug
v1ProductBySlugquery
Arguments
slugString!requiredProduct slug in the requested locale. Required
marketSlugString!requiredMarket slug used to resolve prices and market-specific product data. Required
storeGroupSlugString!requiredStore 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!requiredLocale for translated fields (e.g. en, sv). Required
onlyActiveBoolean!requiredWhen true, only products with active status are matched
hasActiveVariantsBooleanWhen true, only products with an active variants are matched
channelSlugStringWhen set, the product must belong to this sales channel or the query returns not found
Returns
Query Reference
query V1ProductBySlug($slug: String!, $marketSlug: String!, $storeGroupSlug: String!, $relatedProducts: [String!], $locale: String!, $onlyActive: Boolean!, $hasActiveVariants: Boolean, $channelSlug: String) { v1ProductBySlug(slug: $slug, marketSlug: $marketSlug, storeGroupSlug: $storeGroupSlug, relatedProducts: $relatedProducts, locale: $locale, onlyActive: $onlyActive, hasActiveVariants: $hasActiveVariants, channelSlug: $channelSlug) { id sku productType slug translatedSlugs { locale value } name description htmlDescription shortDescription htmlShortDescription metaTitle metaDescription variantGroupName variantGroupPriority variantGroupSlug variantGroupBaseProductID customFields { key value } thirdPartyLinks { id type title url createdAt updatedAt } packageDimensions { capacityMilliliter depth diameter height length weight width } productDimensions { capacityMilliliter depth diameter height length weight width } hasActiveVariants status variants { id productId sku name status shippingAttributes validateStock createdAt updatedAt variantGroupId } images { id url title altText copyright sort status blurhash createdWithAi createdAt updatedAt } videos { id url title description sort status createdWithAi createdAt updatedAt } files { id url title fileType createdWithAi createdAt updatedAt } categories { id slug name description seoTitle seoDescription parentId sortOrder status coverUrl fullName fullUri createdAt updatedAt level is_main_category } collections { id parentId uri title status createdAt updatedAt } attributes { id key name description templateKey filterable createdAt updatedAt } tags { id key name filterable status createdAt updatedAt } brand { id name slug description logoUrl coverUrl email } relatedProducts { name relationType } variantGroups { id name description slug priority hasActiveVariants } createdAt updatedAt }}{
"slug": "string",
"marketSlug": "string",
"storeGroupSlug": "string",
"relatedProducts": [
"string"
],
"locale": "string",
"onlyActive": true,
"hasActiveVariants": true,
"channelSlug": "string"
}type Product {
id: String!
sku: String!
productType: ProductType!
slug: String!
translatedSlugs: [TranslatedSlug!]!
name: String!
description: String!
htmlDescription: String!
shortDescription: String!
htmlShortDescription: String!
metaTitle: String!
metaDescription: String!
variantGroupName: String
variantGroupPriority: Int
variantGroupSlug: String
variantGroupBaseProductID: String
customFields: [CustomField!]!
thirdPartyLinks: [ThirdPartyLink!]!
packageDimensions: VariantDimensions
productDimensions: VariantDimensions
hasActiveVariants: Boolean!
status: ProductStatus!
variants: [Variant!]!
images: [Image!]!
videos: [Video!]!
files: [ProductFile!]!
categories: [ProductCategory!]!
collections: [Collection!]!
attributes: [Attribute!]!
tags: [Tag!]!
brand: Brand
relatedProducts: [ProductRelation!]!
variantGroups: [VariantGroup!]!
createdAt: DateTime!
updatedAt: DateTime
}
enum ProductType {
FLEXIBLE
SIMPLE
}
type TranslatedSlug {
locale: String!
value: String!
}
type CustomField {
key: String!
value: String!
}
type ThirdPartyLink {
id: String!
type: String!
title: String
url: String!
createdAt: DateTime!
updatedAt: DateTime
}
type VariantDimensions {
capacityMilliliter: Int
depth: Int
diameter: Int
height: Int
length: Int
weight: Int
width: Int
}
enum ProductStatus {
ACTIVE
INACTIVE
ARCHIVED
DRAFT
INCOMPLETE
}
type Variant {
id: String!
productId: String!
sku: String!
name: String!
status: VariantStatus!
variantDimensions: VariantDimensions
customFields: [CustomField!]!
shippingAttributes: [String!]!
variantAttributes: [Attribute!]!
validateStock: Boolean!
prices: [VariantPrice!]!
stock: [VariantStock!]!
images: [Image!]!
tags: [Tag!]!
createdAt: DateTime!
updatedAt: DateTime
variantGroupId: String
}
type Image {
id: String!
url: String!
title: String
altText: String
copyright: String
sort: Int
status: ImageStatus!
blurhash: String
createdWithAi: Boolean!
createdAt: DateTime!
updatedAt: DateTime
attributes: [Attribute!]!
}
type Video {
id: String!
url: String!
title: String!
description: String
sort: Int
status: VideoStatus!
createdWithAi: Boolean!
createdAt: DateTime!
updatedAt: DateTime
attributes: [Attribute!]!
}
type ProductFile {
id: String!
url: String!
title: String!
fileType: String!
createdWithAi: Boolean!
createdAt: DateTime!
updatedAt: DateTime
attributes: [Attribute!]!
}
type ProductCategory {
id: String!
slug: String!
name: String!
description: String!
seoTitle: String!
seoDescription: String!
parentId: String
sortOrder: Int
status: String
coverUrl: String
fullName: [String!]
fullUri: String
translatedUri: [TranslatedUri!]!
createdAt: DateTime
updatedAt: DateTime
attributes: [Attribute!]!
level: Int!
is_main_category: Boolean!
}
type Collection {
id: String!
parentId: String
uri: String!
title: String!
translatedUri: [TranslatedUri!]!
status: String!
createdAt: DateTime
updatedAt: DateTime
}
type Attribute {
id: String!
key: String!
name: String!
description: String
values: [AttributeValue!]
templateKey: String!
filterable: Boolean!
createdAt: DateTime
updatedAt: DateTime
}
type Tag {
id: String!
key: String!
name: String
filterable: Boolean
status: String
createdAt: DateTime
updatedAt: DateTime
attributes: [Attribute!]!
}
type Brand {
id: String!
name: String!
slug: String!
description: String
logoUrl: String
coverUrl: String
address: BrandAddress
email: String
series: Series
}
type ProductRelation {
name: String!
relationType: String!
products: [RelatedProduct!]!
}
type VariantGroup {
id: String!
name: String!
description: String!
slug: String!
priority: Int!
hasActiveVariants: Boolean!
thirdPartyLinks: [ThirdPartyLink!]!
variants: [Variant!]!
images: [Image!]!
videos: [Video!]!
attributes: [Attribute!]!
tags: [Tag!]!
}
scalar DateTimeTry it
Server
Bodyapplication/json
Request
curl -X POST 'https://graphql.enad.io/{app_id}/graphql' \
-H 'Content-Type: application/json' \
-d '{
"query": "query V1ProductBySlug($slug: String!, $marketSlug: String!, $storeGroupSlug: String!, $relatedProducts: [String!], $locale: String!, $onlyActive: Boolean!, $hasActiveVariants: Boolean, $channelSlug: String) {\n v1ProductBySlug(slug: $slug, 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": {
"slug": "string",
"marketSlug": "string",
"storeGroupSlug": "string",
"relatedProducts": [
"string"
],
"locale": "string",
"onlyActive": true,
"hasActiveVariants": true,
"channelSlug": "string"
}
}'const response = await fetch("https://graphql.enad.io/{app_id}/graphql", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: "{\n \"query\": \"query V1ProductBySlug($slug: String!, $marketSlug: String!, $storeGroupSlug: String!, $relatedProducts: [String!], $locale: String!, $onlyActive: Boolean!, $hasActiveVariants: Boolean, $channelSlug: String) {\\n v1ProductBySlug(slug: $slug, 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}\",\n \"variables\": {\n \"slug\": \"string\",\n \"marketSlug\": \"string\",\n \"storeGroupSlug\": \"string\",\n \"relatedProducts\": [\n \"string\"\n ],\n \"locale\": \"string\",\n \"onlyActive\": true,\n \"hasActiveVariants\": true,\n \"channelSlug\": \"string\"\n }\n}"
});import requests
response = requests.post(
"https://graphql.enad.io/{app_id}/graphql",
headers={
"Content-Type": "application/json"
},
data="{\n \"query\": \"query V1ProductBySlug($slug: String!, $marketSlug: String!, $storeGroupSlug: String!, $relatedProducts: [String!], $locale: String!, $onlyActive: Boolean!, $hasActiveVariants: Boolean, $channelSlug: String) {\\n v1ProductBySlug(slug: $slug, 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}\",\n \"variables\": {\n \"slug\": \"string\",\n \"marketSlug\": \"string\",\n \"storeGroupSlug\": \"string\",\n \"relatedProducts\": [\n \"string\"\n ],\n \"locale\": \"string\",\n \"onlyActive\": true,\n \"hasActiveVariants\": true,\n \"channelSlug\": \"string\"\n }\n}",
)Response
{
"data": {
"v1ProductBySlug": {
"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
}
}
}