Out now! Check out the Poll results: Do you have a Shopify store?
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: POS UI extension

Solved

POS UI extension

mluqman
Shopify Partner
6 0 0

I am using POS UI extension, i wanna get current store name and selected store location in my extension but not finding any API for that inside POS UI extension.

Shopify Expert
Accepted Solutions (2)
aaronmdeane
Shopify Partner
2 1 1

This is an accepted solution.

Have you looked at using the session API? There's a property on the current session that is locationId
https://shopify.dev/docs/api/pos-extensions/ui-extensions-reference/api/session#:~:text=logged%20int...

 

View solution in original post

mariodev
Shopify Partner
2 1 0

This is an accepted solution.

Yes, for now I'm using the locationId associated with the location name in my backend, but it would be nice to retrieve the location name directly from the extension

View solution in original post

Replies 5 (5)

Liam
Community Manager
3108 344 888

Hi Brainxtech123,

 

You may need to use Shopify's Admin API to retrieve store information. The Shopify Admin API allows you to access a variety of data, including shop and location information. You can use the Shop object to get details about the shop, including its name. The Location object provides information about the retailer's various locations.

 

Hope this helps!

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog

mluqman
Shopify Partner
6 0 0

In POS , we need to select location first to start working, i want to get that location selected on start of POS. I have this doc link where it does not have any API for that.
https://shopify.dev/docs/api/pos-extensions/ui-extensions-reference

Shopify Expert
mariodev
Shopify Partner
2 1 0

Did you find a solution? I have the same problem 

aaronmdeane
Shopify Partner
2 1 1

This is an accepted solution.

Have you looked at using the session API? There's a property on the current session that is locationId
https://shopify.dev/docs/api/pos-extensions/ui-extensions-reference/api/session#:~:text=logged%20int...

 

mariodev
Shopify Partner
2 1 0

This is an accepted solution.

Yes, for now I'm using the locationId associated with the location name in my backend, but it would be nice to retrieve the location name directly from the extension