Skip to main content
Use this view endpoint to retrieve authorization transaction data at a specified aggregation level. For example, if you choose an aggregation level of detail, each row represents a single authorization transaction. The data is derived from the transaction-related messages sent to and from 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 authorization data (JSON)

Action: GET
Endpoint: /views/authorizations/{time_agg}
Retrieve authorization transaction data, aggregated over the specified time period. This endpoint returns a JSON object that contains an array of records matching your filter query.

URL path parameters

FieldsDescription
time_agg

string
Required
Time period over which to aggregate the data. For more information, see Data aggregation levels.

Allowable Values:
detail, day, week, month

Sample response body

The following sample shows a representative response for a GET request to the /views/authorizations/detail?program=my_program&fields=transaction_timestamp,acting_user_token,transaction_amount endpoint.
JSON
{
    "total": 372,
    "is_more": false,
    "count": 372,
    "info": {},
    "start_date": "2023-02-22T01:06:08+0000",
    "end_date": "2023-02-22T22:00:11+0000",
    "last_run_time": "",
    "schema": [
        {
            "field": "transaction_timestamp",
            "type": "timestamp without time zone",
            "display": "Transaction Timestamp",
            "units": null,
            "has_total": false,
            "date_format": "YYYY-MM-DD HH:mm:ss",
            "is_filter_only": false
        },
        {
            "field": "acting_user_token",
            "type": "character varying(128)",
            "display": "Acting User Token",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "transaction_amount",
            "type": "numeric(14,2)",
            "display": "Transaction Amount",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        }
    ],
    "records": [
        {
             "transaction_timestamp": "2023-02-22T22:00:11.000Z",
             "acting_user_token": "720edb9c-2ccc-4176-a55b-58b54badg26e",
             "transaction_amount": 128.0
         },
          ...
    ]
}

Retrieve authorization data (file export)

Action: GET
Endpoint: /views/authorizations/{time_agg}/{export_type}
Retrieve authorization transaction data, aggregated over the specified time period. 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
time_agg

string
Required
Time period over which to aggregate the data. For more information, see Data aggregation levels.

Allowable Values:
detail, day, week, month
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 authorization schema

Action: GET
Endpoint: /views/authorizations/{time_agg}/schema
Retrieve a JSON representation of the authorizations view schema for data aggregated over the specified time period. The schema object contains an array of objects that describe the available columns and the data type of each column.

URL path parameters

FieldsDescription
time_agg

string
Required
Time period over which to aggregate the data. For more information, see Data aggregation levels.

Allowable Values:
detail, day, week, month

Sample response body

