What can I do with the pricesearch?
  • 29 Jun 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

What can I do with the pricesearch?

  • Dark
    Light

Article summary

Use the pricesearch to get prices for products with set quantity for the current user, their project and the delivery type.

query q1 {
  pricesearch(
       calculation: {
       deliveryType: "<deliveryType>", 
       project: "<project>"}, 
       products: [{productId: "<id>", 
       quantity: <quantity>}]
       ) 
    {
    prices {
      productId
      quantity
      amount
      currency
    }
  }
}

deliveryType

The deliveryTypes depend on the distributor; they can be requested in the connectedDistributionGates query.

project

"project" identifies the construction site of the customer. Currently, only the default project can be requested via the connectedDistributionGates query.

productId

This is the "id" returned by the productsearch. It starts with the DistributionGate code followed by a colon and an alphanumerical code.


Was this article helpful?