How can I request all products using the query allProducts?
  • 29 Jun 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

How can I request all products using the query allProducts?

  • Dark
    Light

Article Summary

Use the query allProducts to retrieve all products from a DistributionGate.

The productsearch returns a maximum of 10.000 products for a search.


Structure of the query

query q1 {
  allProducts(size: 100, distributionChannelId: 83, state: ACTIVE, lastModifiedAfter: "2021-03-01T12:08:55+02:00", scrollId: null) {
    scrollId
    content {
      id
    }
  }
}
  • size: Products per page.
  • distributionChannelId: The ID of your DistributionChannel, provided by ProMaterial.
  • state: Return products with a specific state (ACTIVE | DELETED).
  • lastModifiedAfter: Return products that where changed after a certain date and time. Time stamp is a ISO8601-formatted string.
  • scrollId: In the first request, omit the scrollId. In the response a scrollId of type string is returned. Use the scrollId of the response in the following request.

You are finished, when the content array is empty.


Was this article helpful?