Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Crossly API conventions

БесплатноБез исполняемых скриптовНе проверен

The rules every Crossly /v1 call follows. The { data, pagination } list envelope with page/limit (totalPages, short-page stop) and cursor lists (nextCursor…

crosslyот crossly70 установок в других каталогах

Об этом скилле

Crossly API conventions

These apply to every seller endpoint under /v1 and, with the differences noted in the crossly-buyer-api skill, to the buyer endpoints under /v1/buyer/*. Credentials and base URLs are in crossly-api-setup.

Setup

  1. Create a free Crossly account: https://crossly.net/register
  2. 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.
  3. Export it as CROSSLY_PAT and send it as Authorization: Bearer $CROSSLY_PAT to https://crossly.net/api/v1/*. Full docs: https://crossly.net/docs

Lists

Collections answer { data: [...], pagination?: {...}, meta?: {...} }. data is always the array, never renamed to the noun. pagination is omitted (not null) when an endpoint returns everything; meta carries endpoint-specific extras (pendingCents, basis, note…). Facets, reports and single resources are not wrapped this way: read the endpoint's response schema in the spec.

Two paging styles. The OpenAPI entry says which one an endpoint takes: an endpoint accepts cursor exactly when its parameters list it.

Style Request Response pagination Stop when
Page number (most lists) ?page=1&limit=25 (page ≥ 1, limit 1-100, default 25) { page, limit, total?, totalPages? } data.length < limit
Cursor (newer lists) ?limit=50, then ?cursor=<nextCursor> { limit, nextCursor, hasMore } nextCursor is null

total/totalPages are optional: lighter lists skip the COUNT. Never loop on page < totalPages alone. A malformed cursor is a 400, never a silent restart. Cursors are stable under inserts; page numbers are not, so on a busy account sync with updatedSince (offered by GET /v1/listings, GET /v1/inventory, GET /v1/orders) rather than walking pages.

async function* pages<T>(fetchPage: (page: number) => Promise<{ data: T[] }>, limit = 100) {
  for (let page = 1; ; page++) {
    const { data } = await fetchPage(page);
    yield* data;
    if (data.length < limit) return;
  }
}
for await (const l of pages((page) => crossly.listings.list({ page, limit: 100 }) as Promise<{ data: unknown[] }>)) { /* … */ }

Errors

Every non-2xx is the same envelope:

{ "error": { "code": "validation_error", "message": "Invalid input", "details": [{ "path": ["platforms"], "message": "Array must contain at least 1 element(s)" }] },
  "correlationId": "…" }

Branch on error.code (stable, snake_case), show message (safe for end users), log correlationId and quote it to Crossly support. details varies by code. Tolerate unknown codes and unknown response fields.

Code HTTP What to do
missing_authorization, invalid_token, unauthenticated, unauthorized 401 Fix the credential. Don't retry
credential_environment_mismatch 401 A test token on production or a live token on the sandbox
insufficient_scope 403 error.required and error.have sit beside code (not under details). Get a token with that scope
forbidden 403 The token is fine, the action isn't allowed (role, store permission, plan)
not_found 404 Missing, or another account's resource (Crossly never answers 403 for cross-account ids)
validation_error 400 details carries the zod path + message. Fix the body
no_changes 400 A PATCH with no recognised field
idempotency_key_required 400 A money-spending endpoint refuses a request without Idempotency-Key
conflict, storefront_required, shop_selling_limit_reached 409 State conflict: re-read, then decide
hard_cap_reached 409 A fixed ceiling (e.g. accounts per platform). Upgrading won't help
gone 410 The resource or route was retired
idempotency_key_reused 422 Same key, different body. Use a fresh key for a different intent
storefront_requirements_missing 422 The store isn't set up enough for this action
plan_limit_reached 402 A plan limit refused a new use. For monthly quotas details = { limitKey, limit, used, plan, resetsAt, upgradeTier, upgradeUrl } and Retry-After is the seconds to resetsAt. Nothing was written
overage_consent_required 402 Would incur overage. Confirm with the seller, then resend with acceptOverage: true
billing_failed 402 A Stripe charge declined; the action didn't complete
plan_required, creator_limit_reached 402 Creator features need a higher plan (details.upgradeUrl)
rate_limited 429 Wait Retry-After seconds
retry_storm 429 The same request got the same non-retryable error more than 20 times in 10 minutes on one route. Fix the original error; any success on the route ends it
external_service_error 502 A marketplace or provider failed. Retry later with the same idempote
Полный SKILL.md на ClawHub

Установить Crossly API conventions в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Crossly API conventions?

The rules every Crossly /v1 call follows. The { data, pagination } list envelope with page/limit (totalPages, short-page stop) and cursor lists (nextCursor, hasMore), the error envelope (error.code, error.message, error.details, correlationId) and its stable codes (validation_error, insufficient_scope, not_found, plan_limit_reached, idempotency_key_reused, idempotency_key_required, retry_storm…), Idempotency-Key replay for 24 h (Idempotent-Replayed header), per-plan write quotas with X-Quota-* headers and Retry-After, Deprecation/Sunset headers, money units and versioning. Use when writing a Crossly API client, a retry or pagination loop, error handling, or debugging a 400/402/409/422/429 from Crossly.

Как установить скилл Crossly API conventions?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Crossly API conventions запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Crossly API conventions с