360 Secure SkillHub
360 安全技能中心

crossly-crosspost

该 Skill 指导调用 Crossly API 先创建库存商品,再异步向多个电商平台发布刊登,读取 jobs、skipped 和 warnings,并通过 webhook 或轮询 platformListings 跟踪结果;也支持改价、单平台价格调整、批量操作和按平台下架。

分类:营销
crossly
热度 9.14
最近更新 2026-11-30 11:08:34

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add crossly/crossly-crosspost
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
crossly-crosspost
description
Crosspost a listing to several marketplaces (Poshmark, eBay, Mercari, Depop, Etsy, Grailed, Vinted, Whatnot, Shopify and more) through the Crossly API. Create the inventory item, POST /v1/listings with platforms + data, read jobs, skipped and warnings, then watch the listing.published / listing.publish_failed webhooks or poll platformListings until each platform is live, then update (PATCH) or delist (DELETE). Use when code or an agent needs to publish, reprice, edit or delist Crossly listings.

Crosspost a listing with Crossly

Crossposting is asynchronous. POST /v1/listings saves the listing at once and queues one job per platform; Crossly's servers then publish through each marketplace's API, or through the seller's connected session for marketplaces without one. You learn the outcome from webhooks or by reading the listing's platformListings, not from the create response.

Scopes: inventory:read/inventory:write for the item, listings:write to crosspost, edit and delist, listings:read to poll. Setup and auth: crossly-api-setup. Errors, idempotency, rate limits: crossly-api-conventions.

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

1. Check what the seller has connected

You can only crosspost to platforms the seller connected: GET /v1/accounts (session platforms) and GET /v1/connections (OAuth platforms). SDK: crossly.accounts.list() and crossly.accounts.listConnections(). Connecting, health and per-platform limits are in the crossly-marketplace-connections skill.

