360 Secure SkillHub
360 安全技能中心

crossly-wholesale

通过 Crossly API 管理 B2B 批发店铺,涵盖贸易档案、批发目录与数量阶梯、买家审批与客户分组、净账期、批发订单、账期发票、付款登记、报价、运费和预购等操作。

分类:营销
crossly
热度 13.18
最近更新 2026-11-30 11:12:18

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add crossly/crossly-wholesale
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
crossly-wholesale
description
Run a seller's Crossly wholesale (B2B) store over the API. Set the trade profile (PUT /v1/wholesale/profile), create catalogs with visibility and trade terms, add listings with wholesalePriceCents, MOQ and case pack, set quantity breaks, approve access requests and invite trade buyers, manage customer groups and net terms (netDays, creditLimitCents), list wholesale orders and on-account invoices, record payments with mark-paid, credit notes, void and write-off, answer quote and freight requests, and run trade drops and pre-books. Use when building a B2B ordering, line-sheet, trade-pricing, invoicing or accounts-receivable integration on Crossly.

Run a Crossly wholesale store

Wholesale sells the seller's own Crossly listings to trade buyers (shops, resellers, businesses) at trade prices, from the same stock pool as retail. Everything lives under /v1/wholesale/*: a catalog decides what a buyer can see, the catalog's trade price and quantity breaks plus the buyer's customer group or account rate decide what they pay, and net terms decide whether they can pay later.

Scopes: wholesale:read for every GET, wholesale:write for everything else (including POST /v1/wholesale/profile/ships-from/validate). Auth: see crossly-api-setup; pagination, errors, rate limits and idempotency: crossly-api-conventions.

Money is integer cents (…Cents) and rates are basis points (…Bps, 100 = 1%) throughout. There are no dollar fields here, unlike listings and orders.

Store scope. A seller can own several stores; wholesale data is per store. Send X-Storefront-Id (SDK: createClient({ pat, storefrontId }) or a per-call storefrontId); omitted = the seller's default store. An id that isn't the token owner's store is rejected (see crossly-team-stores).

import { createClient } from '@crossly/sdk';
const crossly = createClient({ pat: process.env.CROSSLY_PAT! });

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

Setup and the trade profile

Endpoint SDK What
GET /v1/wholesale/overview wholesale.overview() Checklist, 30-day revenue, open orders, outstanding invoices, active buyers, pending requests
GET /v1/wholesale/setup-steps wholesale.setupSteps() profile, ships-from, payment, returns, catalog with items, visibility, live
GET / PUT /v1/wholesale/profile wholesale.getProfile() / updateProfile() The trade profile
POST /v1/wholesale/profile/ships-from/validate wholesale.validateShipsFrom() Check an origin without saving
GET /v1/wholesale/categories wholesale.categories() Directory category ids (up to 12, or "other:<words>")
GET /v1/wholesale/terms/preview wholesale.previewTerms({ catalogId, platformListingId }) Effective terms with their source

PUT /v1/wholesale/profile is a partial update: omitted fields are unchanged, null clears. Key fields:

Field Notes
companyName, tagline, contactEmail, logoUrl, bannerUrl, yearFounded, brandsCarried (≤ 50) Shown on catalogs, line sheets and invoices
shipsFrom { postalCode!, country!, city, region } Checked by the shipping validator: 400 invalid_ships_from with issues; 422 for an embargoed origin
leadTimeDays (0-365), minOrderCents, minFirstOrderCents, minReorderCents Opening, first and reorder minimums
minOrderQuantity, casePack, maxPerOrder, backorder (no/allow/preorder), priceVisibility (approved/everyone) Store-wide defaults for the terms cascade
returnPresetId, paymentPresetId, shippingPresetId Policy preset ids; an unknown id is 400 policy_preset_not_found
invoicingEnabled, invoiceSettings prefix (≤ 12), nextNumber, autoSend, reminderDays (≤ 8), lateFeeBps (0-2500), statementDay (1-28), defaultNetDays (0-120), ccEmails (≤ 5), earlyPayDiscountBps (0-1000), earlyPayDays
directoryListed, directoryCategories, directoryBlurb, requiresBusinessVerification Directory listing and the trade gate. Saving these writes through to every active catalog
buyerRequirements requireResaleCert, certStates (2-letter), requireTaxId, up to 10 custom questions
tradeRewardsBps (0-2000), acceptsFunding Trade rewards; accept Crossly Funding

paymentTermsOffered, returnPolicy and shipsFromRegion still parse but are deprecated (superseded by the preset ids and shipsFrom).

The terms cascade. Item terms override catalog terms, which override the profile, which overrides Crossly's defaults. null on an item or catalog means "inherit". Saving the profile never rewrites catalog values. GET /v1/wholesale/terms/preview returns each resolved term with its source (item, catalog, profile, default): read it rather than re-implementing the cascade.

Catalogs

const { data: catalog } = await crossly.wholesale.createCatalog({   // POST /v1/wholesale/catalogs
  name: 'Spring closeouts',
  visibility: 'private_discoverable',
  autoApprove: 'verified',
  minOrderCents: 50_000,          // $500 opening order
  listed: true,
  directoryCategories: ['other:closeout apparel'],
}, { idempotencyKey: crypto.randomUUID() }) as { data: { id: string } };
visibility Who can open it
public Everyone, prices included
public_prices_private Everyone; prices only for approved buyers
private_discoverable Listed in the directory, opened on approval
link Anyone with the URL
invite Named buyers only (private is accepted as invite)

listed (advertise in the wholesale directory) is separate from visibility (who may open). The directory never shows a price or a line item, only the catalog card. autoApprove: never, verified (business-verified accounts), all. Limits: name ≤ 120, slug ≤ 60 (a duplicate slug is a 400), description ≤ 2000, directoryBlurb ≤ 280.

PATCH /v1/wholesale/catalogs/{id} edits any of those plus active (false = nobody but the seller can open it). DELETE /v1/wholesale/catalogs/{id} removes the catalog with its items, grants and requests; orders and invoices stay.

Items, trade prices and quantity breaks

Catalog items are the seller's Crossly listings, keyed by platformListingId (the Crossly-platform listing row, a UUID). Listings that aren't the seller's own are rejected.

await crossly.wholesale.addCatalogItems(catalog.id, [            // POST /v1/wholesale/catalogs/{id}/items (≤ 500)
  { platformListingId: 'b3c1…', wholesalePriceCents: 1800, minOrderQuantity: 12, casePack: 6 },
], { idempotencyKey: crypto.randomUUID() });

await crossly.wholesale.updateCatalogItems(catalog.id, {        // PATCH /v1/wholesale/catalogs/{id}/items
  platformListingIds: ['b3c1…', 'f9a2…'],
  set: { pctOffRetailBps: 4000, leadTimeDays: 7 },               // trade price = retail less 40%
});
  • Adding an item already in the catalog updates its terms. source: 'vault' adds from vault stock instead of a listing.
  • One item: PATCH /v1/wholesale/catalogs/{id}/items/{platformListingId} (null = inherit). Remove: DELETE on the same path (the listing is untouched).
  • Bulk edit takes either items[] (≤ 500 rows, each its own values) or platformListingIds (≤ 2000) + set; set.pctOffRetailBps is 1-9500.
  • Order: PUT /v1/wholesale/catalogs/{id}/items/order with platformListingIds first to last; items left out keep their order after these.
  • Line sheet (company, terms, every item with retail and trade price, MOQ, case pack, breaks): GET /v1/wholesale/catalogs/{id}/line-sheet. Buyer link for sharing or a QR code: GET /v1/wholesale/catalogs/{id}/share (url is null until the seller has a shop username).

Quantity breaks belong to the listing, not the catalog, and apply to every buyer at checkout:

# Replace one listing's ladder (≤ 10 rungs; minQuantity ≥ 2; each cheaper than the last and the list price; [] removes)
curl -X PUT https://crossly.net/api/v1/wholesale/listings/$PLID/tiers \
  -H "Authorization: Bearer $CROSSLY_PAT" -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \
  -d '{"tiers":[{"minQuantity":12,"unitPriceCents":1600},{"minQuantity":48,"unitPriceCents":1400}]}'

