Program Reserve Balances

Use this view endpoint to compare your program account balances against the program reserve requirement. This endpoint is available only for programs that have a reserve requirement. The data is derived from the balance-related activity on the Marqeta platform. If the reserve is not met, the amount owed is shown in the reserve_owed_amount field.

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 program reserve balance data (JSON)

Action: GET
Endpoint: /views/programreservebalances/day

Retrieve program reserve balance data aggregated by day. 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/programreservebalances/day?program=my_program endpoint.

{
    "total": 16,
    "is_more": false,
    "count": 16,
    "info": {},
    "start_date": "2018-07-22T00:00:00+0000",
    "end_date": "2018-08-06T00:00:00+0000",
    "last_run_time": "2018-08-06T16:08:10Z",
    "schema": [
        {
            "field": "program",
            "type": "character varying(128)",
            "display": "Program",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "bank",
            "type": "character varying(128)",
            "display": "Bank",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "post_date",
            "type": "date",
            "display": "Post Date",
            "units": null,
            "has_total": false,
            "date_format": "YYYY-MM-DD",
            "is_filter_only": false
        },
        {
            "field": "day_of_week",
            "type": "character varying(10)",
            "display": "Day Of Week",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "amount_to_send",
            "type": "numeric(14,2)",
            "display": "Amount To Send",
            "units": "USD",
            "has_total": true,
            "is_filter_only": false
        },
        {
            "field": "ending_bank_balance",
            "type": "numeric(14,2)",
            "display": "Ending Bank Balance",
            "units": "USD",
            "has_total": true,
            "is_filter_only": false
        },
        {
            "field": "reserve_requirement_description",
            "type": "character varying(64)",
            "display": "Reserve Requirement Description",
            "units": null,
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "reserve_requirement_amount",
            "type": "numeric(14,2)",
            "display": "Reserve Requirement Amount",
            "units": "USD",
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "reserve_owed_amount",
            "type": "numeric(14,2)",
            "display": "Reserve Owed Amount",
            "units": "USD",
            "has_total": false,
            "is_filter_only": false
        },
        {
            "field": "last_modified_time",
            "type": "timestamp without time zone",
            "display": "Last Modified Time",
            "units": null,
            "has_total": false,
            "date_format": "YYYY-MM-DD",
            "is_filter_only": false
        }
    ],
    "records": [
        {
            "program": "my_program",
            "bank": "my_program_bank",
            "post_date": "2018-08-06T00:00:00.000Z",
            "day_of_week": "Monday",
            "amount_to_send": -449615.65,
            "ending_bank_balance": 4897234.5,
            "reserve_requirement_description": "3 days or $50K",
            "reserve_requirement_amount": 3060469.02,
            "reserve_owed_amount": 0,
            "last_modified_time": "2018-08-06T16:22:10.000Z"
        },
        {
            "program": "my_program",
            "bank": "my_program_bank",
            "post_date": "2018-08-05T00:00:00.000Z",
            "day_of_week": "Sunday",
            "amount_to_send": -1053848.33,
            "ending_bank_balance": 5346850.15,
            "reserve_requirement_description": "3 days or $50K",
            "reserve_requirement_amount": 3309433.87,
            "reserve_owed_amount": 0,
            "last_modified_time": "2018-08-06T16:22:10.000Z"
        },
        {
            "program": "my_program",
            "bank": "my_program_bank",
            "post_date": "2018-08-04T00:00:00.000Z",
            "day_of_week": "Saturday",
            "amount_to_send": -1176051.08,
            "ending_bank_balance": 6400698.48,
            "reserve_requirement_description": "3 days or $50K",
            "reserve_requirement_amount": 3302154.02,
            "reserve_owed_amount": 0,
            "last_modified_time": "2018-08-06T16:22:10.000Z"
        },
        ...
    ]
}


Retrieve program reserve balance data (file export)

Action: GET
Endpoint: /views/programreservebalances/day/{export_type}

Retrieve program reserve balance data 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.

Path parameters

Name Type Required? Description Allowable Values
export_type string Yes File format in which to export the data. csv | xlsx

Query parameters

Name Type Required? Description Allowable Values
compress string No Type of file compression for the exported file. gz | zip

Default: gz

Sample response body

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

{
"token":"cc57379c686e9cfe064ebc421346173632907c88.csv.gz"
}


Retrieve schema for program reserve balance

Action: GET
Endpoint: /views/programreservebalances/day/schema

Retrieve a JSON representation of the program reserve balance view schema for data 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/programreservebalances/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).

[
    {
        "field": "program",
        "type": "character varying(128)",
        "display": "Program",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "bank",
        "type": "character varying(128)",
        "display": "Bank",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "post_date",
        "type": "date",
        "display": "Post Date",
        "units": null,
        "has_total": false,
        "date_format": "YYYY-MM-DD",
        "is_filter_only": false
    },
    {
        "field": "day_of_week",
        "type": "character varying(10)",
        "display": "Day Of Week",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "currency",
        "type": "character varying(10)",
        "display": "Currency",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "currency_code",
        "type": "integer",
        "display": "Currency Code",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "amount_to_send",
        "type": "numeric(14,2)",
        "display": "Amount To Send",
        "units": null,
        "has_total": true,
        "is_filter_only": false
    },
    {
        "field": "ending_bank_balance",
        "type": "numeric(14,2)",
        "display": "Ending Bank Balance",
        "units": null,
        "has_total": true,
        "is_filter_only": false
    },
    {
        "field": "reserve_requirement_description",
        "type": "character varying(64)",
        "display": "Reserve Requirement Description",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "reserve_minimum_amount",
        "type": "numeric(14,2)",
        "display": "Reserve Minimum Amount",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "reserve_avg_week_amount",
        "type": "numeric(14,2)",
        "display": "Reserve Avg Week Amount",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "reserve_days_amount",
        "type": "numeric(14,2)",
        "display": "Reserve Days Amount",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "reserve_requirement_amount",
        "type": "numeric(14,2)",
        "display": "Reserve Requirement Amount",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "reserve_owed_amount",
        "type": "numeric(14,2)",
        "display": "Reserve Owed Amount",
        "units": null,
        "has_total": false,
        "is_filter_only": false
    },
    {
        "field": "last_modified_time",
        "type": "timestamp without time zone",
        "display": "Last Modified Time",
        "units": null,
        "has_total": false,
        "date_format": "YYYY-MM-DD",
        "is_filter_only": false
    }
]