1. Generate an API key from your dashboard.
2. Include it as the x-api-key header (or api_key query param) on every request.
3. The API returns your personal collection data.
curl "https://app--slingspace.base44.app/api/apps/68b9fba6f701e6e8564aa634/functions/collectionApi" \
-H "x-api-key: ss_YourKeyHere"All requests must include your API key. Two options:
Option 1 — Header (recommended)
x-api-key: ss_YourKeyHere
# or
Authorization: Bearer ss_YourKeyHereOption 2 — Query parameter
GET https://app--slingspace.base44.app/api/apps/68b9fba6f701e6e8564aa634/functions/collectionApi?api_key=ss_YourKeyHere/collectionApi— Get your card collectionReturns cards from your collection. Supports filtering, pagination, and a random card mode.
| Parameter | Type | Description |
|---|---|---|
random | boolean | If "true", returns a single random card from your collection instead of a list. |
limit | integer | Number of cards per page. Default: 50. Max: 200. |
page | integer | Page number for pagination. Default: 1. |
player | string | Filter by player name (case-insensitive partial match). |
set_name | string | Filter by set name (case-insensitive partial match). |
graded | boolean | Filter to only graded ("true") or ungraded ("false") cards. |
Get first 20 cards
curl "https://app--slingspace.base44.app/api/apps/68b9fba6f701e6e8564aa634/functions/collectionApi?limit=20" \
-H "x-api-key: ss_YourKeyHere"Get a random card
curl "https://app--slingspace.base44.app/api/apps/68b9fba6f701e6e8564aa634/functions/collectionApi?random=true" \
-H "x-api-key: ss_YourKeyHere"Filter by player name
curl "https://app--slingspace.base44.app/api/apps/68b9fba6f701e6e8564aa634/functions/collectionApi?player=Shohei+Ohtani&limit=10" \
-H "x-api-key: ss_YourKeyHere"Filter by set name, page 2
curl "https://app--slingspace.base44.app/api/apps/68b9fba6f701e6e8564aa634/functions/collectionApi?set_name=Topps+Chrome&page=2&limit=50" \
-H "x-api-key: ss_YourKeyHere"JavaScript fetch example
const res = await fetch('https://app--slingspace.base44.app/api/apps/68b9fba6f701e6e8564aa634/functions/collectionApi?random=true', {
headers: { 'x-api-key': 'ss_YourKeyHere' }
});
const { card } = await res.json();
console.log(card.player_name, card.year, card.set_name);List response
{
"success": true,
"cards": [ ...Card ], // Array of card objects
"total": 312, // Total matching cards
"page": 1,
"limit": 50,
"pages": 7
}Random response
{
"success": true,
"card": { ...Card }, // Single card object (or null if empty)
"total": 312
}Card object
{
"id": "abc123",
"player_name": "Ken Griffey Jr.",
"year": 1989,
"set_name": "Upper Deck",
"card_number": "1",
"condition": "mint",
"image_url": "https://res.cloudinary.com/{cloud_name}/image/fetch/https%3A%2F%2Fmedia.base44.com%2F...",
"notes": "Rookie card. Hall of Famer.", // optional
"team": "Seattle Mariners",
"variation": null,
"serial_number": null,
"manufacturer": "Upper Deck",
"is_graded": false,
"grade": null,
"grading_service": null,
"purchase_price": 120.00,
"current_value": 250.00,
"quantity": 1,
"added_date": "2024-01-15T12:00:00Z"
}| Status | Meaning |
|---|---|
401 | Missing, invalid, or inactive API key. |
400 | Bad request — malformed parameters. |
500 | Internal server error. |
Sign in to generate your free API key and start integrating.