Skip to content

Instantly share code, notes, and snippets.

@nmonga91
Last active June 8, 2017 20:48
Show Gist options
  • Save nmonga91/fbc8c26739b66c3136ac4184fed6e665 to your computer and use it in GitHub Desktop.
Save nmonga91/fbc8c26739b66c3136ac4184fed6e665 to your computer and use it in GitHub Desktop.
Award Type Endpoint

Retrieve awarded amounts for all award types

Route: /api/v2/award_spending/award_type

Method: GET

This route sends a request to the backend to retrieve awarded amounts for all award types for a specified awarding agency based on the fiscal year.

Request Example

/api/v2/award_spending/award_type?fiscal_year=2017&awarding_agency_id=1

Query Parameters Description

  • fiscal_year - required - an integer representing the fiscal year to filter on
  • awarding_agency_id - required - an integer representing the toptier agency ID to filter on

Response (JSON)

HTTP Status Code: 200

"results":
[
  {
    "award_type": "Contracts",
    "obligated_amount": "15000000000"
  },
  {
    "award_type": "Grants",
    "obligated_amount": "26000000000"
  }
]

Errors

Possible HTTP Status Codes:

  • 400 : Missing parameters
  • 500 : All other errors
{
  "message": "Sample error message"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment