Active cards with available balance and owner names

Lists active cards with their available balance, resolving owner names via get_users. Enables precise tracking of cards and allocated budgets.

โ†“ Download skill (.md)
83/100ยท๐Ÿ“… WeeklyยทBeginnerCFOController
Cardslist_cards

๐ŸŽฏ Skill purpose

Lists active cards with their available balance, resolving owner names via get_users. Enables precise tracking of cards and allocated budgets.

๐Ÿ“Š What it produces

Active card inventory with resolved owner name, available balance, and limit.

โšก Benefit

Before

Card list with unresolved user IDs โ€” impossible to interpret without a reference.

After

Complete card inventory with plain text names, balances, and limits, immediately usable.



# Instructions

## Use case

List active cards with their available balance and identify the owner for each card.

## Basic call

```json
{
  "companyId": "<COMPANY_ID>",
  "status": "ACT",
  "pageSize": 50
}
```

Note: unlike `get_purchase_orders.status` which takes an **array**, `list_cards.status` takes a **plain string** (a single status at a time).

## Card lifecycle

```
PRE (pre-active) โ†’ ACT (active)
ACT โ†’ BLO (blocked)
BLO โ†’ REA (reactivated) โ†’ ACT
```

Terminal states (cannot return to active): `LOS`, `STO`, `DAM`, `EXP`, `CAN`, `CMD`

To list active cards in the broad sense, target `ACT` and `REA`:
- `status: "ACT"` โ€” active
- `status: "REA"` โ€” reactivated (after blocking)

## Critical pitfall โ€” availableBalance.amount is a DECIMAL, not a coefficient

**All other Spendesk responses** return `amount` as an integer coefficient:
`{ amount: 9138, precision: 2 }` โ†’ 91.38 EUR

**`list_cards.availableBalance.amount` returns the DECIMAL value directly:**
`{ amount: 91.38, currency: "EUR", precision: 2 }` โ†’ 91.38 EUR (not 9138!)

โ†’ Never apply `amount / 10^precision` to `availableBalance.amount` from `list_cards` โ€” the result would be 100x too small.

```javascript
// CORRECT for list_cards.availableBalance
const balance = card.availableBalance.amount  // 91.38 EUR directly

// CORRECT for all other tools (get_payables, etc.)
const amount = payable.amount.amount / Math.pow(10, payable.amount.precision)
```

## Response structure

```json
{
  "id": "lfyzcn76rvd200",
  "type": "subscription",          // single_purchase | subscription | physical | multi_use
  "status": "ACT",
  "lastFourDigits": "7071",        // last 4 digits of the PAN โ€” the full PAN is never returned
  "expiryDate": "2030-04-30T23:59:59.000Z",
  "ownerId": "lywtbkp615b21t",     // userId of the owner
  "currency": "EUR",
  "availableBalance": { "amount": 91.38, "currency": "EUR", "precision": 2 },
  "spendingLimit": null            // null on subscription cards
}
```

## Pitfall โ€” spendingLimit null on subscription cards

`spendingLimit` is `null` for `subscription` cards (confirmed S29 and S16). The available balance is read via `availableBalance` only. For `single_purchase` and `multi_use` cards, `spendingLimit` contains the cap.

## Resolving ownerId โ†’ employee name

`list_cards` returns `ownerId` (userId) but not the name. To display the name:

```json
// get_users with filter by ID
{
  "companyId": "<COMPANY_ID>",
  "ids": ["lywtbkp615b21t", "other_user_id"]
}
```

โ†’ Returns `{ firstName, lastName, email }` for each userId. Build a userId โ†’ name map to enrich the cards.

## Available filters

| Parameter | Type | Description |
|-----------|------|-------------|
| `status` | string | A single status (PRE/ACT/BLO/REA/EXP/CAN/LOS/STO/DAM/CMD/CBL) |
| `type` | enum | single_purchase / subscription / physical / multi_use |
| `userId` | string | Filter by owner |
| `createdAfter` | YYYY-MM-DD | Cards created after this date |
| `createdBefore` | YYYY-MM-DD | Cards created before this date |

## Example user prompts

- "Which virtual cards are currently active and what is their available balance?"
- "Are there any cards with an unused residual balance?"
- "Show me the active cards for the Marketing team"

How to install this skill

/
  1. 1
    Download the file s29-cartes-actives-solde.md using the button above.
  2. 2
    Place the file in the .claude/ directory of your project (or ~/.claude/ for a global install).
    cp s29-cartes-actives-solde.md .claude/s29-cartes-actives-solde.md
  3. 3
    Use in Claude Code โ€” the skill is automatically discovered. Describe your need in natural language and Claude will apply the skill instructions.
๐Ÿ’ก Make sure the Spendesk MCP is configured in your .claude/settings.json with the tools list_cards.

Similar skills

โ˜… Top
95/100ยท๐Ÿ” Ad hocยทExpert

MCP coverage audit & gap analysis

Probes all available MCP tools, re-evaluates coverage of 50 persona use cases, detects new fields or tools, and regenerates the gap analysis report.

CFOControllerAP Manager
90/100ยท๐Ÿ“… WeeklyยทBeginner

Card requests via get_requests

Explains how to use get_requests for card requests and why expense reimbursements don't appear there. Avoids a frequent source of confusion between two distinct workflows.

ControllerFinance Analyst
90/100ยท๐Ÿ” Ad hocยทIntermediate

Active vs archived cost centers

Distinguishes active cost centers from archived ones with correct use of get_cost_centers. Avoids the counter-intuitive isArchived vs isActive naming convention pitfall.

ControllerFinance Analyst