# Shipper Lanes

The shipper lanes recommendation endpoint allows users to retrieve a list of facilities that ship from the specified origin location to the specified destination location within a given distance radius.  The shippers\_in\_origin returned array is the primary fields of interest. shippers\_in\_destination is merely a list of facilities in the specified destination area.

### **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-lanes` permission

### **Endpoint**

* **URL**: `https://api.genlogs.io/shipper/lanes`
* **Method**: `GET`

### **Query Parameters**

* **origin\_city** (string, required): Name of the city of the origin location.
* **origin\_state** (string, required): Name of the state of the origin location.
* **destination\_city** (string, required): Name of the city of the destination location.
* **destination\_state** (string, required): Name of the state of the destination location.
* **origin\_radius** (number, required): The radius (miles) around the origin city within which to search for shipper lanes.
* **destination\_radius** (number, required): The radius (miles) around the destination city within which to search for shipper lanes.
* **lot\_size\_category** (string, optional) Case-sensitive value to filter results.
  * X-Small: Up to 10,000 sq ft
  * Small: 10,001 to 75,000 sq ft
  * Medium: 75,001 to 250,000 sq ft
  * Large: 250,001 to 1,000,000 sq ft
  * X-Large: Over 1,000,000 sq ft

### **Response**

* **200 OK**: Successfully retrieved the list of shipper lanes within the specified radius.
* **400 Bad Request**: If required parameters are missing or invalid.
* **401 Unauthorized**: If the `Access-Token` is missing or invalid.
* **500 Internal Server Error**: If an error occurs on the server while processing the request.

### **Response Body**

* **shippers\_in\_origin** (array of `Shipper` objects): List of shippers that have a lane to the destination. Has *lane\_volume* column.
  * **contact\_phone** (nullable string): Phone number of the shipper's contact person.
  * **contact\_url** (nullable string): URL for the shipper's contact page or website.
  * **facility\_name** (string): Name of the shipper's facility.
  * **formatted\_address** (string): Full address of the shipper's facility.
  * **id** (string): Unique identifier for the shipper.
  * **lat** (number): Latitude of the shipper's facility.
  * **lon** (number): Longitude of the shipper's facility.
  * **operating\_hours** (nullable string): Operating hours of the shipper's facility.
  * **place\_category** (string): Category or type of place (Distribution Center or Manufacturing Plant).
  * **place\_desc** (String): Description of the facility
* **shippers\_in\_destination** (array of `Shipper` objects): List of shippers located at the destination.
  * **contact\_phone** (nullable string): Phone number of the shipper's contact person.
  * **contact\_url** (nullable string): URL for the shipper's contact page or website.
  * **facility\_name** (string): Name of the shipper's facility.
  * **formatted\_address** (string): Full address of the shipper's facility.
  * **id** (string): Unique identifier for the shipper.
  * **lat** (number): Latitude of the shipper's facility.
  * **lon** (number): Longitude of the shipper's facility.
  * **operating\_hours** (nullable string): Operating hours of the shipper's facility.
  * **place\_category** (string): Category or type of place (Distribution Center or Manufacturing Plant).
  * **place\_desc** (String): Description of the facility

### Request Example:

```sh
curl -X GET 'https://api.genlogs.io/shipper/lanes?name=coca+cola&radius=50&origin_city=Tennessee+City&origin_state=Tennessee&destination_city=Taswell&destination_state=Indiana&origin_radius=50&destination_radius=50' \
-H 'Access-Token: {access_token}' \
-H 'x-api-key: {your_api_key}' \
-i

```

## GET /shipper/lanes

> Get shipper lanes based on coordinates and radius

```json
{"openapi":"3.0.2","info":{"title":"Shipper API","version":"1.0.0"},"servers":[{"url":"https://api.genlogs.io"}],"paths":{"/shipper/lanes":{"get":{"parameters":[{"name":"accept","in":"header","required":true,"schema":{"type":"string"},"description":"application/json"},{"name":"Access-Token","in":"header","required":true,"schema":{"type":"string"},"description":"Access Token for authentication"},{"name":"x-api-key","in":"header","required":true,"schema":{"type":"string"},"description":"X api key for authentication"},{"in":"query","name":"origin_lat","required":true,"schema":{"type":"number"},"description":"Latitude of the origin location"},{"in":"query","name":"origin_lon","required":true,"schema":{"type":"number"},"description":"Longitude of the origin location"},{"in":"query","name":"destination_lat","required":true,"schema":{"type":"number"},"description":"Latitude of the destination location"},{"in":"query","name":"destination_lon","required":true,"schema":{"type":"number"},"description":"Longitude of the destination location"},{"in":"query","name":"origin_radius","required":true,"schema":{"type":"number"},"description":"Radius to search around the origin"},{"in":"query","name":"destination_radius","required":true,"schema":{"type":"number"},"description":"Radius to search around the destination"},{"in":"query","name":"lot_size_category","required":false,"schema":{"type":"string"},"description":"Large is one possible value for lot size category"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipperLaneResponse"}}},"description":"List of shipper lanes"}},"summary":"Get shipper lanes based on coordinates and radius"}}},"components":{"schemas":{"ShipperLaneResponse":{"properties":{"shippers_in_destination":{"items":{"$ref":"#/components/schemas/Shipper"},"type":"array"},"shippers_in_origin":{"items":{"$ref":"#/components/schemas/Shipper"},"type":"array"}},"required":["shippers_in_destination","shippers_in_origin"],"type":"object"},"Shipper":{"properties":{"contact_phone":{"nullable":true,"type":"string"},"contact_url":{"nullable":true,"type":"string"},"facility_name":{"type":"string"},"formatted_address":{"type":"string"},"id":{"type":"string"},"lane_volume":{"nullable":true,"type":"integer"},"lat":{"type":"number"},"lon":{"type":"number"},"operating_hours":{"nullable":true,"type":"string"},"place_category":{"type":"string"},"place_desc":{"nullable":true,"type":"string"}},"required":["facility_name","formatted_address","id","lat","lon","place_category"],"type":"object"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.genlogs.io/shipper/shipper-lanes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
