Skip to content

Instantly share code, notes, and snippets.

@kevinli-work
Created October 6, 2017 14:57
Show Gist options
  • Save kevinli-work/478bb9645e260a9f6c6ced443bd3e3bb to your computer and use it in GitHub Desktop.
Save kevinli-work/478bb9645e260a9f6c6ced443bd3e3bb 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": 510123
}
  • transactions_rows is the number of rows that would be returned in a transaction download request

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