Shipper Facilities

The facilities endpoint allows users to retrieve a list of facilities that match a given name, location, and search radius. The response includes detailed information about each facility, such as contact information, geographic coordinates, and operating hours.

Authentication

Include the following headers in your requests:

  • Access-Token: The access token obtained from the "Create Access Token" endpoint.

  • x-api-key: The API key provided by GenLogs. This header must be included in the request.

Permissions

Make sure that your api user is created with a role that has external-api-shipper-facilities permission

Endpoint

  • URL: https://api.genlogs.io/facilities

  • Method: GET

Query Parameters

  • name (string, max 500 chars, required — only optional when address, website_domain, or a city + state combination is provided) The name of the facility to search for. For example, "Acme Logistics".

  • address (string, max 500 chars, required — only optional when name, website_domain, or a city + state combination is provided) The address of the facility to search for. For example, "123 Main Street South".

  • city (string, max 150 chars, required — only optional when name, address, or website_domain is provided) The location "city" around which to search for facilities. For example, "Boston" or "Atlanta". Must be sent together with state and must geocode successfully; unrecognized locations return empty.

  • state (string, max 150 chars, required — only optional when name, address, or website_domain is provided) The location "state" around which to search for facilities. For example, "Massachusetts" or "Georgia". Must be sent together with city and must geocode successfully; unrecognized locations return empty.

  • website_domain (string, optional, max 253 chars) Returns facilities whose stored contact URL contains the given domain. Provide the bare host only — e.g. acme.com, not https://www.acme.com/about. The match is case-insensitive and anchored on the host substring, so acme.com will match stored URLs like https://www.acme.com/contact, http://shipping.acme.com, and acme.com.au. Minimum accepted form is a.com (must contain a . and a 2+ character TLD). Shorter inputs return HTTP 400.

website_domain vs. contact_url in the response. website_domain is an input filter — the value you send to narrow the search. contact_url is the output field on each facility record and holds the full URL as Genlogs ingested it (scheme, subdomain, path, and all). The filter is a substring match against contact_url, so the two will usually look related but rarely identical: you filter by acme.com and get back facilities whose contact_url is https://www.acme.com/locations/12. Do not expect contact_url to echo the domain you sent.

  • radius (number, optional, default 20, max 150) The radius in miles within which to search around the specified location. Only takes effect when paired with a successful city + state geocode — sent alone, it has no effect.

  • lot_size_category (string, optional, max 50 chars) Filter by the lot size category of the facility. Accepts one or more of Small, Medium, Large, X-Large. To pass multiple values, separate them with a pipe — e.g. Small | Medium. Matching is case-insensitive.

Filter precedence. name, address, and website_domain are mutually exclusive text filters. If you send more than one, only the highest-priority filter is applied (name > address > website_domain) — the others are silently ignored.

Geographic narrowing is layered on top of whichever text filter wins:

  • city + state must both be sent and must geocode successfully; unrecognized locations are dropped silently and return ungeoed results.

  • radius (miles) only takes effect when paired with a successful city + state geocode. Sent alone, it has no effect.

  • zip_code (string, optional, max 10 chars) Search for facilities by valid US zip code. Can be combined with other search parameters like name or address to further narrow results.

  • include_lanes (string, optional) Accepts only true, each facility in the response includes inbound_lanes and outbound_lanes arrays containing structured freight lane data ranked by weight. Facilities with no matching lane data are excluded from the response. Enables pagination — see cursor below.

Lane Data Behavior. When include_lanes=true is sent, the response changes in several ways:

  • Each facility includes inbound_lanes and outbound_lanes arrays ranked by weight

  • Facilities with no matching lane data are excluded from the response

  • Results are paginated at 20 facilities per page — check the Link response header for the next page URL

  • The limit parameter is capped at 20 regardless of the value provided

  • Lane-specific filters (top_n, min_distance, direction) only take effect in this mode

  • Without include_lanes=true, none of the above applies — the response contains facility metadata only, no pagination headers, and limit follows the standard defaults.

  • top_n (number, optional, default 10, max 50) The number of top lanes to return per direction (inbound/outbound) per facility, ranked by weight descending. For example, top_n=5 returns the 5 highest-weighted inbound and 5 highest-weighted outbound lanes. Only takes effect when include_lanes=true.

  • min_distance (number, optional, miles) Minimum distance in miles from the facility to a lane destination. Lanes closer than this threshold are excluded. For example, min_distance=200 returns only lanes where the destination is 200+ miles away. Applied before top_n. Only takes effect when include_lanes=true.

  • direction (string, optional, one of: N, S, E, W, NE, NW, SE, SW) Filter lanes by compass direction from the facility. For example, direction=NE returns only lanes heading northeast. Applied before top_n. Only takes effect when include_lanes=true.

  • limit (number, optional) Filter lanes by compass direction from the facility. For example, direction=NE returns only lanes heading northeast. Applied before top_n. Only takes effect when include_lanes=true.

  • cursor (string, optional, opaque) Pagination cursor from the Link response header of a previous request. Do not construct, parse, or cache this value — follow the URL provided in the Link header. Only present in responses when include_lanes=true and results exceed 20 facilities.

Response

  • 200 OK: Successfully retrieved the list of facilities matching the search criteria.

  • 400 Bad Request: If required parameters are missing or invalid.

  • 401 Unauthorized: If the Access-Token or x-api-key is missing or invalid.

  • 500 Internal Server Error: If an error occurs on the server while processing the request.

Response Body

  • facilities (array of Facility objects): List of up to 1,000 facilities matching the search criteria ordered by relative load volume.

    • contact_phone (nullable string): Phone number of the facility's contact person.

    • contact_url (nullable string): URL for the facility's contact page or website.

    • facility_name (string): Name of the facility.

    • formatted_address (string): Full address of the facility.

    • id (string): Unique identifier for the facility.

    • inbound_lanes (array): Lanes inbound to a facility, ranked by weight descending.

    • lat (number): Latitude of the facility's location.

    • lon (number): Longitude of the facility's location.

    • operating_hours (nullable string): Operating hours of the facility.

    • outbound_lanes (array): Lanes outbound from a facility, ranked by weight descending.

    • place_category (string): Category or type of place (e.g., warehouse, distribution center).

    • place_desc (String): Description of the facility

Request Example:

Search by name + city and state.

Search by address

Search by zip_code

Get facilities based on name, location, and radius

get
Query parameters
namestringRequired

The name of the facility

Example: Example Facility
citystringRequired

The city of the facility

Example: New York
statestringRequired

The state of the facility

Example: NY
radiusintegerOptional

The radius to search around the location

Example: 50
Header parameters
acceptstringRequired

application/json

Example: application/json
Access-TokenstringRequired

Access Token for authentication

Example: [Token]
x-api-keystringRequired

X api key for authentication

Example: [x-api-key]
Responses
200

List of facilities

application/json
get
/facilities
200

List of facilities

Last updated