v1

latestOpenAPI 3.0.12026-07-1453737.4 KB
facilities

Query facilities by location or IDs, with optional filters

Query facilities by bounding box, latitude and longitude, state, visn, or zip code. Bounding box is specified as four bbox[] parameters, long1, lat1, long2, lat2. (Relative order is unimportant.)

A query by latitude and longitude returns all facilities in the system, sorted by distance from that location.

All location queries support filtering by facility type, available services, and mobile status.

One can also retrieve facilities by ID using a comma-separated list like ?ids=id1,id2. When requesting multiple facilities by ID, the API will return as many results as it can find matches for, omitting IDs where there is no match. It will not return an HTTP error code if it is unable to match a requested ID. Clients may supply IDs up to the limit their HTTP client enforces for URI path lengths. (Usually 2048 characters.)

Results are paginated. JSON responses include pagination information in the standard JSON API "links" and "meta" elements.

Parameter combinations

You may optionally specify page and per_page with any query. You must specify one of the following parameter combinations:

  • bbox[], with the option of any combination of type, services[], or mobile

  • ids

  • lat and long, with the option of any combination of ids, type, services[], or mobile

  • state, with the option of any combination of type, services[], or mobile

  • visn

  • zip, with the option of any combination of type, services[], or mobile

Invalid combinations will return 400 Bad Request.

get/facilities

Query parameters

idsstring[]

List of comma-separated facility IDs to retrieve in a single request. Can be combined with lat and long parameters to retrieve facilities sorted by distance from a location.

zipstring ##### or #####-####

Zip code to search for facilities. More detailed zip codes can be passed in, but only the first five digits are used to determine facilities to return.

statestring XX

State in which to search for facilities. Except in rare cases, this is two characters.

latnumber float

Latitude of point to search for facilities, in WGS84 coordinate reference system.

longnumber float

Longitude of point to search for facilities, in WGS84 coordinate reference system.

bbox[]number[]

Bounding box (longitude, latitude, longitude, latitude) within which facilities will be returned. (WGS84 coordinate reference system)

visnnumber

VISN search of matching facilities.

type'health' | 'cemetery' | 'benefits' | 'vet_center'

Optional facility type search filter

services[]string[]

Optional facility service search filter

mobileboolean

Optional facility mobile search filter

pageinteger

Page of results to return per paginated response.

per_pageinteger

Number of results to return per paginated response.

Response

Success

All 5 operations