How can I update the `UnitPriceMeasurement` object, using the GraphQL API?

How can I update the UnitPriceMeasurement object, using the GraphQL API?

The UnitPriceMeasurement is is part of the ProductVariant object, and can be queried without problem (see below).


However, we have found no mutation that allows for updating the `UnitPriceMeasurement`.

So, the big question is:
How can we update the UnitPriceMeasurement object, using the GraphQL API?



querying the UnitPriceMeasurement on the ProductVariant

query ($id: ID!) {
  product(id: $id) {
    id
    variants(first: 10) {
      nodes {
        id
        unitPriceMeasurement {
          measuredType
          quantityValue
          quantityUnit
          referenceValue
          referenceUnit
        }
      }
    }
  }
}
{
  "id": "gid://shopify/Product/8941097484501"
}
1 Like

Hey @Jacco,

The unit price fields can currently only be set in the Admin. Steps for that here: https://help.shopify.com/en/manual/products/details/product-pricing/unit-pricing#add-unit-prices-to-your-product

This limitation is something our team is aware of and considering for future API releases.