Fetch a product by ID
Retrieve a single product using its productId.
Query
query GetProduct($productId: Int!) {
product(productId: $productId) {
productId
sku
names { language value }
descriptions { language value }
shortDescriptions { language value }
manufacturer
supplier
status
orderable
hidden
categoryId
containerClass
clusterId
}
}
Variables
{
"productId": 1895
}
Response
{
"data": {
"product": {
"productId": 1895,
"sku": "HP-450G10-I5",
"names": [
{ "language": "NL", "value": "HP ProBook 450 G10 i5" },
{ "language": "EN", "value": "HP ProBook 450 G10 i5" }
],
"descriptions": [
{ "language": "NL", "value": "<p>Zakelijke laptop met 15.6 inch scherm</p>" }
],
"shortDescriptions": [
{ "language": "NL", "value": "15.6\" i5 laptop" }
],
"manufacturer": "HP",
"supplier": "Ingram Micro",
"status": "A",
"orderable": "Y",
"hidden": "N",
"categoryId": 1795,
"containerClass": "PRODUCT",
"clusterId": null
}
}
}
How it works
Use productId for lookups. The deprecated id field still works but should be avoided. If the product does not exist, the API returns null. Products that belong to a cluster have a clusterId set and containerClass: "CLUSTER".