Skip to content

Instantly share code, notes, and snippets.

@nmonga91
Last active July 13, 2017 19:21
Show Gist options
  • Save nmonga91/b4b27cc3e04e3a6a5e692a23168f6c84 to your computer and use it in GitHub Desktop.
Save nmonga91/b4b27cc3e04e3a6a5e692a23168f6c84 to your computer and use it in GitHub Desktop.
Funding Agency Autocomplete

Retrieve Funding Agencies for the autocomplete text box

Route: /api/v2/autocomplete/funding_agency/

Method: POST

This route sends a request to the backend to retrieve funding agencies matching the specified search text.

Request example

{
	"search_text": "test",
	"limit": 10
}

Request Parameters Description

  • search_text - required - a string that contains the search term(s) on which to search for the funding agencies
  • limit - optional - an integer representing the number of desired entries. It can be an integer or a string representation of an integer. Defaults to 10.

Response (JSON)

{
	"results": {
		[
			{
				"id": 1301,
				"toptier_flag": false,
				"toptier_agency": {
					"cgac_code": "097",
					"fpds_code": "9700",
					"abbreviation": "DOD",
					"name": "Department of Defense"
				},
				"subtier_agency": {
					"subtier_code": "5703",
					"abbreviation": "",
					"name": "Air Force Operational Test and Evaluation Center "
				},
				"office_agency": null
			},
			...
		]
	}
}

Errors

Possible HTTP Status Codes:

  • 400 : Missing parameters or limit is not a valid, positive integer
  • 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