Skip to main content
GET
/
v0
/
cards
Retrieve a card by client card ID
curl --request GET \
  --url https://api.sandbox.lead.bank/v0/cards \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.sandbox.lead.bank/v0/cards"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.sandbox.lead.bank/v0/cards', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.lead.bank/v0/cards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.lead.bank/v0/cards"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sandbox.lead.bank/v0/cards")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.lead.bank/v0/cards")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "card_xyz123",
  "client_card_id": "<string>",
  "account_id": "account_xyz123",
  "entity_id": "entity_xyz123",
  "status_reason": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "details": {
    "card_product_name": "<string>",
    "is_virtual": true,
    "expiry_date": "2023-12-25",
    "last_four": "1234",
    "replacement_for": "card_xyz123",
    "closed_at": "2023-11-07T05:31:56Z"
  },
  "metadata": {}
}
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}
{
"code": "validation_error",
"title": "Validation Error",
"detail": "One or more request parameters failed validation",
"invalid_parameters": [
{
"name": "client_card_id",
"reason": "parameter \"client_card_id\" in query has an error: value is required but missing"
}
]
}
{
"code": "rate_limit_exceeded",
"title": "You've reached the rate limit for this call, your request was not processed.",
"detail": "If you are continuously hitting rate limits please contact the Lead team.",
"invalid_parameters": []
}
{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

client_card_id
string
required

The client_card_id assigned to the card.

Response

Card object retrieved successfully.

A card object

id
string

The server-generated ID of the Card object.

Pattern: ^card_\w+$
Example:

"card_xyz123"

client_card_id
string
read-only

Client-provided identifier for the card. Optional: present only for cards created via file upload, and omitted for cards created through the API, which are identified solely by their server-generated ID.

account_id
string

The ID of the Account object.

Pattern: ^account_\w+$
Example:

"account_xyz123"

entity_id
string

The ID of your entity.

Pattern: ^entity_[^\s]{1,33}$
Example:

"entity_xyz123"

status
enum<string>

Status is system-managed and cannot be set on create; status changes go through the status-transition endpoints.

Available options:
active,
inactive,
closed
status_reason
string
read-only

The reason for the card's current status. Empty when the card is active; otherwise populated. Set via the status-transition endpoints.

created_at
string<date-time>
read-only

Creation timestamp.

updated_at
string<date-time>
read-only

Last update timestamp.

details
object

Physical and product attributes of the card.

metadata
object

A set of key-value pairs that can be used to store additional information related to this object.