The following sample shows a representative response for a GET request to the /views/authorizations/detail/schema?program=my_program endpoint. The schema can vary based on the data aggregation level and the data you are authorized to access (based on the credentials you provide in your request).
JSON
[
    {
        "field": "program",
        "type": "character varying(128)",
        "description": "The name of the card program.",
        "display": "Program",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "bank",
        "type": "character varying(128)",
        "description": "The bank under which the program operates.",
        "display": "Bank",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "transaction_token",
        "type": "character varying(256)",
        "description": "The token of the transaction; unique within a program.",
        "display": "Transaction Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "transaction_timestamp",
        "type": "timestamp without time zone",
        "description": "The date and time when a transaction occurred. Displayed in UTC.",
        "display": "Transaction Timestamp",
        "units": null,
        "has_total": false,
        "date_format": "YYYY-MM-DD HH:mm:ss",
        "is_filter_only": false
    },
    {
        "field": "initiating_transaction_token",
        "type": "character varying(256)",
        "description": "The token identifying the initial transaction in a chain of transactions (usually an authorization).",
        "display": "Initiating Transaction Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "transaction_completion_token",
        "type": "integer",
        "description": "The token identifying the record that completed a transaction.",
        "display": "Transaction Completion Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "transaction_status",
        "type": "character varying(128)",
        "description": "The status of the transaction.",
        "display": "Transaction Status",
        "enum_values": [],
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "transaction_type",
        "type": "character varying(128)",
        "description": "A type field that categorizes the transaction event.",
        "display": "Transaction Type",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "transaction_processing_type",
        "type": "character varying(128)",
        "description": "The method used to capture the card PAN (chip, magstripe, contactless, chip fallback, token). Chip fallback is used when a chip-capable terminal fails and requires the use of the magstripe.",
        "display": "Transaction Processing Type",
        "enum_values": [],
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "displaymessage",
        "type": "character varying(128)",
        "description": "A user-friendly message describing the outcome of a transaction.",
        "display": "Displaymessage",
        "enum_values": [],
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "network",
        "type": "character varying(128)",
        "description": "The card network on which a transaction took place.",
        "display": "Network",
        "enum_values": [],
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "sub_network",
        "type": "character varying(128)",
        "description": "The subnetwork used by a transaction (VisaPlus, VisaNet, VisaInterlink, VisaNet Debit, Maestro, Cirrus, or Pulse).",
        "display": "Sub Network",
        "enum_values": [],
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "account_user_token",
        "type": "character varying(128)",
        "description": "The unique user token for the associated user account.",
        "display": "Account User Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "business_user_token",
        "type": "character varying(128)",
        "description": "The business token associated with an acting cardholder or parent cardholder.",
        "display": "Business User Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "parent_user_token",
        "type": "character varying(128)",
        "description": "The unique user token identifying the parent of the user or business account.",
        "display": "Parent User Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "acting_user_token",
        "type": "character varying(128)",
        "description": "The unique user token of a cardholder. This can be seen in the user view and transaction level views.",
        "display": "Acting User Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "acting_first_name",
        "type": "character varying(128)",
        "description": "The first name of the cardholder associated with the card that transacted.",
        "display": "Acting First Name",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "acting_last_name",
        "type": "character varying(128)",
        "description": "The last name of the cardholder associated with the card that transacted.",
        "display": "Acting Last Name",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "business_name",
        "type": "character varying(128)",
        "description": "The name of the business associated with a cardholder, acting cardholder, or business account.",
        "display": "Business Name",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "company",
        "type": "character varying(128)",
        "description": "The name of the company associated with the cardholder, if applicable.",
        "display": "Company",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "acting_card_token",
        "type": "character varying(128)",
        "description": "The token identifying a card within a card program. This can be seen in the cards view and transaction level views.",
        "display": "Acting Card Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "acting_card_product",
        "type": "character varying(128)",
        "description": "The name of the card product related to a card; each card product has unique spend controls.",
        "display": "Acting Card Product",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "acting_card_last_four",
        "type": "character varying(4)",
        "description": "The last four digits of a card used in a transaction.",
        "display": "Acting Card Last Four",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "merchant",
        "type": "character varying(128)",
        "description": "The merchant associated with the transaction; where a transaction took place.",
        "display": "Merchant",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "clean_merchant",
        "type": "character varying(128)",
        "description": "A human-readable merchant name when available.",
        "display": "Clean Merchant",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "merchant_category_code",
        "type": "integer",
        "description": "The merchant category code (MCC) associated with a transaction.",
        "display": "Merchant Category Code",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "merchant_category_code_group",
        "type": "character varying(2000)",
        "description": "The merchant category code (MCC) group associated with a transaction.",
        "display": "Merchant Category Code Group",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "merchant_category_code_description",
        "type": "character varying(1000)",
        "description": "The description of the merchant category code (MCC) associated with a transaction.",
        "display": "Merchant Category Code Description",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "merchant_country",
        "type": "character varying(128)",
        "description": "The country of a merchant location where a transaction has taken place.",
        "display": "Merchant Country",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "merchant_state",
        "type": "character varying(128)",
        "description": "The state or province of a merchant location where a transaction has taken place.",
        "display": "Merchant State",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "merchant_city",
        "type": "character varying(128)",
        "description": "The city of a merchant location where a transaction has taken place.",
        "display": "Merchant City",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "standin_approved_by",
        "type": "character varying(128)",
        "description": "Designates the means in which a transaction was approved within a JIT transaction flow.",
        "display": "Standin Approved By",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "currency",
        "type": "character varying(10)",
        "description": "The abbreviated currency code.",
        "display": "Currency",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "transaction_amount",
        "type": "numeric(14,2)",
        "description": "The amount of the transaction or sum total amount of multiple, relevant transactions.",
        "display": "Transaction Amount",
        "units": "USD",
        "has_total": true,
        "is_filter_only": false
    },
    {
        "field": "approval_code",
        "type": "character varying(18)",
        "description": null,
        "display": "Approval Code",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "networkreferenceid",
        "type": "character varying(46)",
        "description": null,
        "display": "Networkreferenceid",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "core_api_transaction_token",
        "type": "character varying(36)",
        "description": null,
        "display": "Core Api Transaction Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "core_api_initiating_transaction_token",
        "type": "character varying(36)",
        "description": null,
        "display": "Core Api Initiating Transaction Token",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    }
]