Active cards with available balance and owner names
Lists active cards with their available balance and their owner's name, for close tracking of cards and allocated budgets.
83/100ยท๐
WeeklyยทBeginnerCFOController
Cardslist_cards
๐ฏ Skill purpose
Lists active cards with their available balance and their owner's name, for close 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): Lost, Stolen, Damaged, Expired, Cancelled, Aborted (codes `LOS`, `STO`, `DAM`, `EXP`, `CAN`, `ABO`). `list_cards` never returns Lost, Stolen, Damaged, Expired or Cancelled cards: fetch those by ID with `get_card`.
To list active cards in the broad sense, target `ACT` and `REA`:
- `status: "ACT"` โ active
- `status: "REA"` โ reactivated (after blocking)
## Amounts โ availableBalance uses the standard money format (integer coefficient)
**All other Spendesk responses** return `amount` as an integer coefficient:
`{ amount: 9138, precision: 2 }` โ 91.38 EUR
**`list_cards.availableBalance` (and `spendingLimit`) use the same `{ amount, currency, precision, formatted }` format โ display `formatted` verbatim:**
`{ amount: 9138, currency: "EUR", precision: 2, formatted: "EUR 91.38" }` โ 91.38 EUR
โ Never display the raw `availableBalance.amount`: use `formatted`, or `amount / 10^precision` for calculations โ the raw amount would be 100x too large.
```javascript
// CORRECT for list_cards.availableBalance
const balance = card.availableBalance.amount / Math.pow(10, card.availableBalance.precision) // 91.38; for display: card.availableBalance.formatted
// 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 card", // label: Single purchase card | Subscription card | Physical card | Multi-use card (slugs are only for the type filter)
"status": "Active", // label; the status filter accepts "Active" or the legacy code ACT
"lastFourDigits": "7071", // 4 digits, or a masked number such as "5577 * 9432": read the segment after the last space; null until the card is issued; the full PAN is never returned
"expiryDate": "2030-04-30T23:59:59.000Z",
"owner": { "id": "lywtbkp615b21t", "label": "First Last" }, // owner: display label, use id as the userId filter
"currency": "EUR",
"availableBalance": { "amount": 9138, "currency": "EUR", "precision": 2, "formatted": "EUR 91.38" },
"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. `spendingLimit` is the card's monthly budget (an allowance reloaded each month, not a lifetime or per-transaction cap); it is `null` when no monthly budget is configured, which does not mean the card is unlimited. For a subscription card's budget, read `subscriptionBudget`.
## Resolving ownerId โ employee name
`list_cards` returns `owner` as `{ id, label }`: `label` is the owner's name, to display as is. `get_users` is only needed to get the email (pass `owner.id` in `ids`):
```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: exact case-sensitive label (e.g. "Active", "Blocked") or legacy code (ACT, BLO, REA, PRE, NEW, CBL, CMD, ABO). EXP/CAN/LOS/STO/DAM return an empty list: `list_cards` never returns those cards, use `get_card` |
| `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
/
- 1Download the file
s29-cartes-actives-solde.mdusing the button above. - 2Place 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 - 3Use 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