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{
"card_token": "6a2b8c4e-1f3d-4a5b-9c7e-2d4f6a8b0c1e",
"program_short_code": "sqc9",
"network": "VISA",
"action_code": "CLOS",
"action_type": "ADD",
"action_date": "2027-01-15",
"source": "API",
"created_at": "2026-10-17T14:32:08Z",
"last_modified_at": "2026-10-17T14:32:08Z"
}{
"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"
}Retrieve Card from Exception File
Retrieves the exception file record for the specified card
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{
"card_token": "6a2b8c4e-1f3d-4a5b-9c7e-2d4f6a8b0c1e",
"program_short_code": "sqc9",
"network": "VISA",
"action_code": "CLOS",
"action_type": "ADD",
"action_date": "2027-01-15",
"source": "API",
"created_at": "2026-10-17T14:32:08Z",
"last_modified_at": "2026-10-17T14:32:08Z"
}{
"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
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Headers
Program short code of the program managing the card.
Path Parameters
Card token for which details need to be retrieved from the exception file.
Response
Exception file record for the specified card token
Unique identifier of the card on the exception file.
"6a2b8c4e-1f3d-4a5b-9c7e-2d4f6a8b0c1e"
Program short code of the program managing the card.
"sqc9"
Card network associated with the card.
VISA "VISA"
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)
CLOS, LCPU, SCPU, INVA, PUWF, PUNF, EXPC, DNTH "CLOS"
Type of action recorded for the card on the exception file.
ADD, UPDATE, DELETE "ADD"
Purge date of the record in the exception file, in YYYY-MM-DD format (UTC).
^\d{4}-\d{2}-\d{2}$"2027-01-15"
Origin of the exception file record.
API, AUTO_ADD "API"
Date and time when the record was created, in UTC.
"2026-10-17T14:32:08Z"
Date and time when the record was last modified, in UTC.
"2026-10-17T14:32:08Z"
Was this page helpful?