Documentation API v1
Browse documentation

Get started

The Card Caddie API

A store. Your cards. Ranked.

Send a store name and your API key. Get a simple list of your cards, ordered by reward rate. Add an amount to estimate the return on a purchase.

POST/api/v1/rank

Quickstart

Add your cards in your profile, create an API key, and send your first request. Only cards saved in your wallet are ranked.

POST /api/v1/rank · Authorization: Bearer cc_your_api_key

Shell
curl -X POST https://www.thecardcaddie.com/api/v1/rank \
  -H "Authorization: Bearer $CARD_CADDIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store":"Chipotle"}'

Authentication

For API-key access, create a key in your profile and send it in the Authorization header. OAuth-connected assistants send their access token in the same header.

HTTP
Authorization: Bearer cc_your_api_key

Your key or OAuth token selects your account automatically. Keep it server-side in CARD_CADDIE_API_KEY; never put it in browser code.

Base URL: https://www.thecardcaddie.com

Connect your personal assistant

Add The Card Caddie as a remote MCP connection in a compatible assistant. Sign in to your Card Caddie account and approve access.

HTTP
https://www.thecardcaddie.com/mcp

Transport: Streamable HTTP. Authentication: OAuth. Your assistant discovers these tools automatically:

  • list_cards — Your saved cards.
  • get_card_rates — One card’s category rates.
  • rank_cards — Your best card for a store.
  • find_supported_cards — Cards you can add.
  • add_card — Add a supported card.
  • remove_card — Remove a saved card.

Try asking: “Which of my cards should I use at Chipotle for a $25 purchase?”

Grok Bot supports remote MCP connections. ChatGPT and Dots connect through plugins, subject to account availability. Muse supports custom connectors using API information. Instinct’s public documentation does not confirm a custom connection interface. Platform-specific setup should be verified in your assistant; a listed platform is not a certification.

If your assistant cannot connect through MCP, use the OpenAPI specification and a dedicated API key in its secure credential storage.

Choose what your assistant can do

View cards and recommendations is the default. Manage wallet also lets the assistant add or remove cards. You choose when you approve the connection.

Manage or disconnect access in your profile. Disconnecting invalidates that connection’s access and refresh tokens. API keys are managed separately.

OAuth setup for developers

Discover authorization endpoints at /.well-known/oauth-authorization-server. Register a public client at POST /api/assistant-oauth/register with a name and exact public HTTPS callback URLs:

JSON
{
  "client_name": "My assistant",
  "redirect_uris": [
    "https://assistant.example.com/oauth/callback"
  ],
  "token_endpoint_auth_method": "none"
}

Use the returned client_id with the authorization-code flow and S256 PKCE. Request wallet:read, optionally wallet:write, and offline_access to stay connected. Set resource to https://www.thecardcaddie.com/mcp for MCP or https://www.thecardcaddie.com/api/v1 for REST. Tokens only work for their requested resource. Include state and the same callback URL at code exchange.

Access tokens last up to one hour. Offline access uses rotating refresh tokens for up to 30 days after consent. Replace the refresh token after each exchange; reusing an old refresh token revokes the connection. Reconnect after expiration. Public clients require no client secret. Client metadata documents and confidential-client authentication are not supported in this version; choose dynamic registration (DCR).

Protected-resource metadata: /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-protected-resource/api/v1. Token endpoint: /api/assistant-oauth/token. Revocation endpoint: /api/assistant-oauth/revoke accepts token and client_id. The legacy single-card calculator accepts API keys only.

Give your assistant the API specification

The OpenAPI specification describes each API request and response in a format assistants and integration tools can read.

HTTP
https://www.thecardcaddie.com/openapi.json

Open specification ↗ · Agent documentation index ↗

Use “Copy docs for agent” above for the complete written guide and examples. API keys grant read and write access; OAuth connections can be limited to reading.

Request parameters

FieldRequiredMeaning
storeYesStore name, domain, or website URL. 1–253 characters.
amountNoPositive USD number, up to 1,000,000,000. Omit for ranking only.
categoryNoOverride the category when you know how a purchase is categorized.

Unknown stores use Other. Send category to specify a category yourself.

Supported categories: dining, groceries, gas, travel, shopping, entertainment, drugstores, home_improvement, transit, streaming_services, fitness_clubs, utilities, other. Extra request fields are rejected.

Ranked response

JSON
[
  {
    "rank": 1,
    "card": "American Express Gold",
    "value": 4
  },
  {
    "rank": 2,
    "card": "Wells Fargo Active Cash",
    "value": 2
  }
]

Best card first. value: 4 means 4x rewards. Rates include applicable category and merchant bonuses.

Add an amount for estimated rewards

JSON
{ "store": "Chipotle", "amount": 25 }

Each card now includes one extra field, estimatedReturnUsd. A 4x card on a $25 purchase returns:

JSON
[
  {
    "rank": 1,
    "card": "American Express Gold",
    "value": 4,
    "estimatedReturnUsd": 1
  }
]

Estimates use amount × rate ÷ 100, assuming one cent per reward unit. Actual redemption values and reward eligibility may vary.

List your cards

GET /api/v1/cards lists your cards. An empty wallet returns [].

Shell
curl https://www.thecardcaddie.com/api/v1/cards \
  -H "Authorization: Bearer $CARD_CADDIE_API_KEY"
JSON
[
  {
    "id": "CARD_ID",
    "name": "Gold",
    "issuer": "American Express"
  }
]

