Stores and teams
One Crossly account (a business) can own several stores (storefronts). Listings, settings, policies, payouts, wallets, webhooks and OAuth apps each belong to one store. Teammates (VAs, partners) sign in with their own login and work inside the owner's account, limited per store to the permissions the owner grants. For auth basics see crossly-api-setup; for pagination, errors and idempotency see crossly-api-conventions.
Setup
- Create a free Crossly account: https://crossly.net/register
- Create a personal access token at https://crossly.net/settings/api/tokens/new (guide: https://crossly.net/guides/personal-access-tokens). Use a
crossly_pat_test_token against the sandbox while building. - Export it as
CROSSLY_PATand send it asAuthorization: Bearer $CROSSLY_PATtohttps://crossly.net/api/v1/*. Full docs: https://crossly.net/docs
Scopes
| Endpoints | Scope |
|---|---|
GET /v1/storefronts, GET /v1/storefronts/{id}, .../requirements, .../settings, GET /v1/storefronts/slug-available, GET /v1/storefronts/team-access |
storefronts:read |
POST /v1/storefronts, PATCH/DELETE /v1/storefronts/{id}, PUT .../slug, .../status, .../currency, .../default, POST .../publish, PUT .../settings, POST /v1/storefronts/{id}/listings/{platformListingId}/move, PUT/DELETE /v1/storefronts/team-access |
storefronts:write |
GET /v1/team/members, /v1/team/members/{id}, /v1/team/members/{id}/stores/{store}, /v1/team/invites, /v1/team/stores |
team:read (or accounts:read) |
POST /v1/team/invites, POST /v1/team/members/{id}/stores, PUT/DELETE /v1/team/members/{id}/stores/{store} |
team:manage (or accounts:write) |
Legacy account-wide team: GET /v1/team (accounts:read); POST /v1/team/invite, /v1/team/accept, /v1/team/revoke, /v1/team/leave, PATCH /v1/team/{memberId} |
accounts:write |
team:read and team:manage are never grantable to a third-party OAuth app: staffing a store is the seller's decision. Use your own PAT.
Stores
import { createClient } from '@crossly/sdk';
const crossly = createClient({ pat: process.env.CROSSLY_PAT! });
const { data: stores } = await crossly.storefronts.list(); // default first; { includeArchived: true } adds archived
const { data: store } = await crossly.storefronts.create({ name: 'Vintage Denim', slug: 'vintage-denim', currency: 'USD' });
await crossly.storefronts.setDefault(store.id);
const need = await crossly.storefronts.requirements(store.id); // what blocks publishing listings into it
await crossly.storefronts.publish(store.id); // 422 storefront_requirements_missing until ready
| Field / call | Rules |
|---|---|
name |
1–60 chars (trimmed). Rename with PATCH /v1/storefronts/{id} { name }: never changes the slug or the @handle |
slug |
3–40 lowercase letters, numbers, hyphens; derived from the name if omitted; reserved words refused. Check with GET /v1/storefronts/slug-available?slug=. PUT .../slug keeps the old slug redirecting |
currency |
ISO 4217, 3 letters (stored upper-case). Default: the account currency, else the detected country's. PUT .../currency |
status |
draft | live | paused | archived (PUT .../status). A live store is public once it has a live listing |
PUT .../default |
where a Crossly publish with no storefrontId lands. The first store you create is the default |
DELETE /v1/storefronts/{id} |
archives it; if it was the default, your oldest remaining store becomes the default |
POST .../publish |
needs ship-from, shipping policy, return policy and payouts (storefront_requirements_missing with the missing list) |
POST /v1/storefronts/{id}/listings/{platformListingId}/move |
moves a Crossly listing (by its platform-listing id) into this store |
SDK: crossly.storefronts.list, create, get, rename, archive, changeSlug, setStatus, setCurrency, setDefault, publish, requirements, getSettings, updateSettings, moveListing, slugAvailable. The older singular /v1/storefront routes keep working on the default store.
curl -X POST https://crossly.net/api/v1/storefronts \
-H "Authorization: Bearer $CROSSLY_PAT" -H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"name":"Vintage Denim"}'
Acting on a specific store: X-Storefront-Id
Store-scoped calls (discount codes, wholesale, ads, rentals, policies, payouts, Funding, the Vault, World, wallets, store webhooks, connections, OAuth apps, the team lists, …) act on one store: the one in the X-Storefront-Id header, else the account's default store.
curl https://crossly.net/api/v1/team/members \
-H "Authorization: Bearer $CROSSLY_PAT" -H "X-Storefront-Id: $STORE_ID"
// every call from this client acts on that store; an id that is not one of the token's stores is a 404
const denim = createClient({ pat: process.env.CROSSLY_PAT!, storefrontId: STORE_ID });
const { data: denimTeam } = await denim.team.listMembers();
A wrong id is refused, never silently replaced by another store:
| Status | error.code |
Meaning |
|---|---|---|
| 400 | storefront_id_invalid |
the header is not a store id |
| 404 | storefront_not_found |
no such store, or it is not one of this account's stores |
| 403 | storefront_access_denied |
a teammate with no access to that store |
| 409 | storefront_required |
the route needs a store and the account has none yet |
Store-setting routes (policies, store webhooks, connections, detected events, ship-from, billing, store wallets) also check the teammate's grant for that store: 403 insufficient_storefront_scope (naming the scope) or 403 store_owner_only for owner-only actions (cancel, downgrade, billing portal). The store owner always passes.
Teammates and per-store permissions
A token a teammate mints while working in the owner's account acts as that teammate, with their permissions, and dies when their membership ends. The owner's own token passes every store check.
Presets are starting points; a grant is a list of permission ids:
| Preset | Gets |
|---|---|
viewer |
the *.view permissions, no money figures |
lister |
listings view/create/edit/price/bulk, inventory view/edit, crosspost publish/relist/share, connections view |
shipper |
orders.view, orders.ship, orders.labels, inventory.view, listings.view, messages.view |
customer_service |
messages, offers, orders.view, orders.returns, orders.refund (cap it), customers view/edit, listings.view |
manager |
everything except connections manage, developer keys/webhooks/apps, integrations, team invite/manage, vault trade, billing |
admin |
everything in the store except billing, which is granted on its own |
Permission ids (area.action): listings.view|create|edit|price|delist|delete|bulk, inventory.view|edit, orders.view|ship|labels|cancel|refund|returns, offers.view|accept|counter, pricing.rules, messages.view|send, customers.view|edit, sales.record, crosspost.publish|relist|share, connections.view|manage, shipping.settings, policies.edit, listing_defaults.edit, automations.view|edit|detected_events, analytics.view|money|books|experiments, activity.view, finance.view, ads.view|manage, wholesale.manage, rentals.manage, drops.manage, discounts.manage, loyalty.manage, live.manage, storefront.view|edit|site, profile.showcase, worlds.manage, showrooms.manage, vault.view|trade, developer.keys|webhooks|apps, integrations.manage, team.view|invite|manage, billing.view|manage.
Limits per store grant (all optional):
| Field | Type |
|---|---|
refundCapCents |
integer cents, 0–100,000,000 |
discountCapPct |
integer 0–100 |
adSpendCapCents |
integer cents |
marketplaces |
up to 60 platform ids (ebay, poshmark, …) the member may act on |
Invite to stores
POST /v1/team/invites: inviteeEmail (≤ 255) and stores (1–100 entries of { store, permissions, limits? }; store is a store id or all = every store, now and future, owner only). Nothing is emailed: the response's data.acceptUrl is shown once; send it yourself. Invitations expire after 7 days. Inviting needs the Business or Scale plan. A teammate can never grant above their own level.
const { data: invite } = await crossly.team.inviteToStores(
{
inviteeEmail: 'va@example.com',
stores: [
{ store: STORE_ID, permissions: ['orders.view', 'orders.ship', 'orders.labels'] },
{ store: OTHER_STORE_ID, permissions: ['messages.view', 'messages.send', 'orders.refund'], limits: { refundCapCents: 5000 } },
],
},
{ idempotencyKey: crypto.randomUUID() },
);
// invite.acceptUrl: hand it to the person; it is not returned again
The invitee accepts with POST /v1/team/accept { token } (SDK crossly.team.accept(token)).
Manage a member's stores
| Call | SDK |
|---|---|
GET /v1/team/members?store=&role=&permission=&status=active|no_stores&lastActive=&sort=name|added|last_active&q=&page=&pageSize= |
crossly.team.listMembers(query) |
GET /v1/team/invites?status=pending|accepted|expired|revoked|all |
crossly.team.listInvites(query) |
GET /v1/team/stores (canInvite, canManage per store) |
crossly.team.stores() |
GET /v1/team/members/{id} |
crossly.team.getMember(id) |
GET /v1/team/members/{id}/stores/{store} (store = id or all) |
crossly.team.getStoreAccess(id, store) |
POST /v1/team/members/{id}/stores { store, permissions, limits? } (409 if already there) |
crossly.team.addToStore(id, body) |
PUT /v1/team/members/{id}/stores/{store} { permissions, limits? } |
crossly.team.setStoreAccess(id, store, body) |
DELETE /v1/team/members/{id}/stores/{store} (other stores stay) |
crossly.team.removeFromStore(id, store) |
POST /v1/team/revoke { memberId } or { invitationId } (whole membership / pending invite) |
crossly.team.revoke(body) |
permissions needs at least one id (to remove someone from a store, DELETE instead); an unknown id is a 400. Lists are store-narrowed when you pass store=<id> or send X-Storefront-Id; store=any is the whole business. There is also a lower-level grant API on /v1/storefronts/team-access (PUT { memberUserId, storefrontId | null, scopes, limits? }, DELETE { memberUserId, storefrontId | null }; SDK crossly.storefronts.grantTeamAccess, revokeTeamAccess, listTeamAccess).
Until the owner sets any store access for a teammate, they reach every store with their account-wide scopes; once store grants exist, they reach only the granted stores.
What a teammate's request can be refused with
| Status | error.code |
details |
Fix |
|---|---|---|---|
| 403 | insufficient_store_permission |
required (permission id), storefrontId |
owner adds that permission in that store |
| 403 | store_permission_cap |
permission, cap (refund, discount, adSpend), limit |
lower the amount or raise the cap; send the amount so it can be checked |
| 403 | store_marketplace_not_allowed |
allowed, requested |
add the marketplace to the grant |
| 403 | insufficient_storefront_scope / store_owner_only |
see above | |
| 403 | owner_only |
connecting an OAuth app: only the owner can (see crossly-oauth-apps) |
Don't retry these; surface the message, which names the missing permission.
Rules
- Send
X-Storefront-Id(or setstorefrontIdon the client) whenever the account may have more than one store; never assume the default is the right one. - Treat
storefront_not_foundas a bug in your store id, not a reason to fall back. - Grant teammates presets or the narrowest permission ids, per store, with caps on refunds, discounts and ad spend.
acceptUrlis one-time: deliver it immediately and don't log it.- Use your own PAT for
team:*; no OAuth app can hold it.
Docs: https://crossly.net/docs/teams-and-vas · https://crossly.net/docs/storefront · https://crossly.net/docs/api-scopes · https://crossly.net/docs/api-authentication
