Appearance
Get Inventory
POST /api/v1/merchant/inventory
Fetches a user's Steam inventory with competitive pricing. Used in the API-only integration flow.
Request
Headers
| Header | Required | Description |
|---|---|---|
X-Api-Key | ✅ | Your merchant API key |
Content-Type | ✅ | application/json |
Cache-Control | — | Send no-cache to force a fresh read. See Refreshing the inventory |
Body
| Parameter | Type | Required | Description |
|---|---|---|---|
game | string | ✅ | Game code: csgo, rust, dota2, tf2 |
partner | integer | ✅ | Steam trade partner ID |
token | string | ✅ | Steam trade token (exactly 8 characters) |
Response
json
{
"success": true,
"message": "Inventory fetched successfully",
"data": {
"items": [
{
"id": "38029384123",
"name": "AK-47 | Redline (Field-Tested)",
"price": 12.45,
"image_url": "https://community.cloudflare.steamstatic.com/economy/image/...",
"exterior": "Field-Tested",
"rarity": "Classified",
"rarity_color": "#d32ce6"
}
],
"total": 47,
"sum": 284.90,
"game": "csgo",
"max_items": 50
}
}Response Fields
| Field | Type | Description |
|---|---|---|
items | array | List of tradeable inventory items with prices |
items[].id | string | Asset ID — use this in create-deposit |
items[].name | string | Item market name |
items[].price | number | Best available price (USD) |
items[].image_url | string | Steam CDN image URL |
items[].exterior | string | null | Item wear: Factory New, Minimal Wear, Field-Tested, Well-Worn, Battle-Scarred |
items[].rarity | string | null | Item rarity tier |
items[].rarity_color | string | null | Hex color for the rarity |
total | integer | Total number of tradeable items |
sum | number | Total value of all items |
game | string | Game code |
max_items | integer | Maximum number of items allowed in a single deposit. Sending more to Create Deposit is rejected with 400. Read it here rather than hardcoding — it is configurable |
Example
bash
curl -X POST https://api.skinslink.com/api/v1/merchant/inventory \
-H "X-Api-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"game": "csgo",
"partner": 123456789,
"token": "AbCdEfGh"
}'Performance
This endpoint fetches and prices the user's inventory in real time. Typical response times:
- Cached: ~100–200ms
- Fresh fetch: ~1–4 seconds
Pricing snapshot is valid for 5 minutes
The pricing snapshot from this call is what Create Deposit uses, and it stays valid for 5 minutes. A create-deposit call later than that fails with inventory_reload — re-fetch the inventory and retry. Prices are point-in-time and items are re-priced at deposit time; use min_prices or the from_preview flow to protect the amount you displayed.
Refreshing the inventory
By default, repeated calls for the same user may be served from cache. An item the user has just received, or one whose trade protection has just ended, can take a while to show up.
To force a fresh read, send Cache-Control: no-cache:
bash
curl -X POST https://api.skinslink.com/api/v1/merchant/inventory \
-H "X-Api-Key: your-api-key" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-d '{
"game": "csgo",
"partner": 123456789,
"token": "AbCdEfGh"
}'- The user's Steam inventory and the prices are fetched again, so items that have just become tradable are included.
- The response is a regular one and replaces the 5-minute pricing snapshot used by Create Deposit.
- A fresh read takes ~1–4 seconds instead of ~100–200ms.
When to send it
Send no-cache when the user explicitly asks to refresh, for example with a "Refresh" button. Do not send it on every call: it makes each response slower. A full re-read of the Steam inventory happens at most once every 10 minutes per trade link; repeated no-cache calls within that window re-price the items but may not pick up newly tradable ones.
Errors
| Status | Message | Cause |
|---|---|---|
400 | invalid request body | Malformed JSON |
400 | validation error | Missing or invalid fields (see data array for details) |
401 | missing authorization header | X-Api-Key header not provided |
401 | invalid API key | API key not found or inactive |
403 | merchant account is disabled | Merchant account deactivated |
403 | IP not whitelisted: <ip> | Request IP not in whitelist |
408 | timeout error | Inventory fetch timed out — retry |
500 | internal error | Something went wrong on our side |
→ For domain-specific validation codes (Steam account issues, trade eligibility), see Errors.