platforms takes any id the API knows: ebay, etsy, shopify, woocommerce, stockx, tiktok_shop, instagram_shop, google_shopping, reverb, bonanza, bigcommerce, wix, discogs, tcgplayer, manapool, cardmarket, bricklink, onbuy, allegro, trademe, kaufland, brickowl, square, godaddy, squarespace, amazon, walmart, poshmark, mercari, facebook, depop, grailed, vinted, whatnot, vestiaire, offerup, curtsy, poizon, alias, crossly (the seller's own Crossly store), ebid, cardnexus, lightspeed_r, lightspeed_x, sellstream, linkyhub. The Platform type in @crossly/sdk 0.3.0 lists only 14 of these (the nine resale apps plus ebay, etsy, shopify, amazon, walmart); listings.create takes plain strings, so the rest work too.

2. Create the inventory item first

Link the listing to an inventory item. Without one nothing decrements when it sells, the sale cascade can't delist the other copies, and the item has no cost basis.

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

const item = await crossly.inventory.create({            // POST /v1/inventory
  defaultTitle: "Vintage Levi's 501s, dark wash",
  brand: "Levi's",
  size: '32x32',
  condition: 'good',
  images: ['https://cdn.example.com/jeans-1.jpg'],
}, { idempotencyKey: crypto.randomUUID() }) as { id: string };

Alternatively send createInventoryItem: true with no inventoryItemId and the item is created from data (it counts toward the plan's monthly new items).

3. Crosspost

const res = await crossly.listings.create({               // POST /v1/listings
  inventoryItemId: item.id,
  platforms: ['poshmark', 'mercari', 'depop', 'ebay'],    // 1-15 platform ids
  data: {
    title: "Vintage Levi's 501 Selvedge, 32x32",
    description: '1990s Big E redline, hemmed to 32.',
    price: 84,                                            // dollars
    tags: ['denim', 'vintage'],
    weightLb: 2,                                          // see "Package weight"
  },
  overrides: { ebay: { categoryId: '11483' } },           // per-marketplace keys: crossly-listing-overrides
  clientReferenceId: 'SKU-LEV-501-3232',                  // optional, up to 100 chars: a repeat returns existing: true
}, { idempotencyKey: crypto.randomUUID() }) as {
  listing: { id: string };
  jobs: { platform: string; jobId: string }[];
  skipped: { platform: string; reason: string; code?: string | null; details?: unknown }[];
  bulkJobId: string | null;
  warnings?: { code: string; message: string; field?: string | null; aspect?: string | null }[];
};

The response (201, or 200 with existing: true for a clientReferenceId already used) is { listing, jobs, skipped, bulkJobId, clientReferenceId?, existing?, warnings? }:

  • listing: the saved listing row (a draft until a platform goes live).
  • jobs: one dispatched job per accepted platform.
  • skipped: platforms refused before a job was queued, with the reason. Examples: code: "validation_error" "Add a weight before listing" (with details.code: "weight_required"), dropship_not_allowed_on_platform, or a fashion-only marketplace refusing the category. The listing itself was still created, even when every platform is skipped. Fix the cause and crosspost again.
  • warnings: soft problems that never block the write: aspect_required_missing, aspect_unknown, ebay_field_mapped, ebay_field_ignored, description_truncated. Treat unknown codes as informational. Invalid item specifics are not a warning: they refuse the create with 422 item_specifics_invalid (see crossly-listing-overrides).

Refusals that write nothing: 402 plan_limit_reached (monthly crosspost cap, with Retry-After), 422 category_not_found, 422 policy_preset_not_found, 422 item_specifics_invalid.

Same call over HTTP:

curl -X POST https://crossly.net/api/v1/listings \
  -H "Authorization: Bearer $CROSSLY_PAT" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"inventoryItemId":"<uuid>","platforms":["poshmark","mercari"],"data":{"title":"Levi 501","price":84}}'

4. Wait for each platform

There is no job-status endpoint (jobId and bulkJobId cannot be looked up). Two ways to learn the outcome:

  • Webhooks (best): subscribe to listing.published (platform listing id and URL) and listing.publish_failed (platform and a plain reason). See crossly-webhooks.
  • Polling: GET /v1/listings/{id} and read platformListings[]. A row appears when a platform publishes, with platform, accountSlot, status, platformListingId, platformListingUrl. status is active, sold, delisted, failed, inactive, draft or archived; failed with errorMessage means the marketplace accepted the call but the listing is not live. A publish that errors outright leaves no row, so a platform still missing after your timeout has failed or is still queued: check listing.publish_failed or the dashboard.
async function waitForRows(listingId: string, platforms: string[], timeoutMs = 120_000) {
  const start = Date.now();
  while (Date.now() - start < timeoutMs) {
    const listing = await crossly.listings.get(listingId) as {
      platformListings: { platform: string; status: string; errorMessage?: string | null }[];
    };
    const seen = new Set(listing.platformListings.map((p) => p.platform));
    if (platforms.every((p) => seen.has(p))) return listing;
    await new Promise((r) => setTimeout(r, 5000));
  }
  return crossly.listings.get(listingId);                 // report whatever is still missing as not live
}

Poll gently (every few seconds, with a timeout): reads count against the 1,200/min quota. The listing's own status stays draft until at least one platform succeeds. Report per platform: a failure does not undo the platforms that went live.

5. Edit, reprice, delist

  • Update: PATCH /v1/listings/{id} with { "changes": { "price": 78 }, "platforms": ["poshmark"] } (data is an alias of changes; sending both is a 400). Omit platforms to update the master and everywhere it is live. SDK: crossly.listings.update(id, { changes, platforms }). Returns { jobs, warnings? }; per-marketplace keys go in top-level overrides.
  • One site's price: PATCH /v1/listings/{id}/platform-listings/{plId} with { price } sets one marketplace copy's price in its own currency (crossly.listings.setSitePrice).
  • Delist: DELETE /v1/listings/{id}, optionally ?platforms=poshmark,depop or ?platformListingIds=. SDK: crossly.listings.delist(id, { platforms }). Returns { jobs }. You never need to delist after a sale: the sale cascade delists the other platforms itself.
  • Many listings: POST /v1/listings/bulk (up to 50 creates, one result per item, each with its own clientReferenceId), POST /v1/listings/bulk-crosspost, /bulk-update, /bulk-delist, /bulk-relist (they run in the background and return a bulkJobId). See crossly-bulk-operations. On a Free plan (15 writes a minute) batch instead of looping.
  • Sync: GET /v1/listings?updatedSince=<ISO 8601> returns rows changed since then, oldest change first; ?sku= finds a listing by SKU.

Package weight

A weight (weightLb / weightOz in data, or on the inventory item) is required only when a label will be priced from the package: whatnot and vinted always (unless a Whatnot shippingProfileId or Vinted packageSizeId override is set), crossly and ebay on a calculated shipping policy, mercari and depop for their prepaid label (unless a Mercari shippingClass or Depop parcelSize is set, or the seller ships on their own). Every other platform never needs one. Missing it puts that platform in skipped with details.code: "weight_required".

Rules

  • Always send an Idempotency-Key on create, update and delist; add a clientReferenceId on creates so a retry returns the same listing.
  • Go through /v1/listings; never call a marketplace directly for something Crossly listed, or the sale cascade breaks.
  • Prices in data are dollars. Listing rows return price as a decimal string ("84.00").
  • Image caps are per platform (eBay 24, Shopify 250, eBid 15, OnBuy 12, TikTok Shop 9; full table in crossly-marketplace-connections); extra images are dropped from the end.
  • Read skipped and warnings on every write: a 201 does not mean every platform was queued.

Docs: https://crossly.net/docs/api-listings · https://crossly.net/docs/crossposting