Skip to main content

Products

Manage products and their variants within your shops.

Get Products

query {
getProducts(shopId: "shop_123", limit: 10) {
id
title
description
shopId
images {
url
name
}
variants {
id
sku
price
properties {
name
value
}
}
}
}

Get a Single Product

query {
getProduct(id: "prod_123") {
id
title
description
shopId
images {
url
name
placement
}
variants {
id
sku
price
properties {
name
value
}
}
createdAt {
_seconds
_nanoseconds
}
}
}

Create a Product

mutation {
createProduct(
input: {
title: "Custom Hoodie"
description: "A cozy custom hoodie"
shopId: "shop_123"
images: [{ url: "https://example.com/hoodie.jpg", name: "Front View" }]
variants: [
{
sku: "HOODIE-BLK-M"
price: 49.99
properties: [
{ name: "Color", value: "Black" }
{ name: "Size", value: "M" }
]
}
]
}
) {
id
title
variants {
id
sku
price
}
}
}

Update a Product

mutation {
updateProduct(
id: "prod_123"
input: {
title: "Updated Hoodie Name"
description: "An updated description"
}
) {
id
title
description
}
}

Delete a Product

mutation {
deleteProduct(id: "prod_123")
}

Returns true if the product was deleted successfully.