Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Input Variable for Mutation of Variant.unitPriceMeasurement missing in the GraphQL-API

Input Variable for Mutation of Variant.unitPriceMeasurement missing in the GraphQL-API

mleimbach
Shopify Partner
7 0 5

I have already posted this a little while back in the partner Slack but could not get an answer to my problem and therefore still see no solution.

variant.unitPriceMeasurement seems to be missing as an allowed input to be accepted as ProductVariantInput! on mutations that update the variant using the graphQL AdminAPI.
This feature is required for PIM and ERP systems to populate pricing information, mandatory to show nearby the price, for several countries.
 
Currently it is only possible to set or edit those values from the Admin-Dashboard that is using the internal api to perform the mutation:

a call to:
/admin/internal/web/graphql/core?operation=UpdateProduct&type=mutation
can include product.variant.0.unitPriceMeasurement and works fine but can not be used (programatically) outside of the admin dashboard.
(partner or staff authorization required)

but a call to
/admin/api/2022-04/graphql.json
produces the following error:
“message”: “Variable $input of type ProductInput! was provided invalid value for variants.0.unitPriceMeasurement (Field is not defined on ProductVariantInput)“

Am i missing something?
How can i populate those fields from an external source?

Matthias Leimbach
Lead Development

beeclever
Koblenz, Germany
Replies 0 (0)