Skip to content

Instantly share code, notes, and snippets.

@russellbodine
Last active June 15, 2017 20:27
Show Gist options
  • Select an option

  • Save russellbodine/56a31e479299b4931f5c6ebdd3b906c3 to your computer and use it in GitHub Desktop.

Select an option

Save russellbodine/56a31e479299b4931f5c6ebdd3b906c3 to your computer and use it in GitHub Desktop.

Geo Locate Endpoint

This route sends a request to the backend to retrieve a single award's data.

Change requested: add location search and result

Route: api/v1/references/locations/geocomplete/

Method: Post

Params:

{"value":"TX","scope":"all","usage":"place_of_performance"}

EXAMPLE RESULTS

This Result Includes:

TX where parent = US,

TEXAS where parent = US,

TXs where parent = null,

Texas where parent = null

Results:

[{"parent":"UNITED STATES","place_type":"STATE","place":"TEXAS","matched_ids":[4426,883,480,3314,4154,4034,3492,4632,4470,687,3940,594,815,789,809,4444,3960,4710,3408,778,4442,4368,4396,685,4303,4304,4280,4348,3604,3278,4561,857,4500,3438,4327,262,4014,4664,4644,4047,794,926,3308,340,3905,4223,4335,4336,3416,3982,3936,4401,318,4193,4278,478,4427,3315,4633,4155,4035,3493,3941,4471,816,481,4445,3961,4711,3409,4443,4369,4397,4349,4281,3605,4562,3279,4501,3439,4328,4048,4015,4665,4645,3309,3906,4224,3417,3983,3937,4194,4402,4279,263,479,341,927,319,569]}]

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