---
agentTools:
  projectIndex: https://developer-docs.gomotive.com/llms.txt
---

# List location of company assets (based on proximity)

**Purpose**: Use this API to fetch a list of all the company assets. The response of this endpoint sorts the assets based on their proximity to your location or the location of interest.

> 📘 NOTE
>
> This endpoint does not list the assets that do not have an asset gateway assigned or installed.

```ruby Ruby (OAuth 2.0)
require 'uri'
require 'net/http'

url = URI('https://api.gomotive.com/v1/freight_visibility/asset_association')

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"

response = http.request(request)
puts response.read_body
```

## Response Parameters

### Data

* **Type**: Object
* **Description**: Contains details about assets and their locations.

### asset\_details

* **Type**: Array of Objects
* **Description**: List of asset details such as status, type, and location information.

### name

* **Type**: String
* **Description**: The name of the asset.

### status

* **Type**: String
* **Description**: The current status of the asset (e.g., active).

### type

* **Type**: String
* **Description**: The type of the asset (e.g., dry\_box, low\_boy).

### vin

* **Type**: Null
* **Description**: Vehicle Identification Number (VIN) of the asset, if applicable.

### license\_plate\_state

* **Type**: Null
* **Description**: State of the license plate associated with the asset.

### license\_plate\_number

* **Type**: Null
* **Description**: License plate number of the asset.

### make

* **Type**: String
* **Description**: The manufacturer of the asset.

### model

* **Type**: String
* **Description**: The model of the asset.

### year

* **Type**: String
* **Description**: The year the asset was manufactured.

### axle

* **Type**: String
* **Description**: Number of axles on the asset.

### weight\_metric\_units

* **Type**: Boolean
* **Description**: Indicates whether weight is measured in metric units.

### length\_metric\_units

* **Type**: Boolean
* **Description**: Indicates whether length is measured in metric units.

### leased

* **Type**: String
* **Description**: Indicates whether the asset is leased.

### notes

* **Type**: String
* **Description**: Additional notes associated with the asset.

### length

* **Type**: String
* **Description**: Length of the asset, if available.

### gvwr

* **Type**: String
* **Description**: Gross Vehicle Weight Rating (GVWR) of the asset.

### gawr

* **Type**: String
* **Description**: Gross Axle Weight Rating (GAWR) of the asset.

### asset\_gateway

* **Type**: Object
* **Description**: Gateway details for the asset.

### id

* **Type**: Integer
* **Description**: Unique identifier of the asset gateway.

### identifier

* **Type**: String
* **Description**: Identifier of the asset gateway.

### active

* **Type**: Boolean
* **Description**: Indicates whether the asset gateway is active.

### asset\_id

* **Type**: Integer
* **Description**: Unique identifier for the asset.

### trailer\_id

* **Type**: Integer
* **Description**: Trailer ID associated with the asset, if applicable.

### located\_at

* **Type**: String
* **Description**: Timestamp of when the asset location was recorded.

### lat

* **Type**: Float
* **Description**: Latitude of the asset’s location.

### lon

* **Type**: Float
* **Description**: Longitude of the asset’s location.

### distance\_origin

* **Type**: Float
* **Description**: Distance of the asset from the provided location, in kilometers.

### description

* **Type**: String
* **Description**: Descriptive text of the asset’s current location and distance from the origin.

### company\_id

* **Type**: Integer
* **Description**: Unique identifier for the company.

### dot\_ids

* **Type**: Array of Strings
* **Description**: List of DOT (Department of Transportation) IDs associated with the company.

### integration\_status

* **Type**: String
* **Description**: Status of the company's integration.

