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

# List the location details of an asset

**Purpose**: Use this API to fetch the location details of a particular asset using its ID. Optionally, you can also use the query parameters to view the location details within a particular date range.

**NOTE**: The date range between the start date and the end date should not exceed more than 3 months.

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

url = URI("https://api.gomotive.com/v1/asset_locations/<id>?start_time=<yyyy-mm-dd>&end_time=<yyyy-mm-dd>")

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
```

<br />

## Response Parameters

### asset

* **Type**: Object
* **Description**: Contains the details of an asset.

### id

* **Type**: Number
* **Description**: The unique identifier for the asset.

### name

* **Type**: String
* **Description**: The name assigned to the asset.

### status

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

### type

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

### vin

* **Type**: String
* **Description**: The Vehicle Identification Number (VIN) of the asset.

### license\_plate\_state

* **Type**: String
* **Description**: The state where the asset's license plate was issued.

### license\_plate\_number

* **Type**: String
* **Description**: The 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**: The axle details of the asset.

### weight\_metric\_units

* **Type**: Boolean
* **Description**: Indicates whether the asset's weight is measured in metric units.

### length\_metric\_units

* **Type**: Boolean
* **Description**: Indicates whether the asset's length is measured in metric units.

### leased

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

### notes

* **Type**: String
* **Description**: Additional notes about the asset.

### length

* **Type**: Number
* **Description**: The length of the asset.

### gvwr

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

### gawr

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

### asset\_gateway

* **Type**: Object
* **Description**: Contains details about the asset's gateway.

### id

* **Type**: Number
* **Description**: The unique identifier for the asset's gateway.

### identifier

* **Type**: String
* **Description**: The identifier for the asset's gateway.

### active

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

### breadcrumbs

* **Type**: Array
* **Description**: A list of breadcrumb locations for the asset.

### uuid

* **Type**: String
* **Description**: The unique identifier for the breadcrumb.

### lat

* **Type**: Number
* **Description**: The latitude of the breadcrumb location.

### lon

* **Type**: Number
* **Description**: The longitude of the breadcrumb location.

### bearing

* **Type**: Number
* **Description**: The bearing (direction) of the asset at the time of the breadcrumb.

### speed

* **Type**: Number
* **Description**: The speed of the asset at the time of the breadcrumb.

### motion\_description

* **Type**: String
* **Description**: A description of the asset's motion at the time of the breadcrumb.

### moving

* **Type**: Boolean
* **Description**: Indicates whether the asset was moving at the time of the breadcrumb.

### address

* **Type**: String
* **Description**: The address of the breadcrumb location.

### located\_at

* **Type**: String
* **Description**: The timestamp when the asset was located at the breadcrumb location.

# 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/asset_locations/{id}": {
      "get": {
        "summary": "List the location details of an asset",
        "description": "",
        "operationId": "fetch-a-list-of-all-the-assets-and-their-locations-using-their-ids",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Specify the ID of an asset to know it's location details.",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "start_date (optional)",
            "in": "query",
            "description": "Specify the start date from which you want to fetch the asset's location history.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "X-Time-Zone",
            "in": "header",
            "description": "Specify the timezone for formatting the timestamps.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Provide the end date for when you want to check the location history of the asset.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "X-Metric-Units",
            "in": "header",
            "description": "Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Number of records to display per page.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "X-User-Id",
            "in": "header",
            "description": "Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page_no",
            "in": "query",
            "description": "Denotes the current page number.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "List all the assets and their locations (IDs)": {
                    "value": "{\n  \"asset\": {\n    \"id\": 663,\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\": \"AUTOMOTRIZ PEYCHA, S.A. DE C.V.\",\n    \"model\": \"DAIMLERCHRYSLER AG\",\n    \"year\": \"2011\",\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\": 726,\n      \"identifier\": \"ATG-KTX-G0K\",\n      \"active\": true\n    },\n    \"breadcrumbs\": [\n      {\n        \"uuid\": \"2a9bfd46-4bec-4760-a763-d99e7f3010a8\",\n        \"lat\": 1.1,\n        \"lon\": 181.00001,\n        \"bearing\": 0.1,\n        \"speed\": 0.1,\n        \"motion_description\": \"Not Moving\",\n        \"moving\": false,\n        \"address\": \"\",\n        \"located_at\": \"2020-01-01T13:00:00Z\"\n      },\n      {\n        \"uuid\": \"b865702f-3f3a-4d70-b345-b7c0261cf55a\",\n        \"lat\": 1,\n        \"lon\": 100,\n        \"bearing\": 0.1,\n        \"speed\": 10,\n        \"motion_description\": \"N at 10.0 kph\",\n        \"moving\": true,\n        \"address\": \"\",\n        \"located_at\": \"2020-01-01T15:00:00Z\"\n      }\n    ]\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "asset": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 663,
                          "default": 0
                        },
                        "name": {
                          "type": "string",
                          "example": "def"
                        },
                        "status": {
                          "type": "string",
                          "example": "active"
                        },
                        "type": {
                          "type": "string",
                          "example": "low_boy"
                        },
                        "vin": {},
                        "license_plate_state": {},
                        "license_plate_number": {},
                        "make": {
                          "type": "string",
                          "example": "AUTOMOTRIZ PEYCHA, S.A. DE C.V."
                        },
                        "model": {
                          "type": "string",
                          "example": "DAIMLERCHRYSLER AG"
                        },
                        "year": {
                          "type": "string",
                          "example": "2011"
                        },
                        "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": 726,
                              "default": 0
                            },
                            "identifier": {
                              "type": "string",
                              "example": "ATG-KTX-G0K"
                            },
                            "active": {
                              "type": "boolean",
                              "example": true,
                              "default": true
                            }
                          }
                        },
                        "breadcrumbs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "uuid": {
                                "type": "string",
                                "example": "2a9bfd46-4bec-4760-a763-d99e7f3010a8"
                              },
                              "lat": {
                                "type": "number",
                                "example": 1.1,
                                "default": 0
                              },
                              "lon": {
                                "type": "number",
                                "example": 181.00001,
                                "default": 0
                              },
                              "bearing": {
                                "type": "number",
                                "example": 0.1,
                                "default": 0
                              },
                              "speed": {
                                "type": "number",
                                "example": 0.1,
                                "default": 0
                              },
                              "motion_description": {
                                "type": "string",
                                "example": "Not Moving"
                              },
                              "moving": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "address": {
                                "type": "string",
                                "example": ""
                              },
                              "located_at": {
                                "type": "string",
                                "example": "2020-01-01T13:00:00Z"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "66acf64a829e88001980fbf2:66bbc89eff57e80011718931"
}
```