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":[
    {    
    "id": "9876",    
    "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.

availability_details

  • Type: Object
  • Description: Contains the availability details object. This object denotes the availability of the asset for a dispatch.

availability_status

  • Type: String
  • Description: Denotes the availability status of the asset. Allowed values are “out_of_service” or “in_service”.

out_of_service_reason

  • Type: String
  • Description: Denotes the reason for the asset being out of service.

updated_at

  • Type: DateTime
  • Description: Denotes the date and time when the availability status of the asset was updated.

additional_note

  • Type: String
  • Description: Denotes any comments or notes added for updating the availability of the asset. For example, “This asset is scheduled for maintenance.”

custom_driver_app_warning_prompt

  • Type: String
  • Description: This denotes the prompt message that drivers see on their driver_app. This prompt can be used to inform the driver about the status of the asset or communicate any specific instructions. For example, “Asset is under maintenance, do not operate.”

updated_by_user

  • Type: Object
  • Description: Object containing the details of the user who updated the availability status of the asset.

id

  • Type: Int
  • Description: The ID of the user who updated the availability status of the asset.

first_name

  • Type: String
  • Description: First name of the user who updated the status of the asset.

last_name

  • Type: String
  • Description: Last name of the user who updated the status of the asset.

user_name

  • Type: String
  • Description: Company username of the person who updated the status.

email

  • Type: String
  • Description: Email address of the user.

company_reference_id

  • Type: Int
  • Description: The company ID of the user as per the internal company records.

status

  • Type: String
  • Description: The status of the user who updated the availability of the asset.

role

  • Type: String
  • Description: The role of the user who updated the availability status of the asset.

Body Params
string
required

Denotes the name of the asset that you are creating.

string
required

Denotes the type of the asset that you are creating. Allowed values are ["dry_box", "reefer", "flatbed", "step_deck", "tanker", "low_boy", "intermodal_chassis", "auto_hauler", "livestock", "dump_tipper", "curtain_side", "stake", "construction", "other"]

string

Specify the custom type of the asset. If not available, mention it as "Other".

string
required

Denotes make of the asset that you are creating.

string
required

Denotes the model of the asset that you are creating.

string
required

Denotes the year of manufacturing of the asset.

string

Specify the sub type of the asset. Allowed values are: ["backhoe", "boom_truck", "bulldozer", "crane", "dump_truck", "excavator", "forklift", "front_loader", "grader", "trencher", "other"]

string

Specify the VIN number of the asset.

float

Specify the length of the asset.

int32

Provide the axle information of the asset.

int32

Gross Vehicle Weight Rating (GVWR) of the asset.

int32

Gross Axle Weight Rating (GAWR) of the asset.

boolean

Specify if length is in metric units.

boolean

Specify if the weight is in metric units.

string

Mention the state where the license place was installed.

string

Mention the number of license plate.

boolean

Mention if the asset is leased or not.

string

Specify any notes for the asset.

string

Mention the ID of the asset gateway with which the asset with linked.

external_ids_attributes
object

Specify the external Id attributes for the asset.

group_ids
array of int32s

Specify the group IDs for the assets.

group_ids
availability_details
object
Headers
string

Specify the timezone for formatting the timestamps.

int32

Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.

Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json