Route: /api/v2/search/spending_by_award/
Method: POST
This route takes award filters and fields, and returns the fields of the filtered awards.
field: Defines what award variables are returned.
filter: Defines how the awards are filtered. The filter object is defined here.
https://gist.github.com/nmonga91/ba0e172b6d3f2aaf50f0ef1bb5d708bc#recipient-location
limit(OPTIONAL): how many results are returned
page (OPTIONAL): what page of results are returned
sort (OPTIONAL): Optional parameter indicating what value results should be sorted by. Valid options are any of the fields in the JSON objects in the response. Defaults to the first field
provided.
order (OPTIONAL): Optional parameter indicating what direction results should be sorted by. Valid options include asc
for ascending order or desc
for descending order. Defaults to asc
.
{
"filters": {
"award_type_codes": ["10"],
"agencies": [
{
"type": "awarding",
"tier": "toptier",
"name": "Social Security Administration"
},
{
"type": "awarding",
"tier": "subtier",
"name": "Social Security Administration"
},
{
"type": "funding",
"tier": "toptier",
"name": "Social Security Administration"
},
{
"type": "funding",
"tier": "subtier",
"name": "Social Security Administration"
}
],
"legal_entities": [779928],
"recipient_scope": "domestic",
"recipient_locations": [650597],
"recipient_type_names": ["Individual"],
"place_of_performance_scope": "domestic",
"place_of_performance_locations": [60323],
"award_amounts": [
{
"lower_bound": 1500000.00,
"upper_bound": 1600000.00
}
],
"award_ids": [1018950]
},
"fields": ["Award ID", "Recipient Name", "Start Date", "End Date", "Award Amount", "Awarding Agency", "Awarding Sub Agency", "Award Type", "Funding Agency", "Funding Sub Agency"],
"sort": "Recipient Name",
"order": "desc"
}
{
"limit": 10,
"results": [
{
"internal_id": 1018950,
"Award ID": null,
"Recipient Name": "MULTIPLE RECIPIENTS",
"Start Date": null,
"End Date": null,
"Award Amount": 1573663,
"Awarding Agency": "Social Security Administration",
"Awarding Sub Agency": "Social Security Administration",
"Award Type": "10",
"Funding Agency": "Social Security Administration",
"Funding Sub Agency": "Social Security Administration"
}
],
"page_metadata": {
"page": 1,
"hasNext": true
}
}
page
: Page # that came in as part of the POST requesthasNext
: Boolean flags to indicate if the next page exists
Possible HTTP Status Codes:
- 400 : Missing parameters or limit is not a valid, positive integer
- 500 : All other errors
{
"detail": "Sample error message"
}