Command Palette

Search for a command to run...

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

Crossly Buyer API

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

Build a shopper's app on the Crossly Buyer API (/v1/buyer/*) with a buyer OAuth token (buyer:* scopes, no PAT) and @crossly/buyer-sdk createBuyerClient…

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

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

Build on the Crossly Buyer API

The Buyer API acts on a person's own shopping: their cart, what they bought, their offers and lists. It lives on the same host as the seller API but authenticates a different principal: a seller PAT is refused by every /v1/buyer/* endpoint, and a buyer token never works on seller endpoints. For the store side see crossly-api-setup; for agents, monitors and offers see crossly-buyer-shopping-agent.

Setup

  1. Create a free Crossly account: https://crossly.net/register
  2. Buyer calls need an OAuth access token with buyer:* scopes from Crossly sign-in (https://crossly.net/atlas/oauth2/authorize, PKCE). Guide: https://crossly.net/shop/docs/authentication
  3. Send it as Authorization: Bearer <token> to https://crossly.net/api/v1/buyer/*. Full docs: https://crossly.net/docs

Auth: OAuth only, buyer scopes only

There is no buyer personal access token. Every buyer token comes from a person clicking Allow on Crossly's consent screen, including for your own account.

  • Authorization server: issuer https://crossly.net/atlas, authorization code + PKCE S256 (required for every client, confidential ones too). Authorize at https://crossly.net/atlas/oauth2/authorize with resource=https://crossly.net/api/v1, exchange and refresh at POST https://crossly.net/atlas/oauth2/token, revoke at https://crossly.net/atlas/oauth2/revoke. The full flow is in crossly-api-setup.
  • Ask only for buyer:* scopes. A session the shopper proved with a shopping sign-in (for example an emailed link) can grant buyer:* scopes and nothing else.
  • The access token is a JWT that lives 8 hours. Refresh tokens rotate: store the new one every time and never refresh from two processes. A 401 invalid_token after a failed refresh means the shopper disconnected your app (they can at /shop/settings/connected-apps): send them back through consent.
  • Register the app under Settings → API & developers → Your OAuth apps.

Base URL https://crossly.net/api (sandbox https://sandbox.crossly.net/api); every path is under /v1/buyer/*. Send Authorization: Bearer <token>. Keep tokens server-side or in the OS keychain.

Scopes you will use here

Scope Covers
buyer:catalog:read catalog search, browse, listing, availability, shipping, landed cost, sold history, FX
buyer:profile:read GET /v1/buyer/profile, GET /v1/buyer/badges
buyer:cart:read GET /v1/buyer/cart, GET /v1/buyer/cart/saved
buyer:cart:write add/remove lines, save for later, and POST /v1/buyer/cart/quote (the route checks cart:write, though SDK comments say cart:read)
buyer:orders:read orders, export, eligibility, price protection, cases, feedback lists
buyer:orders:write cancel, confirm received, item-not-received, cases
buyer:feedback:write leave and revise feedback
buyer:payment-methods:read / :write list saved cards / choose the default (never adds a card)
buyer:checkout:write spends money: unattended checkout, tips, bids, packs. See below

Ask for the narrowest set. A 403 insufficient_scope names required and have: that needs re-consent with the wider set, not a new login.

The SDK

import { createBuyerClient, CrosslyBuyerAPIError } from '@crossly/buyer-sdk';

const crossly = createBuyerClient({ token: process.env.CROSSLY_BUYER_TOKEN! }); // Atlas access token (JWT)

createBuyerClient({ token, baseUrl?, fetch?, timeoutMs?, userAgent? }) throws CrosslyBuyerConfigError at construction for a missing token or a crossly_pat_…. Version 0.2.0 accepts a JWT or a legacy crossly_oat_… string, but the API no longer honours crossly_oat_ tokens: use the Atlas JWT.

Wrapped methods used on this page: profile.get(), orders.list({ page, limit }), cart.get(), cart.addItem(body, { idempotencyKey }), cart.removeItem(id), cart.quote({ shippingServiceBySeller?, idempotencyKey? }), paymentMethods.list(), paymentMethods.setDefault(id). Everything else (catalog, checkout, order actions, feedback) goes through the escape hatch:

const res = await crossly.http.request<{ data: unknown[]; meta?: { nextCursor?: string } }>({
  method: 'GET', path: '/v1/buyer/catalog/search', query: { q: 'levis 501', limit: 100 },
});

http.request({ method, path, query?, body?, idempotencyKey?, timeoutMs?, signal? }) adds auth and throws CrosslyBuyerAPIError (status, code, details, body, isMissingScope). BUYER_SCOPES and SCOPE_BY_METHOD are exported; @crossly/buyer-sdk/operations exports the generated OPERATIONS table. The SDK never retries. Python: the generated crossly_buyer client lives in https://github.com/crossly-dev/crossly-python (pip install "git+https://github.com/crossly-dev/crossly-python#subdirectory=buyer"; it is not on PyPI yet), or use plain HTTP.

Catalog (buyer:catalog:read)

Endpoint Notes
GET /v1/buyer/catalog/search q, `br
Полный SKILL.md на ClawHub

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

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

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

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

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

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

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

FAQ

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

Build a shopper's app on the Crossly Buyer API (/v1/buyer/*) with a buyer OAuth token (buyer:* scopes, no PAT) and @crossly/buyer-sdk createBuyerClient. Covers catalog search, a listing, availability and shipping (buyer:catalog:read), the cart and its delivered quote (cart.addItem, cart.quote, taxComplete, meta.checkoutUrl), unattended POST /v1/buyer/checkout behind buyer:checkout:write and the per-key spending controls (GET/PUT /v1/buyer/checkout/controls), orders (list, eligibility, cancel, received, item-not-received case), feedback, integer-cents money, errors, rate limits, required idempotency and monitor webhook signatures. Use when writing code that acts on a person's own Crossly shopping, or when a Buyer API call returns 401, 402, 403 or 429.

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

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

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

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

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

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