Skip to content

Instantly share code, notes, and snippets.

@shinson
Forked from kevinli-work/download_v2_count.md
Last active October 25, 2017 17:10
Show Gist options
  • Save shinson/ca3203bef9109b1eb675a003a5cf9242 to your computer and use it in GitHub Desktop.
Save shinson/ca3203bef9109b1eb675a003a5cf9242 to your computer and use it in GitHub Desktop.
Download v2 Transaction Count API

Download Transaction Count API

/v2/download/count (POST)

Returns the number of transactions that would be included in a download request for the given filter set.

Request

POST a JSON body:

{
    "filters": {
        "time_period": [
            {
                "start_date": "2001-01-01",
                "end_date": "2001-01-31"
            }
        ]
    }
}

Request Parameters Description

Response

{
    "transaction_rows_gt_limit": true
}
  • transaction_rows_gt_limit is a boolean returning whether the transaction count is over the maximum row limit.

Note: This endpoint will only count the rows for transactions. Frontend will disable the download button whenever transaction row count exceeds 500,000 regardless of the award row count. We'll name the key transaction_rows in case we need to add award counts in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment