Skip to content

Instantly share code, notes, and snippets.

@bsweger
Last active June 7, 2017 01:03
Show Gist options
  • Save bsweger/91d85b7f4ef1fb9c4f0a54c541ef5da6 to your computer and use it in GitHub Desktop.
Save bsweger/91d85b7f4ef1fb9c4f0a54c541ef5da6 to your computer and use it in GitHub Desktop.
financial_balances_agency.md

Retrieve financial balances by agency and fiscal year

Route: /api/v2/financial_balances/agencies

Method: GET

This route retrieves financial balance information by funding agency and fiscal year

Sample Request

/api/v2/financial_balances/agencies?funding_agency=775&fiscal_year=2017

Request Params

  • fiscal_year - required - an integer representing the fiscal year to filter on
  • funding_agency_id - required - an integer representing the funding agency ID to filter on (should be an agency_id flagged as top tier)

Response (JSON)

"results": [
    {
      "budget_authority_amount": "120112040.58",
      "obligated_amount": "299640.00",
      "outlay_amount": "8063724.83"
    }
]
@bsweger
Copy link
Author

bsweger commented Jun 5, 2017

This is slightly different than the proposed POST POST /financial_balances/agencies/{pk} in the Word doc. It leaves off the agency {pk} piece of the endpoint because:

  1. passing the agency id in as a parameter instead makes this consistent with the other agency endpoints and
  2. the agencies/{pk} construct makes it seem like the the response would be an agency object, when it's actually a financial_balances object
  3. amount field names have been updated to reflect last week's Slack convo
  4. fiscal_year removed from response since it's required as a request param

@russellbodine
Copy link

👍

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