List cards
List the cards the caller can see, physical cards first, then by name. Closed cards are left out unless status asks for them.
curl --request GET \
--url https://api.slash.com/v2/cards \
--header 'X-API-Key: <api-key>' \
--header 'x-legal-entity: <x-legal-entity>'const options = {
method: 'GET',
headers: {'x-legal-entity': '<x-legal-entity>', 'X-API-Key': '<api-key>'}
};
fetch('https://api.slash.com/v2/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.slash.com/v2/cards"
headers = {
"x-legal-entity": "<x-legal-entity>",
"X-API-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.slash.com/v2/cards"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-legal-entity", "<x-legal-entity>")
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"items": [
{
"id": "c_2rj4l7hmrrrcv",
"type": "virtual",
"status": "pending",
"name": "Ads – Meta",
"accountId": "sa_group_2rj4l7hmrrrcv",
"singleUse": true,
"createdAt": "2023-11-07T05:31:56Z",
"last4": "4242",
"expiryMonth": 9,
"expiryYear": 2030,
"virtualAccountId": "subaccount_2rj4l7hmrrrcv",
"cardGroupId": "card_group_2rj4l7hmrrrcv",
"cardProductId": "card_product_2rj4l7hmrrrcv",
"cardholderUserId": "u_2rj4l7hmrrrcv",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": [
"7995"
]
}
},
"billingAddress": {
"line1": "<string>",
"city": "<string>",
"line2": "<string>",
"state": "<string>",
"postalCode": "<string>",
"countryCode": "<string>"
},
"physical": {
"design": "plastic",
"secondLine": "Computer Services",
"shipping": {
"address": {
"line1": "<string>",
"city": "<string>",
"line2": "<string>",
"state": "<string>",
"postalCode": "<string>",
"countryCode": "<string>"
},
"service": "standard",
"status": "pending",
"carrier": "fedex",
"trackingNumber": "<string>",
"trackingUrl": "<string>",
"shippedAt": "2023-11-07T05:31:56Z"
}
},
"closedReason": "no_longer_needed",
"closedAt": "2023-11-07T05:31:56Z"
}
],
"metadata": {
"count": 1,
"nextCursor": "<string>"
}
}Authorizations
User API key authentication. Create a key under Settings → API keys in the Slash dashboard (https://app.slash.com/global-settings/api-keys) and send the x-legal-entity header naming the legal entity to act on with every request. Keys scoped to a legal entity are rejected with 403 user_api_key_required.
Headers
The legal entity to act on. Required on every request; a user API key can act on any legal entity its user has access to.
^le_[a-zA-Z0-9]+$Query Parameters
The opaque metadata.nextCursor value from the previous page. It carries that page's filters, page size and ordering, so pass it on its own; see Pagination.
Number of items per page, from 1 to 100. The page size is carried inside metadata.nextCursor, so later pages keep the same size unless limit is passed again to change it.
1 <= x <= 100Return cards in these statuses. Defaults to every status but closed.
pending, awaiting_activation, active, paused, inactive, closed Return virtual or physical cards.
virtual, physical Return cards issued on one account.
Return cards on one virtual account.
Return cards in one card group.
Return cards held by one user.
Match on the card name, its last four digits or its id.
1 - 200Response
A page of cards.
Hide child attributes
Hide child attributes
Card id with the c_ prefix.
"c_2rj4l7hmrrrcv"
virtual, physical pending: being issued, or waiting for a physical card's fee. awaiting_activation: a physical card its holder has not activated. active: approves authorizations. paused: declines them. inactive: deactivated by Slash or the issuer; can only be closed. closed: permanent.
pending, awaiting_activation, active, paused, inactive, closed "Ads – Meta"
Account id with the sa_group_ prefix.
"sa_group_2rj4l7hmrrrcv"
Whether the card closes after its first transaction. Virtual cards only.
Absent on physical cards until they are activated.
"4242"
9
2030
Virtual account the card spends from, with the subaccount_ prefix.
"subaccount_2rj4l7hmrrrcv"
Card group id with the card_group_ prefix.
"card_group_2rj4l7hmrrrcv"
Card product id with the card_product_ prefix.
"card_product_2rj4l7hmrrrcv"
The user who holds the card, with the u_ prefix.
"u_2rj4l7hmrrrcv"
What the card may spend. The controls of its card group apply too. Replaced whole on update; null clears it.
Hide child attributes
Hide child attributes
How much may be spent per period.
Hide child attributes
Hide child attributes
Every period but lifetime resets at its boundary in timezone; lifetime never resets.
daily, weekly, monthly, yearly, lifetime Day the first period starts, today or earlier. Defaults to the start of the current period. Not used by daily.
"2026-09-01"
IANA timezone the period boundaries use. Defaults to UTC.
"America/Los_Angeles"
Approve recurring payments only. An Enterprise feature.
{
"limit": {
"amount": { "amount": 500000, "currency": "USD" },
"period": "monthly"
},
"transactionLimit": { "amount": 250000, "currency": "USD" },
"merchantCategoryCodes": { "mode": "block", "values": ["7995"] }
}
The address checked by address verification (AVS). Absent when the legal entity's address is used.
Hide child attributes
Hide child attributes
11ISO 3166-1 alpha-2 country code.
2Present on physical cards.
Hide child attributes
Hide child attributes
plastic, silver_metal, gold_metal The line embossed under the holder's name.
"Computer Services"
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
11ISO 3166-1 alpha-2 country code.
2standard, express, priority pending: ordered, not yet shipped.
pending, shipped, canceled fedex, usps no_longer_needed, lost_or_stolen, never_arrived, damaged, closed_by_slash curl --request GET \
--url https://api.slash.com/v2/cards \
--header 'X-API-Key: <api-key>' \
--header 'x-legal-entity: <x-legal-entity>'const options = {
method: 'GET',
headers: {'x-legal-entity': '<x-legal-entity>', 'X-API-Key': '<api-key>'}
};
fetch('https://api.slash.com/v2/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.slash.com/v2/cards"
headers = {
"x-legal-entity": "<x-legal-entity>",
"X-API-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.slash.com/v2/cards"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-legal-entity", "<x-legal-entity>")
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"items": [
{
"id": "c_2rj4l7hmrrrcv",
"type": "virtual",
"status": "pending",
"name": "Ads – Meta",
"accountId": "sa_group_2rj4l7hmrrrcv",
"singleUse": true,
"createdAt": "2023-11-07T05:31:56Z",
"last4": "4242",
"expiryMonth": 9,
"expiryYear": 2030,
"virtualAccountId": "subaccount_2rj4l7hmrrrcv",
"cardGroupId": "card_group_2rj4l7hmrrrcv",
"cardProductId": "card_product_2rj4l7hmrrrcv",
"cardholderUserId": "u_2rj4l7hmrrrcv",
"controls": {
"limit": {
"amount": {
"amount": 500000,
"currency": "USD"
},
"period": "monthly"
},
"transactionLimit": {
"amount": 250000,
"currency": "USD"
},
"merchantCategoryCodes": {
"mode": "block",
"values": [
"7995"
]
}
},
"billingAddress": {
"line1": "<string>",
"city": "<string>",
"line2": "<string>",
"state": "<string>",
"postalCode": "<string>",
"countryCode": "<string>"
},
"physical": {
"design": "plastic",
"secondLine": "Computer Services",
"shipping": {
"address": {
"line1": "<string>",
"city": "<string>",
"line2": "<string>",
"state": "<string>",
"postalCode": "<string>",
"countryCode": "<string>"
},
"service": "standard",
"status": "pending",
"carrier": "fedex",
"trackingNumber": "<string>",
"trackingUrl": "<string>",
"shippedAt": "2023-11-07T05:31:56Z"
}
},
"closedReason": "no_longer_needed",
"closedAt": "2023-11-07T05:31:56Z"
}
],
"metadata": {
"count": 1,
"nextCursor": "<string>"
}
}