Skip to main content

publicProductDetail

Public: no authentication required.

Returns one active product of a seller for the public storefront. Needs no sign-in. An unknown subdomain is refused with an "Organization not found" error.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query PublicProductDetail($productId: ID!, $subdomain: String!) {
publicProductDetail(productId: $productId, subdomain: $subdomain) {
id
name
brandName
createdAt
brandId
canAddToCart
variants {
id
QRCode
name
attributes
availableQuantity
barcode
}
}
}

Variables:

{
"productId": "id",
"subdomain": "string"
}

Response:

{
"data": {
"publicProductDetail": {
"id": "id",
"name": "string",
"brandName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"brandId": "string",
"canAddToCart": true,
"variants": [
{
"id": "id",
"QRCode": "string",
"name": "string",
"attributes": "string",
"availableQuantity": 0,
"barcode": "string"
}
]
}
}
}
publicProductDetail(
productId: ID!
subdomain: String!
): CustomerProductDetail!

Arguments​

publicProductDetail.productId ● ID! non-null scalar​

The ID of the product.

publicProductDetail.subdomain ● String! non-null scalar​

The seller's storefront subdomain.

Type​

CustomerProductDetail object​

A product as a buyer sees it on its page.