Marqeta.com
Support
/
5 minute read
February 22, 2021

Activity Balances

Use this view endpoint to retrieve activity balance data. Activities include loading and spending events. You can break out your data by credit and debit types and aggregate the data by day, or break out your data by the type of transaction (load, PIN, or signature) and aggregate the data by actor. In both cases, you can also specify the level of card network-specific detail. 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 activity data by day (JSON)

Action:

GET

Endpoint:
/views/activitybalances/day

Retrieve activity balance data, broken out by credit and debit types and aggregated by day. This endpoint returns a JSON object that contains an array of records matching your filter query.

Query parameters
Fields Description

expand

string
Optional

Expandable fields for which to retrieve additional details. You can specify any number of expandable fields in a comma-delimited list.

For example,

expand=pin_purchases_net
breaks out PIN purchases by card network.

Allowable Values:

pin_purchases_net
,
sig_purchases_net

Sample response body

The following sample shows a representative response for a

GET
request to the
/views/activitybalances/day&program=my_program&fields=corrected_post_date,starting_balance,ending_balance
endpoint.

Copied

Is this helpful?

Yes
No

Retrieve activity data by day (file export)

Action:

GET

Endpoint:
/views/activitybalances/day/{export_type}

Retrieve activity balance data, broken out by credit and debit types and aggregated by day. 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
Fields Description

export_type

string
Required

File format in which to export the data.

Allowable Values:

csv

Query parameters
Fields Description

expand

string
Optional

Expandable fields for which to retrieve additional details. You can specify any number of expandable fields in a comma-delimited list.

For example,

expand=pin_purchases_net
breaks out PIN purchases by card network.

Allowable Values:

pin_purchases_net
,
sig_purchases_net

compress

string
Optional

Type of file compression for the exported file.

Allowable Values:

gz, zip

Default value:
gz

Sample response body
Copied

Is this helpful?

Yes
No

Retrieve schema for activity balances by day

Action:

GET

Endpoint:
/views/activitybalances/day/schema

Retrieve a JSON representation of the activity balance view schema for data broken out by credit and debit types and aggregated by day. 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/activitybalances/day/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).

Copied

Is this helpful?

Yes
No

Retrieve activity data by actor (JSON)

Action:

GET

Endpoint:
/views/activitybalances/{account_agg}

Retrieve activity balance data, broken out by type of transaction (load, PIN, or signature) and aggregated by the specified type of account. This endpoint returns a JSON object that contains an array of records matching your filter query.

URL path parameters
Fields Description

account_agg

string
Required

Type of account for which to aggregate the data. For more information, see Data aggregation levels.

Allowable Values:

actor

Query parameters
Fields Description

expand

string
Optional

Expandable fields for which to retrieve additional details. You can specify any number of expandable fields in a comma-delimited list.

For example,

expand=pin_purchases_net
breaks out PIN purchases by card network.

Allowable Values:

pin_purchases_net
,
sig_purchases_net

Sample response body

The following sample shows a representative response for a

GET
request to the
/views/activitybalances/actor?program=my_program&fields=currency,ach_loads_net,credit_or_debit_card_loads_net
endpoint.

Copied

Is this helpful?

Yes
No

Retrieve activity data by actor (file export)

Action:

GET

Endpoint:
/views/activitybalances/{account_agg}/{export_type}

Retrieve activity balance data, broken out by type of transaction (load, PIN, or signature) and aggregated by the specified type of account. 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
Fields Description

account_agg

string
Required

Type of account for which to aggregate the data. For more information, see Data aggregation levels.

Allowable Values:

actor

export_type

string
Required

File format in which to export the data.

Allowable Values:

csv

Query parameters
Fields Description

expand

string
Optional

Expandable fields for which to retrieve additional details. You can specify any number of expandable fields in a comma-delimited list.

For example,

expand=pin_purchases_net
breaks out PIN purchases by card network.

Allowable Values:

pin_purchases_net
,
sig_purchases_net

compress

string
Optional

Type of file compression for the exported file.

Allowable Values:

gz, zip

Default value:
gz

Sample response body
Copied

Is this helpful?

Yes
No

Retrieve schema for activity balances by actor

Action:

GET

Endpoint:
/views/activitybalances/{account_agg}/schema

Retrieve a JSON representation of the activity balance view schema for data broken out by the type of transaction (load, PIN, or signature) and aggregated by the specified type of account. The schema object contains an array of objects that describe the available columns and the data type of each column.

URL path parameters
Fields Description

account_agg

string
Required

Account for which to aggregate the data. For more information, see Data aggregation levels.

Allowable Values:

actor

Sample response body

The following sample shows a representative response for a

GET
request to the
/views/activitybalances/actor/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).

Copied

Is this helpful?

Yes
No

Feedback on this page?

If you feel we can do anything better, please let our team know.