Get Inventory

Retrieve your current inventory listings with pagination and filtering options.

GET/inventory
Get 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.
NameTypeRequiredDescription
pagenumberOptionalPage number (1-indexed)Default: 1
limitnumberOptionalItems per page (max 500)Default: 100
productIdstringOptionalFilter by CTCGX product ID
conditionstringOptionalFilter by condition (NM, LP, MP, HP, DMG)
updatedSincestringOptionalFilter 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 number
  • limit - Items per page
  • total - Total number of items
  • totalPages - Total number of pages
  • hasMore - 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.

API Playground

Select an endpoint from the documentation to try it out here.