POST /v1/wholesale/tiers/bulk (wholesale.bulkTiers(ids, breaks)) applies one ladder of { minQuantity, discountBps } (1-9000 bps off each listing's own price) to up to 500 listings, replacing their breaks, and returns which were updated and which were skipped and why.

How a price resolves: the cheapest applicable rung wins (list price, quantity break, or the catalog trade price from its MOQ, the last only for a buyer who can open that catalog), then the buyer's group or account rate applies on top. A buyer in several groups, or with both a group and account rate, gets the best rate, never a stacked one.

Buyers and access

Endpoint SDK
GET /v1/wholesale/requests (?status=all includes decided) listRequests()
POST /v1/wholesale/requests/{id}/decide decideRequest(id, { decision, declineReason, groupId, catalogIds })
GET /v1/wholesale/buyers listBuyers()
POST /v1/wholesale/buyers/invite { email, catalogIds (1-50) } inviteBuyer()
POST /v1/wholesale/catalogs/{id}/access/{grantId}/resend resendCatalogInvite(catalogId, grantId)
DELETE /v1/wholesale/catalogs/{id}/access/{grantId} revokeCatalogAccess(catalogId, grantId)
POST /v1/wholesale/buyers/remove { buyerUserId } or { email } removeBuyer()
  • A request carries the buyer's business-verification and tax-exempt status. approve grants the catalog (optionally catalogIds for more, and groupId to add them to a group in the same step); decline takes an optional declineReason (≤ 500). Deciding twice is 409 conflict.
  • An invite binds to the buyer's account now, or when they sign up with that email. resend works only for a pending invite, at most once per 15 minutes per invite (429 with Retry-After). grantId is catalogs[].grantId from GET /v1/wholesale/buyers.
  • DELETE …/access/{grantId} revokes one catalog; buyers/remove revokes every catalog grant. Both keep terms, groups and invoices.
  • Business verification and resale certificates on the roster are read-only: Crossly reviews them.

Customer groups: GET/POST /v1/wholesale/groups ({ name (≤ 80), discountPercentBps (0-9000) }), PATCH/DELETE /v1/wholesale/groups/{id} (active: false pauses), members via POST /v1/wholesale/groups/{id}/members ({ buyerUserId } or the email of an existing Crossly account; an unknown email is a 400, so invite them to a catalog first) and DELETE /v1/wholesale/groups/{id}/members/{buyerUserId}.

Net terms (pay on account):

await crossly.wholesale.setTerms(buyerUserId, {                  // PUT /v1/wholesale/buyers/{buyerUserId}/terms
  netDays: 30,                    // 0-120
  creditLimitCents: 500_000,      // most they may owe at once; null = no limit
  discountPercentBps: 500,        // their negotiated rate, 0-5000
}, { idempotencyKey: crypto.randomUUID() });

DELETE /v1/wholesale/buyers/{buyerUserId}/terms switches terms off; issued invoices are unaffected. At checkout a buyer with active terms can pay on account: no charge is taken, an invoice is issued due netDays out, and the order is created normally. Crossly is never the lender: an unpaid invoice is the seller's receivable, so grant terms only to buyers the seller trusts. An overdue invoice pauses that buyer's on-account ordering.

Reserve stock for wholesale: PUT /v1/wholesale/reserve/{inventoryItemId} { units } (0-100000; 0 clears) holds units back; retail channels advertise the rest and delist when only the reserve is left. Read it with GET /v1/wholesale/reserve/{inventoryItemId}.

Orders and invoices

GET /v1/wholesale/orders lists Crossly orders priced through trade terms or placed on account. They are ordinary orders: fulfil them with the order endpoints (see crossly-orders-sales and crossly-shipping-labels).

GET /v1/wholesale/invoices lists on-account invoices, newest first, with balance due. Query: status (open, partial, overdue, paid, void, written_off, or unpaid = open + partial + overdue), buyerUserId, limit (1-200, default 50). GET /v1/wholesale/invoices/{id} adds lines, PO reference, payments and whether Crossly's dues on it are collected.

// A check arrived for part of an invoice. amountCents omitted = the whole balance.
await crossly.wholesale.markInvoicePaid(invoiceId,              // POST /v1/wholesale/invoices/{id}/mark-paid
  { method: 'check', reference: 'CHK 10442', amountCents: 25_000 },
  { idempotencyKey: crypto.randomUUID() });
Action Endpoint Notes
Record payment POST /v1/wholesale/invoices/{id}/mark-paid method: ach, check, wire, card, other; reference ≤ 120. Part payments allowed
Resend POST /v1/wholesale/invoices/{id}/send Emails it with the pay link; an overdue one goes as an overdue notice
Credit note POST /v1/wholesale/invoices/{id}/credit-notes amountCents (at most the balance due), reason: short_shipment, damaged, pricing_error, returned, goodwill, other; numbered <invoice>-CN<n>. Not a refund
Void POST /v1/wholesale/invoices/{id}/void Only when nothing has been paid; stops counting against the credit limit
Write off POST /v1/wholesale/invoices/{id}/write-off Closes the remainder as written_off (bad debt)
Late fee POST /v1/wholesale/invoices/{id}/late-fee Adds invoiceSettings.lateFeeBps once by hand; the hourly sweep adds it on overdue anyway. 400 without a late fee set

Only on-account invoices take payments and adjustments (400 otherwise). A paid or voided invoice is 409 conflict.

Who pays Crossly's dues. Crossly's fee on the items plus the sales tax it remits as marketplace facilitator. If the buyer pays through Crossly's hosted payment page, they come out of the charge. If the seller records a direct payment (mark-paid), they are charged to the seller's billing card once the invoice is settled. If that charge fails, the seller takes no new on-account orders until the dues are settled.

Quotes, freight and trade drops

  • Quote requests (RFQ): GET /v1/wholesale/quotes (status: requested, answered, accepted, declined, withdrawn, expired, open, all), GET /v1/wholesale/quotes/{id}. Answer or revise with POST /v1/wholesale/quotes/{id}/answer { items: [{ itemId, unitPriceCents }], expiresAt (ISO, ≤ 90 days out), note }; items left out are not quoted, and an itemId not on the quote is 400 quote_item_unknown. Decline with POST /v1/wholesale/quotes/{id}/decline { reason }.
  • Freight (LTL): GET /v1/wholesale/freight-requests lists requests from orders over the pallet threshold; answer with POST /v1/wholesale/freight-requests/{id}/answer { quotedCents, note }.
  • Trade drops and pre-books: POST /v1/wholesale/drops creates a draft (name, dropAt, audience trade or catalog + audienceCatalogId, kind release or prebook, listingIds / platformListingIds, perCustomerLimit, endsAt). A pre-book also needs depositBps (100-9900) and shipBy (YYYY-MM-DD), and takes balanceNetDays (0-90). PATCH /v1/wholesale/drops/{id} edits, schedules (status: 'scheduled' with a future dropAt) or cancels; a live drop can only be cancelled or have endsAt / perCustomerLimit changed. POST /v1/wholesale/drops/{id}/release turns every reserved pre-book balance into an on-account invoice and ends the drop; it is safe to retry (only uninvoiced balances are invoiced). It returns 400 trade_drop_not_prebook for a release drop and trade_drop_not_open before it goes live. SDK: tradeDrops(), tradeDrop(), createTradeDrop(), updateTradeDrop(), releaseTradeDrop().

MCP and CLI

The Crossly MCP server exposes these as tools such as get_wholesale_overview, update_wholesale_profile, create_wholesale_catalog, add_wholesale_catalog_items, decide_wholesale_access_request, invite_wholesale_buyer, set_wholesale_buyer_terms, list_wholesale_invoices, mark_wholesale_invoice_paid, issue_wholesale_credit_note, answer_wholesale_quote (see crossly-mcp-server).

Rules

  • Cents and basis points everywhere here. discountPercentBps: 500 is 5%, not 500%.
  • Read effective terms from GET /v1/wholesale/terms/preview; don't recompute the cascade or the price ladder client-side.
  • Set X-Storefront-Id (or the SDK's storefrontId) when the seller has more than one store, or you will edit the default store.
  • Never expose trade prices outside an approved buyer's view; the directory deliberately never shows them.
  • Send an Idempotency-Key on mark-paid, credit notes, write-offs, late fees and drop releases. A retried payment record without one can double-count.
  • Grant net terms with a creditLimitCents unless the seller explicitly wants none: Crossly does not stand behind the debt.

Docs: https://crossly.net/docs/wholesale · https://crossly.net/docs/customers · https://crossly.net/docs/crossly-shop