For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
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.
Solved! Go to the solution
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...
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
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
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
Did you find a solution? I have the same problem
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...
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