Skip to content

Instantly share code, notes, and snippets.

@russellbodine
Created July 7, 2017 15:54
Show Gist options
  • Save russellbodine/6d1585b54b6febeb92accef32f4bc80c to your computer and use it in GitHub Desktop.
Save russellbodine/6d1585b54b6febeb92accef32f4bc80c to your computer and use it in GitHub Desktop.

Retrieve PSC from the autocomplete text box

Route: /api/v2/autocomplete/PSC/

Method: POST

This route sends a request to the backend to retrieve a partial or complete 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 recipient PSC
  • limit - optional - an integer representing the number of desired entries per budget title type. It can be an integer or a string representation of an integer.

Response (JSON)

{
	"results": {
		[
			{
				"award_id": 1,
				"NAICS": "COMMERCIAL TESTING LABORATORY, INC",
			}
			...
		]
	}
}

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