Use the returned id to read or remove a card. CARD_ID below means that ID.

Read a card’s category rates

GET /api/v1/cards/CARD_ID returns a card’s category rates.

Shell
curl https://www.thecardcaddie.com/api/v1/cards/CARD_ID \
  -H "Authorization: Bearer $CARD_CADDIE_API_KEY"
JSON
{
  "name": "Gold",
  "issuer": "American Express",
  "categories": {
    "travel": 3,
    "groceries": 4,
    "gas": 1,
    "dining": 4,
    "shopping": 1,
    "entertainment": 1,
    "drugstores": 1,
    "home_improvement": 1,
    "transit": 1,
    "streaming_services": 1,
    "fitness_clubs": 1,
    "utilities": 1,
    "other": 1
  }
}

Rates are numeric multipliers with your saved overrides. Use store ranking for merchant-specific bonuses.

Add a card

POST /api/v1/cards adds a supported card by name and optional issuer.

Shell
curl -X POST https://www.thecardcaddie.com/api/v1/cards \
  -H "Authorization: Bearer $CARD_CADDIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Gold","issuer":"American Express"}'

Or use a templateId from the supported-card list:

JSON
{ "templateId": "TEMPLATE_ID" }

Returns the card’s ID, name, and issuer. Status 201 means added; status 200 means it was already in your wallet. Add cards one at a time to avoid duplicates.

Use the full card name. If multiple cards match, specify issuer or template ID from the returned candidates. Only supported cards can be added.

Remove a card

DELETE /api/v1/cards/CARD_ID removes an active card from your wallet. No request body is needed.

Shell
curl -X DELETE https://www.thecardcaddie.com/api/v1/cards/CARD_ID \
  -H "Authorization: Bearer $CARD_CADDIE_API_KEY"

A successful removal returns status 204 with no response body. The card disappears from your wallet and rankings. Status 404 means the card was not found.

Discover supported cards

GET /api/v1/card-templates lists supported cards: templateId, name, and issuer.

Shell
curl https://www.thecardcaddie.com/api/v1/card-templates \
  -H "Authorization: Bearer $CARD_CADDIE_API_KEY"

Use templateId to add a supported card. Use your wallet card’s id to read or remove it.

Connect your personal assistant

  1. Connect through MCP with OAuth, or keep a dedicated API key in the assistant’s secure credential storage.
  2. Read GET /api/v1/cards to learn which cards are in your wallet.
  3. Discover supported cards with GET /api/v1/card-templates and add your chosen card with POST /api/v1/cards.
  4. Read GET /api/v1/cards/CARD_ID for category rates.
  5. Send a store and optional amount to POST /api/v1/rank to compare your cards.
  6. Remove a chosen card with DELETE /api/v1/cards/CARD_ID.

Your key can read and change your wallet. Check that the request succeeded before using its response.

Other existing endpoints

These existing endpoints are also available. Website session means a signed-in cookie is required.

Browse existing endpoints
POST /api/v1/calculate-reward
API key

Calculate rewards for one named card in your wallet.

POST /api/ranking
Website session

Rank the signed-in wallet using user_id and optional domain/category. The user_id must match the session.

GET /api/cards
Website session

Read your wallet.

POST /api/cards
Website session

Add a template-based or custom card.

PUT /api/cards/[cardId]
Website session

Update a card you own.

DELETE /api/cards/[cardId]
Website session

Remove a card you own.

GET /api/card-templates
Public

List active card templates; optionally filter with ?category=.

GET /api/domain-category?domain=chipotle.com
Public

Look up a merchant category. POST with {"domain":"chipotle.com"} is also supported.

GET /api/places/nearby
Public

Find nearby places using lat, lng, and optional radius. Requires server-side Google Places configuration.

GET /api/api-keys · POST /api/api-keys · DELETE /api/api-keys
Website session

List or create your API keys; revoke with DELETE /api/api-keys?id=KEY_ID.

Single-card calculation

JSON
{
  "card": "Chase Sapphire Preferred",
  "merchant": "Starbucks",
  "amount": 25,
  "category": "Dining"
}

POST /api/v1/calculate-reward calculates one saved card’s rewards. Card, merchant, and amount are required; category is optional. Returns a reward object. Its legacy rate label uses percent; dollar value assumes one cent per reward unit.

Limits and errors

REST ranking and wallet each allow 100 requests per day per account. MCP tool calls share the wallet allowance. If you reach a limit (status 429), the Retry-After header tells you how many seconds to wait.

Rate-limit details

Keys share the account allowance. Ranking and wallet each also allow 200 requests per minute per IP. Wallet includes the supported-card catalog. The legacy single-card endpoint allows 100 per day per IP. Limits are in memory per server instance and reset on restart. Limit, remaining, and reset headers are returned after authentication.

  • 400 — Invalid request: Invalid JSON, fields, store, amount, or category.
  • 401 — Authentication required: Connect your account or provide a valid API key.
  • 403 — Permission required: Reconnect with permission to manage your wallet.
  • 404 — Card not found: Wallet card or supported template not found.
  • 409 — Multiple matching cards: Specify issuer or template ID from the candidates.
  • 404 — Empty wallet: Add active cards to the key owner’s wallet.
  • 429 — Request limit reached: Wait until the retry time.
  • 500 — Server error: The request could not be completed. Try again later.
JSON
{
  "success": false,
  "error": "no_cards",
  "message": "Add cards to your wallet before requesting a ranking."
}

Revoke exposed keys from your profile.