Skip to main content
Use this view endpoint to retrieve details for all the cards in credit accounts for a program. The data is derived from the balance-related activity on the Marqeta platform. This endpoint supports multiple response formats, query filtering, field filtering, sorting, pagination, and currency conversion. For more information about response options, see Response Customization.

Retrieve credit cards detail (JSON)

Action: GET
Endpoint: /views/credit/cards/detail
Retrieve card details for the credit accounts in a program. This endpoint returns a JSON object that contains an array of records matching your filter query.

Sample response body

The following sample shows a representative response for a GET request to the /views/credit/cards/detail?program=my_program&fields=post_date,currency,amount_to_send endpoint.
JSON
{
    "total": 243,
    "is_more": false,
    "count": 243,
    "info": {},
    "start_date": "2021-05-01T00:00:00+0000",
    "end_date": "2021-05-05T00:00:00+0000",
    "last_run_time": "",
    "schema": [
        {
            "field": "last_four",
            "type": "TEXT",
            "scale": null,
            "character_maximum_length": 4.0,
            "description": null,
            "display": "Last Four",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "card_state",
            "type": "TEXT",
            "scale": null,
            "character_maximum_length": 36.0,
            "description": "The current state of the card: unactivated, active, suspended, or terminated.",
            "display": "Card State",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "end_date",
            "type": "TIMESTAMP_NTZ",
            "scale": null,
            "character_maximum_length": null,
            "description": null,
            "display": "End Date",
            "units": null,
            "has_total": false,
            "date_format": "YYYY-MM-DD HH:mm:ss",
            "is_filter_only": false
        }
    ],
    "records": [
        {
            "last_four": "0000",
            "card_state": ACTIVE,
            "end_date": "2021-05-05T00:00:00+0000"
        },
        {
            "last_four": "1234",
            "card_state": ACTIVE,
            "end_date": "2021-05-05T00:00:00+0000"
        },

        ...

        {
            "last_four": "7890",
            "card_state": ACTIVE,
            "end_date": "2021-05-05T00:00:00+0000"
        }
    ]
}

Retrieve credit cards detail (file export)

Action: GET
Endpoint: /views/credit/cards/detail/{export_type}
Retrieve card details for credit accounts in a program and export to a file. This endpoint asynchronously generates a file in the specified format and returns a job token for retrieving the file when it is completed. The file contains a list of records matching your filter query.

URL path parameters

FieldsDescription
export_type

string
Required
File format in which to export the data.

Allowable Values:

csv

Query parameters

FieldsDescription
compress

string
optional
Type of file compression for the exported file.

Allowable Values:

gz, zip

Default value:
gz

Sample response body

JSON
{
    "token": "111122226c444d8888888a9999ae11111db63da4.csv.gz"
}

Retrieve schema for credit cards detail

Action: GET
Endpoint: /views/credit/cards/detail/schema
Retrieve a JSON representation of the credit cards detail view schema. The schema object contains an array of objects that describe the available columns and the data type of each column.

Sample response body

The following sample shows a representative response for a GET request to the /views/credit/cards/detail/schema?program=my_program endpoint. The schema can vary based on the data you are authorized to access (based on the credentials you provide in your request).
JSON
[
    {
        "field": "card_token",
        "type": "character varying(36)",
        "display": "Card Token",
        "description": "The token of the card; unique within a program.",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "account_token",
        "type": "character varying(36)",
        "display": "Account Token",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "user_token",
        "type": "character varying(36)",
        "display": "User Token",
        "description": "A unique identifier (within a given Marqeta Card Program) for a user record. All other references to a user token will be prefaced with account, business, parent or acting to specify which user token is referenced.",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "last_four",
        "type": "character varying(4)",
        "display": "Last Four",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "card_product",
        "type": "character varying(36)",
        "display": "Card Product",
        "description": null,
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "card_state",
        "type": "character varying(36)",
        "display": "Card State",
        "description": "The current state of the card: unactivated, active, suspended, or terminated.",
        "enum_values": [],
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "end_date",
        "type": "timestamp without time zone",
        "display": "End Date",
        "description": null,
        "date_format": "YYYY-MM-DD HH:mm:ss",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "created_time",
        "type": "timestamp without time zone",
        "display": "Created Time",
        "description": "The time the ACH verification was created.",
        "date_format": "YYYY-MM-DD HH:mm:ss",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "report_load_timestamp",
        "type": "timestamp without time zone",
        "display": "Report Load Timestamp",
        "description": "UTC time when the record was loaded into Marqeta's reporting system",
        "date_format": "YYYY-MM-DD",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    }
]