Retrieving card information
How to retrieve the information of cards.
Retrieving details of a single card
To retrieve details associated with a card, use the GET /cards/{card_id}
An example of a request to retrieve card information is shown below.
curl --request GET \
--url https://sandbox.bond.tech/api/v0.1/cards/2742ff7f-7455-4066-8b45-ae12d3acca34 \
--header 'Authorization: YOUR-AUTHORIZATION' \
--header 'Identity: YOUR-IDENTITY'
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://sandbox.bond.tech/api/v0.1/cards/057c6074-a02d-4a5a-bad9-bbc64b047df7")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHENTICATION'
response = http.request(request)
puts response.read_body
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Identity: 'YOUR-IDENTITY',
Authorization: 'YOUR-AUTHENTICATION'
}
};
fetch('https://sandbox.bond.tech/api/v0.1/cards/057c6074-a02d-4a5a-bad9-bbc64b047df7', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import requests
url = "https://sandbox.bond.tech/api/v0.1/cards/057c6074-a02d-4a5a-bad9-bbc64b047df7"
headers = {
"Accept": "application/json",
"Identity": "YOUR-IDENTITY",
"Authorization": "YOUR-AUTHENTICATION"
}
response = requests.get(url, headers=headers)
print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/cards/057c6074-a02d-4a5a-bad9-bbc64b047df7");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Identity", "YOUR-IDENTITY");
request.AddHeader("Authorization", "YOUR-AUTHENTICATION");
IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://sandbox.bond.tech/api/v0.1/cards/057c6074-a02d-4a5a-bad9-bbc64b047df7")
.get()
.addHeader("Accept", "application/json")
.addHeader("Identity", "YOUR-IDENTITY")
.addHeader("Authorization", "YOUR-AUTHENTICATION")
.build();
Response response = client.newCall(request).execute();
An example of a response to a successful request to retrieve card information is shown below.
{
"card_id": "057c6074-a02d-4a5a-bad9-bbc64b047df7",
"date_updated": "2020-08-16T19:39:34Z",
"date_created": "2020-08-15T19:39:34Z",
"customer_id": "c8940088-21e8-451c-987c-0a0398db3ee5",
"account_id": "26bdeb70-157c-4c44-a04a-3727793b9779",
"expiry_date": "tok_live_7g3eARzeEBJw89rJRCHqHv",
"last_four": "6270",
"card_number": "tok_live_q8kwTYb3YCYzngeRHHTs9p",
"cvv": "tok_live_c95od7AsFWYN1ecaaRYtFU",
"status": "active",
"card_design_id": "12",
"date_physical_card_activated": "2021-05-11T19:39:34Z",
}
For a complete specification and interactive examples, see Retrieving a card in the Bond API Reference.
Retrieving details of all cards for a customer
To retrieve details associated with all cards for a customer, use the GET /cards
An example of a request to retrieve card profile information for all cards for a cstomer is shown below.
curl --request GET \
--url 'https://sandbox.bond.tech/api/v0.1/cards?customer_id=057c6074-a02d-4a5a-bad9-bbc64b047df7&show_closed=true&page=1&count=10&order_by=asc' \
--header 'Accept: application/json' \
--header 'Authorization: YOUR-AUTHENTICATION' \
--header 'Identity: YOUR-IDENTITY'
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://sandbox.bond.tech/api/v0.1/cards?customer_id=057c6074-a02d-4a5a-bad9-bbc64b047df7&show_closed=true&page=1&count=10&order_by=asc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Identity"] = 'YOUR-IDENTITY'
request["Authorization"] = 'YOUR-AUTHENTICATION'
response = http.request(request)
puts response.read_body
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Identity: 'YOUR-IDENTITY',
Authorization: 'YOUR-AUTHENTICATION'
}
};
fetch('https://sandbox.bond.tech/api/v0.1/cards?customer_id=057c6074-a02d-4a5a-bad9-bbc64b047df7&show_closed=true&page=1&count=10&order_by=asc', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import requests
url = "https://sandbox.bond.tech/api/v0.1/cards?customer_id=057c6074-a02d-4a5a-bad9-bbc64b047df7&show_closed=true&page=1&count=10&order_by=asc"
headers = {
"Accept": "application/json",
"Identity": "YOUR-IDENTITY",
"Authorization": "YOUR-AUTHENTICATION"
}
response = requests.get(url, headers=headers)
print(response.text)
import requests
url = "https://sandbox.bond.tech/api/v0.1/cards?customer_id=057c6074-a02d-4a5a-bad9-bbc64b047df7&show_closed=true&page=1&count=10&order_by=asc"
headers = {
"Accept": "application/json",
"Identity": "YOUR-IDENTITY",
"Authorization": "YOUR-AUTHENTICATION"
}
response = requests.get(url, headers=headers)
print(response.text)
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://sandbox.bond.tech/api/v0.1/cards?customer_id=057c6074-a02d-4a5a-bad9-bbc64b047df7&show_closed=true&page=1&count=10&order_by=asc")
.get()
.addHeader("Accept", "application/json")
.addHeader("Identity", "YOUR-IDENTITY")
.addHeader("Authorization", "YOUR-AUTHENTICATION")
.build();
Response response = client.newCall(request).execute();
An example of a response to a successful request to retrieve card profile information is shown below.
{
"page": 1,
"pages": 1,
"count": 5,
"has_more": false,
"cards": [
{
"card_id": "057c6074-a02d-4a5a-bad9-bbc64b047df7",
"date_updated": "2020-08-16T19:39:34Z",
"date_created": "2020-08-15T19:39:34Z",
"customer_id": "c8940088-21e8-451c-987c-0a0398db3ee5",
"account_id": "26bdeb70-157c-4c44-a04a-3727793b9779",
"expiry_date": "tok_live_7g3eARzeEBJw89rJRCHqHv",
"last_four": "6270",
"card_number": "tok_live_q7kwTYb5YCYznpgRHHTs9p",
"cvv": "tok_live_c94od3AsFWYQ1ecaaMYtFU",
"status": "active",
"card_design_id": "12",
"date_physical_card_activated": "2021-05-11T19:39:34Z",
}
]
}
For a complete specification and interactive examples, see Retrieving a card in the Bond API Reference.
Updated about 2 years ago