Store Hugs Developers

Shop

The shop the Admin key belongs to: its name, storefront address, currency, languages, timezone, plan and whether it's headless.

Call it on the client itself: admin.shop(). It needs the shop:read scope. The key names the shop; there's no shop id to pass.

Get the shop

admin.shop(): Promise<AdminShop>

The shop's name, storefront address, currency, languages, timezone, plan and whether it's headless. Scope: shop:read.

Returns

An AdminShop:

FieldTypeDescription
idinteger
namestring
storefrontUrlstring (uri)
isLiveboolean
currencystring
defaultLanguagestring
languagesarray of string
timezonestring or null
pricesIncludeTaxboolean
planstringOne of freemium, basic, pro, business.
headlessbooleanWhether the hosted storefront redirects to the merchant's site.

Errors

StatusWhen
401invalid_api_key: no active Admin key in Authorization: Bearer.
403admin_key_in_browser (an Origin header was sent), ip_not_allowed, plan_required(the shop's plan lacks the Integration API, or the feature the endpoint needs), orinsufficient_scope.
429Rate limited.

Example

const shop = await admin.shop();
console.log(shop.name, shop.plan, shop.currency);