What's your biggest current challenge? Have your say in Community Polls along the right column.
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.

Re: Access unit_price and unit_price_measurement via REST API

Solved

Access unit_price and unit_price_measurement via REST API

tipserstore
Shopify Partner
5 0 7

Price Per Unit is an exclusive feature implemented for France and Germany.
https://help.shopify.com/en/manual/intro-to-shopify/initial-setup/sell-in-germany/price-per-unit

https://help.shopify.com/en/manual/intro-to-shopify/initial-setup/sell-in-france/price-per-unit

I went through guideless ^ and was able to define the unit price via the user interface. Now, I want to download these data via REST API. Is it accessible there? Precisely,  is a price per unit (unit_price and unit_price_measurement) exposed via REST API or GraphQL? I can't see it as a variant property.

Accepted Solution (1)

Josh
Shopify Staff
1134 84 235

This is an accepted solution.

Hey @tipserstore , 

 

At the moment this field is not accessible via the API. However, it is also very new, so that's not to say that it never will be available - but there isn't any timeline at the moment or concrete plans to do so. 

Josh | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

View solution in original post

Replies 54 (54)
johannes4
Visitor
1 0 3

Hi,

glad you are already looking into this. I need this feature urgently as well, so sending a plus one on the feature request.

Without API access to the unit price feature my customer can not use Shopify for their online store (as said before, it's a legal requirement to show the unit price in Germany and setting it manually for thousands of products is not an option).

All the best, kind regards!
Johannes

RienNeVaPlus
Shopify Partner
7 1 0

We have the same issue. Is there a way to upvote the urgency of this feature?

Solving it with metafields seems like a nasty workaround 😞

Matt171
Visitor
1 0 1

Hi,

I'm right now into creating a new shop with 300 products where unit price is manadatory. I helped myself with metafields but right now I am really frustrated with shopify at all. I know it's my fault I did not consider such a basic feature upfront. But there are so many details where something is missing. And then I read such things it's too hard to implement. I'm almost thinking about leaving this platform before opening the shop.

HunkyBill
Shopify Partner
4853 60 568

Why not spell it out than? If you have a workable solution to this, just say it in a few sentences. This is a community after all, not a walled garden. It is expected that people share here, not hoard.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
AR-Dev
Shopify Partner
14 4 5

The basic approach to the solution is to add custom code to the product page template to use fields that can be set via the API (weight & price), to calculate the base unit price.

If you found this post helpful, please Like and Accept Solution. Thank you!
Send me a private message if you want to hire me for theme customization/development, troubleshooting, etc.