Retrieves a card from the exception file
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/exception-file/{cardToken} \
--header 'Authorization: Basic <encoded-value>' \
--header 'X-Marqeta-Program-Short-Code: <x-marqeta-program-short-code>'import requests
url = "https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}"
headers = {
"X-Marqeta-Program-Short-Code": "<x-marqeta-program-short-code>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Marqeta-Program-Short-Code': '<x-marqeta-program-short-code>',
Authorization: 'Basic <encoded-value>'
}
};
fetch('https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}', 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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}",
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>",
"X-Marqeta-Program-Short-Code: <x-marqeta-program-short-code>"
],
]);
$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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Marqeta-Program-Short-Code", "<x-marqeta-program-short-code>")
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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}")
.header("X-Marqeta-Program-Short-Code", "<x-marqeta-program-short-code>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Marqeta-Program-Short-Code"] = '<x-marqeta-program-short-code>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"as_of": "2026-10-17T14:32:08.123Z",
"network": "VISA",
"card_token": "6a2b8c4e-1f3d-4a5b-9c7e-2d4f6a8b0c1e",
"created_at": "2026-10-17T14:32:08.123Z",
"action_code": "CLOS",
"action_date": "2027-01-15",
"action_type": "ADD",
"last_modified_at": "2026-10-17T14:32:08.123Z",
"program_short_code": "sqc9"
}{
"message": "Program is not onboarded for the Exception File Management feature"
}{
"message": "This card is not available in exception file"
}{
"message": "Unable to process the request. Please retry later"
}Exception File Management
Retrieve Card from Exception File
Retrieves the exception file record for the specified card
GET
/
exception-file
/
{cardToken}
Retrieves a card from the exception file
curl --request GET \
--url https://sandbox-api.marqeta.com/v3/exception-file/{cardToken} \
--header 'Authorization: Basic <encoded-value>' \
--header 'X-Marqeta-Program-Short-Code: <x-marqeta-program-short-code>'import requests
url = "https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}"
headers = {
"X-Marqeta-Program-Short-Code": "<x-marqeta-program-short-code>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Marqeta-Program-Short-Code': '<x-marqeta-program-short-code>',
Authorization: 'Basic <encoded-value>'
}
};
fetch('https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}', 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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}",
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>",
"X-Marqeta-Program-Short-Code: <x-marqeta-program-short-code>"
],
]);
$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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Marqeta-Program-Short-Code", "<x-marqeta-program-short-code>")
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://sandbox-api.marqeta.com/v3/exception-file/{cardToken}")
.header("X-Marqeta-Program-Short-Code", "<x-marqeta-program-short-code>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.marqeta.com/v3/exception-file/{cardToken}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Marqeta-Program-Short-Code"] = '<x-marqeta-program-short-code>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"as_of": "2026-10-17T14:32:08.123Z",
"network": "VISA",
"card_token": "6a2b8c4e-1f3d-4a5b-9c7e-2d4f6a8b0c1e",
"created_at": "2026-10-17T14:32:08.123Z",
"action_code": "CLOS",
"action_date": "2027-01-15",
"action_type": "ADD",
"last_modified_at": "2026-10-17T14:32:08.123Z",
"program_short_code": "sqc9"
}{
"message": "Program is not onboarded for the Exception File Management feature"
}{
"message": "This card is not available in exception file"
}{
"message": "Unable to process the request. Please retry later"
}Authorizations
zionTokenoauth2
Headers
Path Parameters
Response
Exception file record for the specified card token
Time this record is current as of, in ISO 8601: the time of the request for a change made through this API, or the report time of the most recent Visa report that set or confirmed it. Visa's reports can lag the network by up to 7 days (weekly) or a month (monthly).
Example:
"2026-10-17T14:32:08.123Z"
Code representing the action that was taken on the card.
CLOS- Card terminated / closed accountLCPU- Lost cardSCPU- Stolen cardINVA- Invalid / not found accountPUWF- Fraud pickup (non-specific)PUNF- Pickup (no fraud)EXPC- Expired card (authorization only; declines with response code 54)DNTH- General block (authorization only; declines with response code 05)
For a record set by a Visa report, this can instead be Visa's own report code, when it has no equivalent above.
Example:
"CLOS"
Was this page helpful?