Contract Download
POST
/api/v2/download/contract/Creates a new download job for the requested award and returns a link to a zipped file containing contract award data
Request
curl -X POST 'https://api.usaspending.gov/api/v2/download/contract/' \
-H 'Content-Type: application/json' \
-d '{
"award_id": "CONT_AWD_N0002404C2105_9700_-NONE-_-NONE-"
}'Request body
award_idstringRequiredfile_formatenum (string)The format of the file(s) in the zip file containing the data.
csvtsvpstxt
Try it
Runs against the live API. Responses are real data.
POST
/api/v2/download/contract/Response · 200
status_urlstringRequiredThe endpoint used to get the status of a download.
file_namestringRequiredIs the name of the zipfile containing CSVs that will be generated (file_name is timestamp followed by
_transactionsor_awards).file_urlstringRequiredThe URL for the file.
download_requestobjectRequiredThe JSON object used when processing the download.
{
"status_url": "http://localhost:8000/api/v2/download/status?file_name=CONT_N0002404C2105_2020-01-13_H21M07S31205632.zip",
"file_name": "CONT_N0002404C2105_2020-01-13_H21M07S31205632.zip",
"file_url": "/csv_downloads/CONT_N0002404C2105_2020-01-13_H21M07S31205632.zip",
"download_request": {
"account_level": "treasury_account",
"award_id": 25885000,
"columns": [],
"download_types": [
"contract_federal_account_funding",
"contract_transactions",
"sub_contracts"
],
"file_format": "csv",
"filters": {
"award_id": 25885000,
"award_type_codes": [
"B",
"C",
"A",
"D"
]
},
"include_data_dictionary": true,
"include_file_description": {
"destination": "ContractAwardSummary_download_readme.txt",
"source": "/usaspending-api/usaspending_api/data/ContractSummary_download_readme.txt"
},
"is_for_assistance": false,
"is_for_contract": true,
"is_for_idv": false,
"limit": 500000,
"piid": "N0002404C2105",
"request_type": "contract"
}
}Recent changes
Generated from contracts/v2/download/contract.md in the USAspending API repo.