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.
Your new key. Copy it now: it is not shown again. Keep it secret, like a password.
| Name | Key | Scopes | Last used | Uses |
|---|
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.
| Scope | Allows |
|---|---|
labels:read | Your postage labels, balance, tracking and saved label PDFs; price checks. |
labels:write | Buy postage labels from your balance (and everything labels:read allows). Spends real money. |
inventory:read | Your Speed Inventory: items, stores, rules and recent changes. |
orders:read | Orders waiting to ship from a connected Mana Pool store (last 30 days). |
Routes
| Route | Scope | What it does |
|---|---|---|
GET /api/v1/me | any | The account and key you are using. |
GET /api/postage/status | labels:read | Whether your account can buy labels, and test or live mode. |
GET /api/postage/balance | labels:read | Postage balance in cents and the last 20 changes. |
GET /api/postage/labels | labels:read | Your 50 newest labels: tracking number, service, price, status. |
GET /api/postage/labels/:id/pdf | labels:read | A label you bought, as base64 PDF. |
GET /api/postage/track/:number | labels:read | Tracking for one of your labels. |
POST /api/postage/rates | labels:read | Prices for one package. |
POST /api/postage/quote | labels:read | The total for a batch before you buy. |
POST /api/postage/labels | labels:write | Buy labels: { from, labels: [{ ref, service, to, weightOz, idempotencyKey }] }, the same body the website sends. |
GET /api/inventory/state | inventory:read | Your inventory, rules and connected stores. |
GET /api/inventory/manapool/orders | orders:read | Mana 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-LimitandX-RateLimit-Remaining; over the limit you get 429 withRetry-Afterin 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_scopeandroute_not_allowed(403),pro_required(402),rate_limited(429),try_againandunavailable(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.