Get a commerce product
Use the externalItem GraphQL query get a single commerce product.
Example request
The first sample code block illustrates a request to retrieve a product based on its identity.
{
externalItem(
identity: {
namespace: "SAPCommerce",
id: "300046587",
type:"Product",
localeId: "de_DE"
}
) {
... on Product {
name
summary
description
price {
value
currency
}
}
}
}
Example response
The second code block illustrates the corresponding response with with the requested product details.
{
"data": {
"externalItem": {
"name": "Sonnenbrille Fox The Condition polished black grey",
"summary": "The Condition von Fox verbindet Ästätik und Komfort",
"description": "Features:\n <br /> leichter und widerstandsfähiger O-Matter Rahmen mit integriertem Gelenk und Metall Fox Head stoßfeste Plutonite Linsen\n <br />100% UV-Schutz \n <br />High Definition Optics Technology.\n <br /> HDO Technology. \n <br /> \n <br /> Flush Mounted Plutonite Linsen",
"price": {
"value": "97.37",
"currency": "EUR"
}
}
}
}