Skip to main content
GET
/
card
List Cards
curl --request GET \
  --url https://api.treasuryprime.com/card \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://api.treasuryprime.com/card"

headers = {"Authorization": "Basic <encoded-value>"}

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

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://api.treasuryprime.com/card', 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.treasuryprime.com/card",
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: Basic <encoded-value>"
],
]);

$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.treasuryprime.com/card"

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

req.Header.Add("Authorization", "Basic <encoded-value>")

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.treasuryprime.com/card")
.header("Authorization", "Basic <encoded-value>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.treasuryprime.com/card")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "account_id": "acct_291u96075mva",
      "card_controls": null,
      "card_product_id": "cdpt_w10r2sebv0nl",
      "created_at": "2021-02-19T20:42:40Z",
      "cvv": null,
      "expiration": "0225",
      "external_id": "tprime_card_zuhqnmz7e085",
      "fulfillment": {
        "shipping_method": "USPS Mail (5-7 business days)",
        "status": "issued",
        "tracking_number": null
      },
      "id": "card_zuhqnmz7e085",
      "last4": "3385",
      "pan": null,
      "person_id": "psn_5vyzn6sveupa",
      "pin_is_set": false,
      "status": "unactivated",
      "updated_at": "2021-02-19T20:42:41Z",
      "userdata": null
    }
  ]
}
The external_id field in the response can be passed as card-token when using Marqeta UX Toolkit components.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

account_id
string

The ID of the account that the card should be issued against. Filterable.

card_product_id
string

The ID of the card product that this card should be issued from. Filterable.

last4
string

Last 4 digits of the card number. Filterable.

person_id
string

The ID of the person representing the cardholder that this card will be issued to. Filterable.

show_cvv
enum<string>

When true, the cvv field will be returned with non-null data. False by default. Requires PCI compliance.

Available options:
true,
false
show_pan
enum<string>

When true, the pan field will be returned with non-null data. False by default. Requires PCI compliance.

Available options:
true,
false
status
string

One of: unactivated, active, suspended, terminated. Filterable.

page_cursor
string

Pagination cursor, value is the object ID.

page_size
integer
default:100

Limits the number of objects in the returned list, value must be a number greater than or equal to 1. Defaults to 100.

Required range: x >= 1
from_date
string

Lists the objects created on the date provided and onwards. Date must be in ISO 8601 format (“YYYY-MM-DD”).

to_date
string

Lists the objects created before the date provided. Date must be in ISO 8601 format (“YYYY-MM-DD”).

Response

200 - application/json

A dictionary with a data property that contains a list of up to page_size card elements, starting after the card described by page_cursor. If no more cards are available, the resulting list will be empty.

data
object[]