Help center

Seller API

Connect an inventory tool or your own system to Legacy Four Cards: list cards, sealed product and lots, keep price and stock in step, end listings, and read orders. For sellers on the Dealer and Shop plans, and the tools they use.

Start here

  • A seller makes a key at Account > API keys (read only, or read and write). The key starts with l4c_sk_ and is shown once.
  • Send it on every request: Authorization: Bearer l4c_sk_...
  • Base address: https://legacyfourcards.com/api/v1. JSON in and out. Money is in cents (price_cents: 1250 is $12.50).
  • The full spec for code generators: /api/v1/openapi.json (OpenAPI 3.1).
curl https://legacyfourcards.com/api/v1/me \
  -H "Authorization: Bearer $L4C_KEY"

List a card

Listings follow the same rules as the sell form: the same required fields, the same photo set (front, back and a close-up for a raw card; slab front and back for a graded card; all 6 sides and the seal for sealed product), and the same review. Photos are https links we download and keep. external_id is your own SKU or id, unique per seller, so you can find and update the listing by it.

curl -X POST https://legacyfourcards.com/api/v1/listings \
  -H "Authorization: Bearer $L4C_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: sku-47110022-create" \
  -d '{
    "external_id": "47110022",
    "category": "sports", "sport": "basketball",
    "title": "1986 Fleer Michael Jordan #57",
    "graded": true, "grader": "PSA", "grade": "8", "cert_number": "47110022",
    "price_cents": 125000, "quantity": 1, "package_type": "small_box",
    "photos": [
      { "url": "https://cdn.example.com/jordan-front.jpg", "kind": "slab_front" },
      { "url": "https://cdn.example.com/jordan-back.jpg", "kind": "slab_back" }
    ]
  }'
  • status: "active": live now (vetted sellers and Silver tier and up).
  • status: "pending_review": our listing check runs right after, and within the hour at the latest.
  • status: "draft" with review.issues: something needs a fix (a photo that wouldn't download, seller setup not finished). Fix it with PATCH, then POST /listings/{id}/submit.
  • A field that's wrong comes back as 422 with error.details naming each field, in the same words the sell form uses.
  • Sealed product (kind: "sealed") and lots (kind: "lot") need affirmed: true: factory sealed and not a repack, or the lot count is guaranteed. No repacks or mystery boxes.

Keep price and stock in step

Send up to 500 items at once, by your external_id or our listing_id. quantity is your sellable count; null leaves a value as it is. At 0 a live listing pauses; restocked, it comes back on its own. Each item gets its own result.

curl -X POST https://legacyfourcards.com/api/v1/stock \
  -H "Authorization: Bearer $L4C_KEY" -H "Content-Type: application/json" \
  -d '{ "items": [
    { "external_id": "47110022", "quantity": 0 },
    { "external_id": "SV-ETB-01", "quantity": 6, "price_cents": 5499 },
    { "external_id": "LOT-2023-TOPPS", "price_cents": 2000, "quantity": null }
  ] }'
  • A unit a buyer is paying for right now is held for them, so Cards shows your count less any checkout in progress.
  • Read new orders (or handle order.paid) before you push stock, so a card that just sold here isn't counted again.
  • Lowering a live listing's price tells the people following it, as on the site.
  • Once a listing is submitted, only price_cents, quantity and external_id change through the API. To change its details, end it (DELETE /listings/{id}) and list it again.
  • Listings synced from the seller's Shopify store stay managed by Shopify: you can read them, and a change returns 409 managed_by_shopify. This keeps a tool that also reads Shopify from looping.

Orders

Paid orders only (a checkout in progress isn't an order yet). Ask for what changed since your last check.

curl "https://legacyfourcards.com/api/v1/orders?since=2026-11-11T00:00:00Z&limit=100" \
  -H "Authorization: Bearer $L4C_KEY"
  • Each order lists its items (with your external_id), the seller's payout, the ship-by time and tracking.
  • Labels are bought on the order page at legacyfourcards.com, so tracking always comes from the carrier. The API doesn't take tracking numbers.
  • No buyer names or addresses: the address prints on the label.

Webhooks

Set one https address per seller. We sign every event and retry failures (1, 2, 4 ... minutes, 8 tries). Events: order.paid, order.updated, order.cancelled, listing.quantity_changed, listing.status_changed, listing.ended.

curl -X PUT https://legacyfourcards.com/api/v1/webhook \
  -H "Authorization: Bearer $L4C_KEY" -H "Content-Type: application/json" \
  -d '{ "url": "https://yourtool.example.com/hooks/legacy-four-cards" }'
# The answer includes "secret" once. Keep it.

curl -X POST https://legacyfourcards.com/api/v1/webhook/test -H "Authorization: Bearer $L4C_KEY"

Check each delivery: X-L4C-Signature: t=<unix seconds>,v1=<hex>, where hex is the HMAC-SHA256 of <t>.<raw body> with your secret. Turn away anything older than 5 minutes. X-L4C-Delivery is the event id; skip one you already handled. A change your own key made doesn't come back to you as a stock event.

// Node.js
import { createHmac, timingSafeEqual } from "node:crypto";
function verify(rawBody, header, secret) {
  const [, t, v1] = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header ?? "") ?? [];
  if (!t || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const want = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return timingSafeEqual(Buffer.from(want), Buffer.from(v1));
}

Limits and errors

  • 120 requests a minute per key. Past that: 429 with Retry-After.
  • Pages: limit (up to 500, default 100) and offset; updated_since on listings, since on orders.
  • Retry a POST safely with Idempotency-Key: the same key and body gets the first answer back for 24 hours.
  • Every error looks like { "error": { "code": "validation_failed", "message": "...", "details": { "price_cents": "Enter a price." } } }.
  • A key only ever sees and changes its own seller's listings and orders. Anything else is a 404.

Building a channel for many shops?

If you run a multichannel tool (like TCG Sync or SortSwift) and want Legacy Four Cards as a channel for your shops, we'll set you up with a test seller account. Contact us.