Hey folks,
I’m working on an app that needs to identify which locations have POS Pro vs regular POS.
Currently, I’m using the following approach:
- Fetch all locations via the locations query
query getLocations() {
locations(first: 250) {
edges {
node {
id
name
legacyResourceId
}
}
}
}
- For each location, query cashTrackingSessions
query IsPosProLocation($locationId: String!) {
cashTrackingSessions(first: 1, query: $locationId) {
edges {
node {
id
}
}
}
}
- If results exist → POS Pro, if empty → regular POS
This works fine for stores with a few locations, but for merchants with more locations, this creates a lot of API calls (1 + N queries) and I’m concerned about hitting GraphQL rate limits.
Questions:
- Does the locations query have any hidden fields that indicate POS Pro subscription status?
- Is there a more efficient way to bulk-check POS Pro status across multiple locations?
Any insights would be much appreciated — thanks!
1 Like
Hey @shaheem, thanks for sharing this.
Currently, there isn’t a more efficient way to identify POS Pro locations using the public GraphQL Admin API. The locations
query doesn’t have any fields that directly indicate POS Pro subscription status.
There is also a limitation to be aware of when using cash tracking sessions. While the documentation states that cashTrackingSessions
returns sessions “for locations with a POS Pro subscription,” it only returns locations that have active cash tracking sessions, not all POS Pro locations. This means POS Pro locations that aren’t actively using cash tracking features won’t appear in the results.
I tested this myself against a store with multiple POS Pro locations and found that cashTrackingSessions
only returned one location, even though multiple locations had POS Pro subscriptions.
I would like to put through a feature request for our team for adding this to our API’s. Can you share a little more context on the app your building and what knowing the current POS pro subscription will unlock for you?
Thanks for clarifying that — that limitation with cashTrackingSessions
is good to know.
In my case, I’m building a discounts app that lets merchants set up discounts for selected POS locations. Since automatic discounts are only available on POS Pro locations, I want to be able to flag this in the app and prevent merchants from trying to configure automatic discounts for locations that aren’t on POS Pro.
Got it. Will you be using the new discount context fields that have recently been added when creating the discounts?
Currently the admin API has a selector like this, so something similar may work in your own app ui until an endpoint becomes available.
Got it, thanks for the clarification. Just to explain my use case a bit better: in my app I list all POS locations and let merchants choose which retail locations to publish discounts to (using the new retailLocation field in Functions). I wanted to mark non–POS Pro locations as unsupported in that list, but since there isn’t an accurate way to detect that via the Admin API, I’ll just show a generic warning that automatic discounts only apply to POS Pro locations for now.
Really appreciate your help here, and yeah, it would’ve been cool if the locations query had a field to indicate whether a location is Pro or not.
1 Like