1
votes

How can I detect if the user's store is no longer password protected in Shopify?

I've looked at the API reference however there's no 'site' entity, and 'shop' has nothing that definitely gives an 'IsUnlocked'.

Update - I've found that to unlock the store, the user must choose a plan, so I'm sure it will be possible to perform a check on the plan name. The question then is how to perform this check (via a rest API) call reliably, in such a way that if Shopify change their plan names, I can still reliably infer whether the store is unlocked or at least fail gracefully! Does the Shopify API guarantee backward compatability? Am I guaranteed that doing a check that for the absence of a plan name (or for the presence of a  default plan name) will indefinitely be a reliable check for whether the store is unlocked, or is there some more direct way of detecting that the shop is no longer password protected?

(plan_name is under the 'Shop' entity):

plan_name
{ "plan_name" : "enterprise" }

(from https://help.shopify.com/api/reference/shop)

1
Could you elaborate on what you mean by unlocked?Josh Brown
Thanks, I've clarified the post. By unlocked I mean 'no longer password protected'Chris Halcrow

1 Answers

2
votes

The Shop API has a password_enabled property. You can check that to see if the shop has enabled a storefront password.