Skip to main content
Print

4.1 List shops — GET /v1/account/api/shops

Requires account Bearer.

curl -sS "$API_BASE/v1/account/api/shops" \

  -H "Authorization: Bearer $ACCOUNT_TOKEN"

Each item includes id, handle, host, name, site_language, timezone, currency, timestamps.

4.2 Check name / handle availability — POST /v1/account/api/shops/check-availability

Requires account Bearer. Same as the accounts UI before create.

{
  "name": "My Store",
  "handle": "my-store"
}

Either name or handle (or both) may be sent. Handle must match ^[a-z0-9]+(?:[-_][a-z0-9]+)*$
(3–100 chars).

curl -sS -X POST "$API_BASE/v1/account/api/shops/check-availability" \
  -H "Authorization: Bearer $ACCOUNT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"handle":"my-store"}'

Create a store — POST /v1/account/api/shops

Requires account Bearer. Creates a store for the authenticated account (same as accounts web Create store). Do not send store_owner_email — that field is for LMS only.

Body (typical)

{
  "name": "My Store",
  "handle": "my-store",
  "currency": "INR",
  "timezone": "Asia/Kolkata",
  "language": "en-US",
  "phone_number": "+910000000000",
  "city": "Mumbai",
  "street": "Optional street"
}
Field Required Notes
name Yes Display name (5–100 chars)
currency Yes ISO currency code (e.g. INR, USD, EUR)
handle Recommended URL handle (5–100 chars); must be available
timezone Optional IANA timezone
language Optional Defaults to en-US
phone_number Optional E.164 (e.g. +919876543210)
city / street Optional Address fields
curl -sS -X POST "$API_BASE/v1/account/api/shops" \
  -H "Authorization: Bearer $ACCOUNT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"My Store","handle":"my-store","currency":"INR"}'

Success returns a shop object (id, handle, host, name, …). Use that id with access-token to obtain a shop Bearer.

Subject to the account’s store limit; handle conflicts return 400.

4.4 Select shop (access token) — POST /v1/account/api/shops/{id}/access-token

Requires account Bearer. Combines the web “generate access” + admin “verify” steps into one call.


    curl -sS -X POST "$API_BASE/v1/account/api/shops/42/access-token" \
  -H "Authorization: Bearer $ACCOUNT_TOKEN"
Success (200)
{
  "access_token": "",
  "refresh_token": "",
  "expires_in": 21600,
  "token_type": "bearer",
  "host": "your-store.example.com",
  "theme_name": "velvet",
  "theme_id": "...",
  "theme_shop_id": "..."
}

Use access_token as the shop Bearer for all subsequent store operations.

4.5 Refresh shop token — POST /v1/account/api/shops/auth/refresh

{
  "refresh_token": ""
}

Returns a new shop token payload (same shape as access-token).

Scroll to Top