***

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Motive",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.gomotive.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/v1/freight_visibility/asset_association": {
      "get": {
        "summary": "List location of company assets (based on proximity)",
        "description": "",
        "operationId": "fetch-location-of-company-assets-based-on-proximity",
        "parameters": [
          {
            "name": "company_id",
            "in": "query",
            "description": "Specify the ID of the company as assigned by Motive.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "dot_id",
            "in": "query",
            "description": "Specify the ID provided by the Department of Transportation, if you do not have the company_id.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "description": "Specify the latitude of the location from where you want to check the nearby available vehicles.",
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "name": "lon",
            "in": "query",
            "description": "Specify the longitude of the location from where you are checking the nearby vehicles for service.",
            "schema": {
              "type": "number",
              "format": "float"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Fetch location of company assets": {
                    "value": "  {\n  \"data\": {\n    \"asset_details\": [\n      {\n        \"name\": \"abc\",\n        \"status\": \"active\",\n        \"type\": \"dry_box\",\n        \"vin\": null,\n        \"license_plate_state\": null,\n        \"license_plate_number\": null,\n        \"make\": \"Noble\",\n        \"model\": \"Luxgen\",\n        \"year\": \"2019\",\n        \"axle\": null,\n        \"weight_metric_units\": false,\n        \"length_metric_units\": false,\n        \"leased\": null,\n        \"notes\": null,\n        \"length\": null,\n        \"gvwr\": null,\n        \"gawr\": null,\n        \"asset_gateway\": {\n          \"id\": 4034,\n          \"identifier\": \"ATU-51V-NSZ\",\n          \"active\": true\n        },\n        \"asset_id\": 4411,\n        \"trailer_id\": null,\n        \"located_at\": \"2019-07-01T06:06:24Z\",\n        \"lat\": 10.25275,\n        \"lon\": 10.46834,\n        \"distance_origin\": 1546.23,\n        \"description\": \"current location 1546.23 km from provided location\"\n      },\n      {\n        \"name\": \"def\",\n        \"status\": \"active\",\n        \"type\": \"low_boy\",\n        \"vin\": null,\n        \"license_plate_state\": null,\n        \"license_plate_number\": null,\n        \"make\": \"Chang'an\",\n        \"model\": \"Rimac\",\n        \"year\": \"2020\",\n        \"axle\": null,\n        \"weight_metric_units\": false,\n        \"length_metric_units\": false,\n        \"leased\": null,\n        \"notes\": null,\n        \"length\": null,\n        \"gvwr\": null,\n        \"gawr\": null,\n        \"asset_gateway\": {\n          \"id\": 4035,\n          \"identifier\": \"ATS-DNA-T2C\",\n          \"active\": true\n        },\n        \"asset_id\": 4412,\n        \"trailer_id\": null,\n        \"located_at\": \"2019-07-01T05:49:44Z\",\n        \"lat\": 31.25275,\n        \"lon\": -83.46834,\n        \"distance_origin\": 9405.52,\n        \"description\": \"current location 9405.52 km from provided location\"\n      }\n    ],\n    \"company_id\": 35676,\n    \"dot_ids\": [\n      \"3pnjv4a89a\",\n      \"8q2zca2da3\"\n    ],\n    \"integration_status\": \"enabled\"\n  },\n  \"pagination\": {\n    \"per_page\": 100,\n    \"page_no\": 1,\n    \"total\": 2\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "asset_details": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "example": "abc"
                              },
                              "status": {
                                "type": "string",
                                "example": "active"
                              },
                              "type": {
                                "type": "string",
                                "example": "dry_box"
                              },
                              "vin": {},
                              "license_plate_state": {},
                              "license_plate_number": {},
                              "make": {
                                "type": "string",
                                "example": "Noble"
                              },
                              "model": {
                                "type": "string",
                                "example": "Luxgen"
                              },
                              "year": {
                                "type": "string",
                                "example": "2019"
                              },
                              "axle": {},
                              "weight_metric_units": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "length_metric_units": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "leased": {},
                              "notes": {},
                              "length": {},
                              "gvwr": {},
                              "gawr": {},
                              "asset_gateway": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 4034,
                                    "default": 0
                                  },
                                  "identifier": {
                                    "type": "string",
                                    "example": "ATU-51V-NSZ"
                                  },
                                  "active": {
                                    "type": "boolean",
                                    "example": true,
                                    "default": true
                                  }
                                }
                              },
                              "asset_id": {
                                "type": "integer",
                                "example": 4411,
                                "default": 0
                              },
                              "trailer_id": {},
                              "located_at": {
                                "type": "string",
                                "example": "2019-07-01T06:06:24Z"
                              },
                              "lat": {
                                "type": "number",
                                "example": 10.25275,
                                "default": 0
                              },
                              "lon": {
                                "type": "number",
                                "example": 10.46834,
                                "default": 0
                              },
                              "distance_origin": {
                                "type": "number",
                                "example": 1546.23,
                                "default": 0
                              },
                              "description": {
                                "type": "string",
                                "example": "current location 1546.23 km from provided location"
                              }
                            }
                          }
                        },
                        "company_id": {
                          "type": "integer",
                          "example": 35676,
                          "default": 0
                        },
                        "dot_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "3pnjv4a89a"
                          }
                        },
                        "integration_status": {
                          "type": "string",
                          "example": "enabled"
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "per_page": {
                          "type": "integer",
                          "example": 100,
                          "default": 0
                        },
                        "page_no": {
                          "type": "integer",
                          "example": 1,
                          "default": 0
                        },
                        "total": {
                          "type": "integer",
                          "example": 2,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Missing Info": {
                    "value": "{\n  \"error_message\": \"company_id, dot_id are missing, at least one parameter must be provided\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_message": {
                      "type": "string",
                      "example": "company_id, dot_id are missing, at least one parameter must be provided"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "examples": {
                  "Permissions Issue": {
                    "value": "{\n  \"error_message\": \"insufficient permissions\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_message": {
                      "type": "string",
                      "example": "insufficient permissions"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Company Not Found": {
                    "value": "{\n  \"error_message\": \"company not found\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_message": {
                      "type": "string",
                      "example": "company not found"
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66acf64a829e88001980fbf2:66db59f2c67a910053cdc7f0"
}
```