Search commerce products

Use the externalItems GraphQL query search for and retrieve product data based on matching search text.

Example request

The first sample code block illustrates a request to retrieve the first two products that include the specified text string.

{
  externalItems(
     namespace: "SAPCommerce"
     filter: {
      searchText: "snowboard",
      type:"Product"
    }, first: 2
  )  {
    edges {
      node {
        ... on Product {
          identity {
            id
          }
          title
          description
        }
      }
    }
  }
}





Example response

The second code block illustrates the corresponding response with two matching products along with the requested product details.

{
  "data": {
    "externalItems": {
      "edges": [
        {
          "node": {
            "identity": {
              "id": "300013358"
            },
            "title": "Snowboard Ski Tool Red FBI 6",
            "description": "Features: \n <br /> + Able to Operate With Gloves On \n <br /> + Integrated Bits Won't Get Lost \n <brdesign <br=\"\">\n   + Smooth No-Snag Composite CoveAllen Key \n  <br /> + 10MM Wrench/Bottle Opener \n  <br />\n </brdesign>"
          }
        },
        {
          "node": {
            "identity": {
              "id": "300060389"
            },
            "title": "Snowboard Binding F2-FTWO Mondo LT black L",
            "description": "Features:\n <br />+Fiber-reinforced unibase plate\n <br />+ toolless adjustment of ankle strap\n <br />+ Torsion-flexible highback\n <br />+ EVA heel pad"
          }
        }        
      ]
    }
  }
}