Get Inventory
Retrieve your current inventory listings with pagination and filtering options.
GET
/inventoryGet Inventory
Retrieve your store's inventory listings. Supports pagination and filtering.
On larger screens, use the API Playground panel on the right to try this endpoint.
| Name | Type | Required | Description |
|---|---|---|---|
page | number | Optional | Page number (1-indexed)Default: 1 |
limit | number | Optional | Items per page (max 500)Default: 100 |
productId | string | Optional | Filter by CTCGX product ID |
condition | string | Optional | Filter by condition (NM, LP, MP, HP, DMG) |
updatedSince | string | Optional | Filter items updated after this ISO date |
bash
curl "https://api.ctcgx.com/api/v1/inventory" \ -H "Authorization: Bearer YOUR_API_KEY"
Response
Returns paginated list of your inventory listings with product details.
json
{
"data": [
{
"id": "clxxx...",
"productId": "clyyyy...",
"product": {
"name": "Black Lotus",
"setName": "Alpha",
"gameType": "magic",
"cardNumber": "232",
"imageUrl": "https://..."
},
"quantity": 1,
"price": 9999900,
"condition": "LP",
"finish": "nonfoil",
"language": "English",
"isGraded": false,
"isTestData": false,
"createdAt": "2024-01-15T10:00:00Z",
"updatedAt": "2024-01-15T10:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 100,
"total": 1,
"totalPages": 1,
"hasMore": false
}
}Filtering
Use query parameters to filter your inventory:
# Get all NM condition cards GET /inventory?condition=NM # Get items updated in the last hour GET /inventory?updatedSince=2024-01-15T09:00:00Z # Combine filters GET /inventory?condition=NM&updatedSince=2024-01-15T09:00:00Z&limit=50
Pagination
For large inventories, use pagination to retrieve items in batches:
# First page GET /inventory?page=1&limit=100 # Next page GET /inventory?page=2&limit=100
The response includes pagination metadata:
page- Current page numberlimit- Items per pagetotal- Total number of itemstotalPages- Total number of pageshasMore- Whether more pages exist
Test Data
If you're using a test API key, you'll only see listings withisTestData: true. Live API keys only see production data.