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:
| Field | Type | Description |
|---|---|---|
id | integer | |
name | string | |
storefrontUrl | string (uri) | |
isLive | boolean | |
currency | string | |
defaultLanguage | string | |
languages | array of string | |
timezone | string or null | |
pricesIncludeTax | boolean | |
plan | string | One of freemium, basic, pro, business. |
headless | boolean | Whether the hosted storefront redirects to the merchant's site. |
Errors
| Status | When |
|---|---|
401 | invalid_api_key: no active Admin key in Authorization: Bearer. |
403 | admin_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. |
429 | Rate limited. |
Example
const shop = await admin.shop();
console.log(shop.name, shop.plan, shop.currency);