Create a new asset

Purpose: The asset can be a Reefer, a Lowboy, or even a Auto hauler. Any piece of equipment that is used along with your vehicle is called an asset. Use this API to create a new asset for your organisation.

📘

NOTE

In order to use this API, you must provide the following details in the body of the API:

  • Name
  • Type
  • Make
  • Model
  • Year

Here is an article that will help you find the asset details on the Motive Dashboard. Find asset details

Add external IDs

To add an external ID to the asset, take the following steps:

  1. Add the following request to the request body:
{
  "number":"toyota_32",
  # other attributes for a asset
  ...
  ...
  ...
  # add external id for asset
  "external_ids_attributes":[
    {
      "external_id":"987",
      "integration_name":"generic_tms"
    }
  ]
}
require 'uri'
require 'net/http'
require 'json'

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

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

request = Net::HTTP::Post.new(url)
request['Authorization'] = "Bearer <OAUTH_TOKEN>"
request['Content-Type'] = 'application/json'

params = {
    external_id_attributes: [{external_id: 456, integration_name: 'tmw_tmt'}]
  }
request.body = params.to_json

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

Response Parameters

asset

  • Type: Object
  • Description: Denotes the object that contains the details of the asset that we are creating.

id

  • Type: Number
  • Description: The unique identifier assigned to the asset.

name

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

status

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

type

  • Type: String
  • Description: The type of the asset (e.g., "flatbed").

custom_type

  • Type: String
  • Description: The custom type of the asset, if any.

vin

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

license_plate_state

  • Type: String
  • Description: The state of the asset's license plate.

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 information of the asset, if any.

weight_metric_units

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

length_metric_units

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

leased

  • Type: Boolean
  • Description: Indicates if the asset is leased.

notes

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

group_ids

  • Type: Array
  • Description: A list of all the group IDs assigned to the asset.

length

  • Type: String
  • Description: The length of the asset.

gvwr

  • Type: String
  • Description: Gross Vehicle Weight Rating of the asset.

gawr

  • Type: String
  • Description: Gross Axle Weight Rating of the asset.

asset_gateway

  • Type: String
  • Description: Information about the asset gateway, if any.

external_ids

  • Type: Array
  • Description: A list of external identifiers associated with the asset.

integration_name

  • Type: String
  • Description: The name of the integration with which the external ID is associated.

Language
Credentials
Header
Click Try It! to start a request and see the response here!