Developers · Pro

API keys

Connect your own scripts and tools to your TCG Speed Shipper account: read your labels, balance, tracking, inventory and orders, and buy labels from your balance.

Your keys

Checking…

Sign in on tcgspeedshipper.com in this browser to see your keys.

Getting started

Every request goes to https://tcgspeedshipper.com/api with your key in the Authorization header. Answers are JSON.

curl https://tcgspeedshipper.com/api/v1/me \
  -H "Authorization: Bearer tss_live_YOUR_KEY"

Call the API from your own server or computer, never from a web page other people can open: anyone who sees a key can use it. If a key leaks, revoke it above and make a new one.

Scopes

A key can only call the routes its scopes allow. Give each key only what it needs.

ScopeAllows
labels:readYour postage labels, balance, tracking and saved label PDFs; price checks.
labels:writeBuy postage labels from your balance (and everything labels:read allows). Spends real money.
inventory:readYour Speed Inventory: items, stores, rules and recent changes.
orders:readOrders waiting to ship from a connected Mana Pool store (last 30 days).

Routes

RouteScopeWhat it does
GET /api/v1/meanyThe account and key you are using.
GET /api/postage/statuslabels:readWhether your account can buy labels, and test or live mode.
GET /api/postage/balancelabels:readPostage balance in cents and the last 20 changes.
GET /api/postage/labelslabels:readYour 50 newest labels: tracking number, service, price, status.
GET /api/postage/labels/:id/pdflabels:readA label you bought, as base64 PDF.
GET /api/postage/track/:numberlabels:readTracking for one of your labels.
POST /api/postage/rateslabels:readPrices for one package.
POST /api/postage/quotelabels:readThe total for a batch before you buy.
POST /api/postage/labelslabels:writeBuy labels: { from, labels: [{ ref, service, to, weightOz, idempotencyKey }] }, the same body the website sends.
GET /api/inventory/stateinventory:readYour inventory, rules and connected stores.
GET /api/inventory/manapool/ordersorders:readMana Pool orders to ship, with a TCGplayer-style CSV.

Anything else answers 403 with route_not_allowed. Making, listing and revoking keys is done on this page while signed in, never with a key.

Limits and errors

  • Each key has its own limit of requests a minute (10 to 600; 60 unless you pick another). Every answer carries X-RateLimit-Limit and X-RateLimit-Remaining; over the limit you get 429 with Retry-After in seconds.
  • Buying labels has its own speed and balance limits, the same as on the website.
  • Errors are JSON: { "error": "a sentence", "code": "…" }. Codes: invalid_key (401), missing_scope and route_not_allowed (403), pro_required (402), rate_limited (429), try_again and unavailable (503).
  • Making a key needs Pro. If your account leaves Pro, its keys keep reading, but buying labels answers 402 until you are back on Pro. Revoke a key any time.
  • We keep only a fingerprint of each key, never the key itself, so a lost key can't be shown again: revoke it and make a new one.