Views

Use this endpoint to retrieve a list of the available view endpoints from the DiVA API. Each view endpoint provides access to a specific type of data on the Marqeta platform that is aggregated at a specific level. For example, a view can provide access to authorization transaction data aggregated by week. For more information about data aggregation levels, see Response Customization.

Retrieve views

Action: GET
Endpoint: /views

This endpoint returns an array of objects that describe the available views. Each object contains metadata about a view, such as the default filters and aggregation level, if available.

Body field details (response)

Name Type Required? Description Allowable Values
default_date string Yes Date field used in the default filter for API requests without a date range in the query filter. Name of a date field in the view schema.
default_filter object Yes Object that describes the default filter for API requests without a date range in the query filter.
display string Yes Summary field for the related report in Program Dashboard.
endpoint string Yes Relative URL to the DiVA API endpoint for retrieving the view.
expansion object Yes Object that describes the expandable fields for a schema. Expanding a field value returns a more detailed breakdown of data for that field. For example, you can pass the expand=pin_purchase_net parameter to the /views/activitybalances/day endpoint to break out PIN purchases by card network (such as maestro_pin_net and cirrus_pin_net).

Null if no values are expandable.
fields_domain string Yes List of all fields that are available in the view schema. Comma-delimited list of fields in the view schema.
filter_domain string Yes List of fields that are not returned as data in the view but that you can use for filtering results (indicated by the is_filter_only field in the view schema). Comma-delimited list of fields in the view schema.
report string Yes Category of the related report in Program Dashboard.
schema string Yes Relative URL to the DiVA API endpoint for retrieving the view schema.
type string Yes Name of the related report in Program Dashboard.

The default_filter object (response)

Name Type Required? Description Allowable Values
fields string Yes View fields returned by default for API requests without a field filter. Comma-delimited list of fields in the view schema.
default_date_field_name string Yes Date range filter applied for API requests without a date range in the query filter. The default date range includes results for a recent period of time based on when the query is run. Date range following the query filter syntax.

The expansion object (response)

Name Type Required? Description Allowable Values
expand_argument_1

...

expand_argument_N
string Yes Name of an argument to the expand query parameter, and list of additional fields that the argument returns. For example,

"expansion": {
  "pin_purchases_net": "maestro_pin_net,...",
  "sig_purchases_net": "mastercard_sig_purchases,...",
  }
Name-value pairs of an argument name and a comma-delimited list of additional field names.

Sample response body

The following sample shows a representative JSON response for a GET request to the /views?program=my_program endpoint.

[
{
"default_date": "post_date",
"default_filter": {
"fields": "post_date,starting_balance,ach_loads_net,credit_or_debit_card_loads_net,marqeta_loads_net,partner_funds_loads,jit_loads_net,sig_purchases_net,
in_purchases_net,chargeback,currency_conversion_fees,program_fees,ending_balance",
"post_date": "2018-04-29..2018-05-29"
},
"display": "Overview",
"endpoint": "activitybalances/day",
"expansion": {
"pin_purchases_net": "maestro_pin_net,cirrus_pin_net,interlink_pin_net,plus_pin_net,netdebit_pin_net,pulse_pin_net",
"sig_purchases_net": "mastercard_sig_purchases,mastercard_sig_returns,visa_sig_purchases,visa_sig_returns,discover_sig_purchases,discover_sig_returns"
},
"fields_domain": "post_date,starting_balance,ach_loads_net,credit_or_debit_card_loads_net,marqeta_loads_net,partner_funds_loads,jit_loads_net,sig_purchases_net,in_purchases_net,chargeback,currency_conversion_fees,program_fees,ending_balance",
"filter_domain": null,
"report": "Balance",
"schema": "activitybalances/day/schema",
"type": "Day"
},
{
"default_date": "post_date",
"default_filter": {
"fields":
"post_date,starting_balance,ach_loads_net,credit_or_debit_card_loads_net,partner_funds_loads,jit_loads_net,mastercard_sig_purchases,mastercard_
ig_returns,visa_sig_purchases,visa_sig_returns,discover_sig_purchases,discover_sig_returns,maestro_pin_net,cirrus_pin_net,interlink_pin_net,plus_pi
_net,netdebit_pin_net,pulse_pin_net,chargeback,currency_conversion_fees,program_fees,ending_balance",
"post_date": "2018-04-29..2018-05-29"
},
"display": "Network Detail",
"endpoint": "activitybalances/day/networkdetail",
"expansion": null,
"fields_domain":
"post_date,starting_balance,ach_loads_net,credit_or_debit_card_loads_net,partner_funds_loads,jit_loads_net,mastercard_sig_purchases,mastercard_
ig_returns,visa_sig_purchases,visa_sig_returns,discover_sig_purchases,discover_sig_returns,maestro_pin_net,cirrus_pin_net,interlink_pin_net,plus_pi
_net,netdebit_pin_net,pulse_pin_net,chargeback,currency_conversion_fees,program_fees,ending_balance",
"filter_domain": null,
"report": "Balance",
"schema": "activitybalances/day/networkdetail/schema",
"type": "Day"
},
...
]