# Motive

> Work with your Motive fleet: vehicles and where they are, drivers and their hours of service, inspection reports, fault codes, harsh driving, fuel purchases, geofences and messages to drivers.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/motive

## Actions

### Create geofence

Create a round geofence: a center and a radius, such as a customer site, so Motive tracks when vehicles come and go.

**Inputs**

- Name (`name`, text, required): The geofence's name, such as Acme warehouse.
- Center latitude (`latitude`, number, required): Latitude in decimal degrees, -90 to 90, such as 37.7749. From -90 to 90.
- Center longitude (`longitude`, number, required): Longitude in decimal degrees, -180 to 180, such as -122.4194. From -180 to 180.
- Radius (meters) (`radius_m`, number, required): How far from the center it reaches, such as 200. From 1 to 50000.
- Category (`category`, text): What kind of place it is. One of: `Uncategorized`, `Fuel Station`, `Job Site`, `Maintenance Facility`, `Receiver / Consignee`, `Restricted Location`, `Shipper`, `Shipper / Receiver`, `Terminal / Yard`, `Truck Stop / Rest Area`, `Weigh Station / Scale`. Default: `Uncategorized`.
- Address (`address`, text): The place's street address, shown in Motive.
- Description (`description`, text): A short note about the place.

**Outputs**

- `geofence` (object): The geofence
- `geofence_id` (text): Its Motive id, for 'Delete geofence'

**Example output**

```json
{
  "geofence": {
    "address": "415 Truckin St, San Francisco, CA",
    "category": "Terminal / Yard",
    "centre_lat": 37.7749,
    "centre_lon": -122.4194,
    "description": "Our home terminal",
    "id": 1004,
    "location_points": [],
    "name": "Main yard",
    "radius_in_meters": 500,
    "status": "active"
  },
  "geofence_id": "1004"
}
```

### Delete fuel purchase

Delete a fuel purchase, such as one recorded twice.

**Inputs**

- Fuel purchase ID (`fuel_purchase_id`, text, required): The fuel purchase's id, from 'List fuel purchases' or 'Record fuel purchase'.

**Outputs**

- `deleted` (true/false): True once deleted
- `fuel_purchase_id` (text): The one deleted

**Example output**

```json
{
  "deleted": true,
  "fuel_purchase_id": "699"
}
```

### Delete geofence

Delete a geofence so Motive stops tracking visits to it.

**Inputs**

- Geofence (`geofence_id`, text, required): The geofence. Pick one, or give its Motive id.

**Outputs**

- `deleted` (true/false): True once deleted
- `geofence_id` (text): The one deleted

**Example output**

```json
{
  "deleted": true,
  "geofence_id": "1004"
}
```

### Get company

Get the Motive company the API key belongs to: name, address, USDOT numbers, default hours-of-service cycle and time zone.

**Inputs**: None.

**Outputs**

- `company` (object): The company

**Example output**

```json
{
  "company": {
    "city": "San Francisco",
    "company_id": "KT1607533",
    "cycle": "70_8",
    "dot_ids": [
      "1234567"
    ],
    "id": 285945,
    "metric_units": false,
    "name": "Acme Freight",
    "state": "CA",
    "street": "415 Truckin St.",
    "subscription_plan": "Enterprise",
    "time_zone": "Pacific Time (US & Canada)",
    "zip": "94105"
  }
}
```

### Get drivers' available hours

Get how much driving, shift, cycle and break time drivers have left under hours-of-service rules, in seconds, with their duty status.

**Inputs**

- Drivers (`driver_ids`, list): Only these drivers. Leave empty for every driver.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `drivers` (list): Each driver and their time left
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "drivers": [
    {
      "available_time": {
        "break": 27600,
        "cycle": 214800,
        "drive": 39600,
        "shift": 49200
      },
      "duty_status": "on_duty",
      "first_name": "John",
      "id": 294979,
      "last_name": "Connor"
    }
  ],
  "page_no": 1,
  "per_page": 25,
  "total": 1
}
```

### Get user

Get one driver or user with their role, status, duty status, hours-of-service cycle and license.

**Inputs**

- User (`motive_user_id`, text, required): The driver or other Motive user. Pick one, or give their Motive id from an earlier step.

**Outputs**

- `user` (object): The user

**Example output**

```json
{
  "user": {
    "carrier_name": "Acme Freight",
    "created_at": "2024-08-09T00:43:40Z",
    "cycle": "70_8",
    "driver_company_id": "D-101",
    "drivers_license_number": "D1234567",
    "drivers_license_state": "CA",
    "duty_status": "off_duty",
    "eld_mode": "logs",
    "email": "john.connor@example.com",
    "first_name": "John",
    "id": 294979,
    "last_name": "Connor",
    "phone": "4155550100",
    "role": "driver",
    "status": "active",
    "time_zone": "Pacific Time (US & Canada)",
    "updated_at": "2026-11-01T21:08:32Z",
    "username": "jconnor"
  }
}
```

### Get vehicle

Get one vehicle with its number, VIN, plate, gateway, drivers and whether it's in service.

**Inputs**

- Vehicle (`vehicle_id`, text, required): The vehicle. Pick one, or give its Motive id from an earlier step.

**Outputs**

- `vehicle` (object): The vehicle

**Example output**

```json
{
  "vehicle": {
    "availability_details": {
      "additional_note": "",
      "availability_status": "in_service",
      "out_of_service_reason": "",
      "updated_at": "2026-11-01T05:30:53Z"
    },
    "created_at": "2024-01-19T20:48:57Z",
    "current_driver": {
      "driver_company_id": "D-101",
      "email": "john.connor@example.com",
      "first_name": "John",
      "id": 294979,
      "last_name": "Connor",
      "role": "driver",
      "status": "active",
      "username": "jconnor"
    },
    "eld_device": {
      "id": 4144,
      "identifier": "AABL36FB400300",
      "model": "lbb-3.6ca"
    },
    "fuel_type": "diesel",
    "group_ids": [
      74153
    ],
    "id": 4565,
    "license_plate_number": "5M37250",
    "license_plate_state": "CA",
    "make": "Freightliner",
    "model": "Cascadia",
    "notes": "Day cab",
    "number": "301",
    "permanent_driver": {
      "driver_company_id": "D-101",
      "email": "john.connor@example.com",
      "first_name": "John",
      "id": 294979,
      "last_name": "Connor",
      "role": "driver",
      "status": "active",
      "username": "jconnor"
    },
    "status": "active",
    "updated_at": "2026-11-01T21:23:44Z",
    "vin": "1FUJGLDR7CLBP8834",
    "year": "2016"
  }
}
```

### Get vehicle location history

Get every point a vehicle reported on one day: where it was, when, its speed, odometer and driver.

**Inputs**

- Vehicle (`vehicle_id`, text, required): The vehicle. Pick one, or give its Motive id from an earlier step.
- Day (`date`, date, required): The day to read.

**Outputs**

- `count` (number): How many points
- `date` (text): The day read
- `locations` (list): The points, in order
- `vehicle_id` (text): The vehicle

**Example output**

```json
{
  "count": 1,
  "date": "2026-11-16",
  "locations": [
    {
      "bearing": 0,
      "description": "Naperville, IL",
      "driver": {
        "driver_company_id": "D-101",
        "email": "john.connor@example.com",
        "first_name": "John",
        "id": 294979,
        "last_name": "Connor",
        "role": "driver",
        "status": "active",
        "username": "jconnor"
      },
      "engine_hours": 14.8,
      "id": "c21bd0b0-3f1e-4675-8550-213d9f3f983c",
      "lat": 41.787076,
      "located_at": "2026-11-16T00:01:15Z",
      "lon": -88.210283,
      "odometer": 252655.3,
      "speed": 0,
      "type": "breadcrumb"
    }
  ],
  "vehicle_id": "4565"
}
```

### Get vehicle locations

Get where vehicles are now: position, place name, speed, heading, odometer, fuel and driver, for chosen vehicles or the whole fleet.

**Inputs**

- Vehicles (`vehicle_ids`, list): Only these vehicles (up to 100). Leave empty for all.
- Vehicle status (`vehicle_status`, text): Only active or only deactivated vehicles. One of: `active`, `deactivated`.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all
- `vehicles` (list): Each vehicle and where it is

**Example output**

```json
{
  "count": 1,
  "page_no": 1,
  "per_page": 25,
  "total": 1,
  "vehicles": [
    {
      "current_driver": {
        "driver_company_id": "D-101",
        "email": "john.connor@example.com",
        "first_name": "John",
        "id": 294979,
        "last_name": "Connor",
        "role": "driver",
        "status": "active",
        "username": "jconnor"
      },
      "current_location": {
        "bearing": 90,
        "description": "Seattle, WA",
        "engine_hours": 4123.5,
        "fuel": 1210.3,
        "fuel_primary_remaining_percentage": 50.5,
        "id": "af5b6e0d-c442-414c-88d2-d95e5cb7affe",
        "lat": 47.565647,
        "located_at": "2026-11-17T12:12:07Z",
        "lon": -122.276261,
        "odometer": 123456.2,
        "speed": 55.1,
        "type": "vehicle_moving"
      },
      "id": 4565,
      "make": "Freightliner",
      "model": "Cascadia",
      "number": "301",
      "vin": "1FUJGLDR7CLBP8834",
      "year": "2016"
    }
  ]
}
```

### List assets

List trailers and other assets with their type, VIN, plate and tracking gateway. Gets one page; to see more, run it again with the next page number.

**Inputs**

- Name (`name`, text): Only those whose name matches this text.
- Status (`status`, text): Only active or only deactivated ones. Leave empty for both. One of: `active`, `deactivated`.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `assets` (list): The assets
- `count` (number): How many are on this page
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all

**Example output**

```json
{
  "assets": [
    {
      "asset_gateway": {
        "id": 698,
        "identifier": "ATE-3NG-DDQ",
        "model": "ag-1"
      },
      "id": 635,
      "license_plate_number": "4TR1234",
      "license_plate_state": "CA",
      "make": "Utility",
      "model": "3000R",
      "name": "Trailer 17",
      "notes": "",
      "status": "active",
      "type": "reefer",
      "vin": "1UYVS2531AU123456",
      "year": "2020"
    }
  ],
  "count": 1,
  "page_no": 1,
  "per_page": 25,
  "total": 1
}
```

### List driver logs

List drivers' daily hours-of-service logs: time driving, on duty, off duty and in the sleeper, miles, vehicles and whether they're certified.

**Inputs**

- Drivers (`driver_ids`, list): Only these drivers. Leave empty for every driver.
- From (`start_date`, date): The first day to include. Defaults to seven days ago.
- To (`end_date`, date): The last day to include. Defaults to today.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `logs` (list): The daily logs
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "logs": [
    {
      "cycle": "70_8",
      "date": "2026-11-16",
      "driver": {
        "driver_company_id": "D-101",
        "email": "john.connor@example.com",
        "first_name": "John",
        "id": 294979,
        "last_name": "Connor",
        "role": "driver",
        "status": "active",
        "username": "jconnor"
      },
      "driver_signed_at": "2026-11-17T00:05:21Z",
      "driving_duration": 21600,
      "id": 47,
      "off_duty_duration": 43200,
      "on_duty_duration": 7200,
      "sleeper_duration": 0,
      "total_miles": 300,
      "trailer_numbers": "17",
      "vehicle_numbers": "301",
      "waiting_duration": 0
    }
  ],
  "page_no": 1,
  "per_page": 25,
  "total": 1
}
```

### List fault codes

List engine fault codes vehicles reported, with what each means, whether it's still open and when it was seen.

**Inputs**

- Vehicles (`vehicle_ids`, list): Only these vehicles. Leave empty for every vehicle.
- Status (`status`, text): Only open or only closed fault codes. One of: `open`, `closed`.
- Type (`fault_type`, text): Only constant or only intermittent fault codes. One of: `constant`, `intermittent`.
- From (`start_date`, date): The first day to include. Defaults to seven days ago.
- To (`end_date`, date): The last day to include. Defaults to today.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `fault_codes` (list): The fault codes
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "fault_codes": [
    {
      "code": "P203F",
      "code_description": "Reductant Level Too Low",
      "code_label": "P203F",
      "eld_device": {
        "id": 4144,
        "identifier": "AABL36FB400300",
        "model": "lbb-3.6ca"
      },
      "first_observed_at": "2026-11-16T15:46:56Z",
      "id": 48401,
      "last_observed_at": "2026-11-16T19:45:27Z",
      "network": "obdii",
      "num_observations": 46,
      "status": "open",
      "type": "constant",
      "vehicle": {
        "id": 4565,
        "make": "Freightliner",
        "model": "Cascadia",
        "number": "301",
        "vin": "1FUJGLDR7CLBP8834",
        "year": "2016"
      }
    }
  ],
  "page_no": 1,
  "per_page": 25,
  "total": 1
}
```

### List fuel purchases

List fuel purchases with the amount, cost, vendor, state or province, vehicle and driver, for IFTA and fuel reports.

**Inputs**

- Vehicle (`vehicle_id`, text): Only this vehicle. Leave empty for every vehicle.
- Fuel type (`fuel_type`, text): Only purchases of this fuel. One of: `diesel`, `gasoline`, `propane`, `lng`, `cng`, `ethanol`, `methanol`, `e85`, `m85`, `a55`, `biodiesel`, `other`.
- From (`start_date`, date): The first day to include. Defaults to seven days ago.
- To (`end_date`, date): The last day to include. Defaults to today.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `fuel_purchases` (list): The fuel purchases
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "fuel_purchases": [
    {
      "currency": "USD",
      "driver": {
        "driver_company_id": "D-101",
        "email": "john.connor@example.com",
        "first_name": "John",
        "id": 294979,
        "last_name": "Connor",
        "role": "driver",
        "status": "active",
        "username": "jconnor"
      },
      "fuel": 120,
      "fuel_type": "diesel",
      "fuel_unit": "gal",
      "id": 699,
      "jurisdiction": "TX",
      "location": "Dallas, TX",
      "odometer": 123456,
      "odometer_unit": "mi",
      "purchased_at": "2026-11-16T18:43:00Z",
      "ref_no": "R-1001",
      "total_cost": 450,
      "vehicle": {
        "id": 4565,
        "make": "Freightliner",
        "model": "Cascadia",
        "number": "301",
        "vin": "1FUJGLDR7CLBP8834",
        "year": "2016"
      },
      "vendor": "Pilot"
    }
  ],
  "page_no": 1,
  "per_page": 25,
  "total": 1
}
```

### List geofences

List the company's geofences (yards, job sites, customers and so on) with their category, address and shape.

**Inputs**

- Name (`name`, text): Only those whose name matches this text.
- Category (`category`, text): Only geofences in this category. One of: `Uncategorized`, `Fuel Station`, `Job Site`, `Maintenance Facility`, `Receiver / Consignee`, `Restricted Location`, `Shipper`, `Shipper / Receiver`, `Terminal / Yard`, `Truck Stop / Rest Area`, `Weigh Station / Scale`.
- Status (`status`, text): Only active or only deactivated ones. Leave empty for both. One of: `active`, `deactivated`.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `geofences` (list): The geofences
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "geofences": [
    {
      "address": "415 Truckin St, San Francisco, CA",
      "category": "Terminal / Yard",
      "centre_lat": 37.7749,
      "centre_lon": -122.4194,
      "description": "Our home terminal",
      "id": 1004,
      "location_points": [],
      "name": "Main yard",
      "radius_in_meters": 500,
      "status": "active"
    }
  ],
  "page_no": 1,
  "per_page": 25,
  "total": 1
}
```

### List groups

List the company's groups (such as regions or terminals) with the group each sits under.

**Inputs**

- Name (`name`, text): Only those whose name matches this text.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `groups` (list): The groups
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "company_id": 285945,
      "id": 6,
      "name": "West region",
      "parent_id": 2
    }
  ],
  "page_no": 1,
  "per_page": 25,
  "total": 1
}
```

### List harsh driving events

List hard braking, acceleration and cornering events, with the driver, vehicle, place, speeds and coaching status.

**Inputs**

- Event types (`event_types`, list): Only these kinds. Leave empty for all three. One or more of: `hard_brake` (Hard braking), `hard_accel` (Hard acceleration), `hard_corner` (Hard cornering).
- Drivers (`driver_ids`, list): Only these drivers. Leave empty for every driver.
- Vehicles (`vehicle_ids`, list): Only these vehicles. Leave empty for every vehicle.
- From (`start_date`, date): The first day to include. Defaults to seven days ago.
- To (`end_date`, date): The last day to include. Defaults to today.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `events` (list): The events
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "events": [
    {
      "coaching_status": "pending_review",
      "driver": {
        "driver_company_id": "D-101",
        "email": "john.connor@example.com",
        "first_name": "John",
        "id": 294979,
        "last_name": "Connor",
        "role": "driver",
        "status": "active",
        "username": "jconnor"
      },
      "end_speed": 30.9,
      "end_time": "2026-11-16T00:22:53Z",
      "id": 828645972,
      "intensity": "-10.3 kph/s",
      "lat": 43.0361387,
      "location": "3.5 km E of North Tonawanda, NY",
      "lon": -78.8207746,
      "start_speed": 48.8,
      "start_time": "2026-11-16T00:22:51Z",
      "type": "hard_brake",
      "vehicle": {
        "id": 4565,
        "make": "Freightliner",
        "model": "Cascadia",
        "number": "301",
        "vin": "1FUJGLDR7CLBP8834",
        "year": "2016"
      }
    }
  ],
  "page_no": 1,
  "per_page": 25,
  "total": 1
}
```

### List HOS violations

List hours-of-service violations, such as going over the 11-hour driving limit, with the driver and when each started and ended.

**Inputs**

- Drivers (`driver_ids`, list): Only these drivers. Leave empty for every driver.
- From (`start_date`, date): The first day to include. Defaults to seven days ago.
- To (`end_date`, date): The last day to include. Defaults to today.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all
- `violations` (list): The violations

**Example output**

```json
{
  "count": 1,
  "page_no": 1,
  "per_page": 25,
  "total": 1,
  "violations": [
    {
      "end_time": "2026-11-16T19:45:00Z",
      "id": 97,
      "name": "11 Hour Driving Limit",
      "start_time": "2026-11-16T19:00:00Z",
      "type": "driving_11",
      "user": {
        "driver_company_id": "D-101",
        "email": "john.connor@example.com",
        "first_name": "John",
        "id": 294979,
        "last_name": "Connor",
        "role": "driver",
        "status": "active",
        "username": "jconnor"
      }
    }
  ]
}
```

### List inspection reports

List drivers' vehicle inspection reports (DVIRs) with their defects and signatures, filtered by driver, vehicle, status or date.

**Inputs**

- Drivers (`driver_ids`, list): Only these drivers. Leave empty for every driver.
- Vehicles (`vehicle_ids`, list): Only these vehicles. Leave empty for every vehicle.
- Status (`status`, text): Only reports in this state. Leave empty for all. One of: `all`, `with_defects` (With defects), `with_no_defects` (With no defects), `with_signature_missing` (Signature missing), `corrected` (Defects corrected), `harmless` (Defects need no repair), `unknown`.
- From (`start_date`, date): The first day to include. Defaults to seven days ago.
- To (`end_date`, date): The last day to include. Defaults to today.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `reports` (list): The inspection reports
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "page_no": 1,
  "per_page": 25,
  "reports": [
    {
      "date": "2026-11-16",
      "defects": [
        {
          "area": "tractor",
          "category": "Mirrors",
          "id": 5,
          "notes": "Cracked"
        }
      ],
      "driver": {
        "driver_company_id": "D-101",
        "email": "john.connor@example.com",
        "first_name": "John",
        "id": 294979,
        "last_name": "Connor",
        "role": "driver",
        "status": "active",
        "username": "jconnor"
      },
      "driver_signed_at": "2026-11-16T14:05:00Z",
      "id": 9,
      "location": "Omaha, NE",
      "mechanic_signed_at": "",
      "odometer": 123400,
      "status": "with_defects",
      "time": "2026-11-16T14:00:00Z",
      "trailer_nums": [
        "17"
      ],
      "vehicle": {
        "id": 4565,
        "make": "Freightliner",
        "model": "Cascadia",
        "number": "301",
        "vin": "1FUJGLDR7CLBP8834",
        "year": "2016"
      },
      "vehicle_number": "301"
    }
  ],
  "total": 1
}
```

### List messages

List messages between the office and drivers, with who sent each, who it went to and whether it was read.

**Inputs**

- Changed after (`from_time`, date and time): Only messages sent or read after this time.
- Changed before (`to_time`, date and time): Only messages sent or read before this time.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `messages` (list): The messages
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "messages": [
    {
      "body": "Arrived at the yard",
      "id": "layer:///messages/c0bb2a67-1bc4-4be6-9a8e-a986388be477",
      "recipient_id": 1591,
      "sender_id": 294979,
      "status": "read",
      "updated_at": "2026-11-17T21:02:31Z"
    }
  ],
  "page_no": 1,
  "per_page": 25,
  "total": 1
}
```

### List users

List drivers, fleet users and admins, by role, status, duty status or name. Gets one page; to see more, run it again with the next page number.

**Inputs**

- Role (`role`, text): Only users with this role. Leave empty for all. One of: `driver`, `fleet_user` (Fleet user), `admin`.
- Status (`status`, text): Only active or only deactivated ones. Leave empty for both. One of: `active`, `deactivated`.
- Duty status (`duty_status`, text): Only drivers in this duty status now. One of: `off_duty` (Off duty), `on_duty` (On duty (not driving)), `sleeper` (Sleeper berth), `driving`, `waiting`.
- Name (`name`, text): Only those whose name matches this text.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "page_no": 1,
  "per_page": 25,
  "total": 1,
  "users": [
    {
      "carrier_name": "Acme Freight",
      "created_at": "2024-08-09T00:43:40Z",
      "cycle": "70_8",
      "driver_company_id": "D-101",
      "drivers_license_number": "D1234567",
      "drivers_license_state": "CA",
      "duty_status": "off_duty",
      "eld_mode": "logs",
      "email": "john.connor@example.com",
      "first_name": "John",
      "id": 294979,
      "last_name": "Connor",
      "phone": "4155550100",
      "role": "driver",
      "status": "active",
      "time_zone": "Pacific Time (US & Canada)",
      "updated_at": "2026-11-01T21:08:32Z",
      "username": "jconnor"
    }
  ]
}
```

### List vehicles

List the fleet's vehicles with their number, VIN, plate, gateway, current driver and whether they're in service. Gets one page; to see more, run it again with the next page number.

**Inputs**

- Drivers (`driver_ids`, list): Only these drivers. Leave empty for every driver.
- Fuel type (`fuel_type`, text): Only vehicles that use this fuel. One of: `diesel`, `gasoline`, `propane`, `lng`, `cng`, `ethanol`, `methanol`, `e85`, `m85`, `a55`, `biodiesel`, `other`.
- Results per page (`per_page`, number): How many to return, 1 to 100. Motive's default is 25. From 1 to 100.
- Page (`page_no`, number): Which page to get, starting at 1. Defaults to the first. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `page_no` (number): This page's number
- `per_page` (number): Records per page
- `total` (number): How many there are in all
- `vehicles` (list): The vehicles

**Example output**

```json
{
  "count": 1,
  "page_no": 1,
  "per_page": 25,
  "total": 1,
  "vehicles": [
    {
      "availability_details": {
        "additional_note": "",
        "availability_status": "in_service",
        "out_of_service_reason": "",
        "updated_at": "2026-11-01T05:30:53Z"
      },
      "created_at": "2024-01-19T20:48:57Z",
      "current_driver": {
        "driver_company_id": "D-101",
        "email": "john.connor@example.com",
        "first_name": "John",
        "id": 294979,
        "last_name": "Connor",
        "role": "driver",
        "status": "active",
        "username": "jconnor"
      },
      "eld_device": {
        "id": 4144,
        "identifier": "AABL36FB400300",
        "model": "lbb-3.6ca"
      },
      "fuel_type": "diesel",
      "group_ids": [
        74153
      ],
      "id": 4565,
      "license_plate_number": "5M37250",
      "license_plate_state": "CA",
      "make": "Freightliner",
      "model": "Cascadia",
      "notes": "Day cab",
      "number": "301",
      "permanent_driver": {
        "driver_company_id": "D-101",
        "email": "john.connor@example.com",
        "first_name": "John",
        "id": 294979,
        "last_name": "Connor",
        "role": "driver",
        "status": "active",
        "username": "jconnor"
      },
      "status": "active",
      "updated_at": "2026-11-01T21:23:44Z",
      "vin": "1FUJGLDR7CLBP8834",
      "year": "2016"
    }
  ]
}
```

### Record fuel purchase

Record a fuel purchase for a vehicle and driver, such as one from a fuel card statement, so it counts in IFTA reports.

**Inputs**

- Vehicle (`vehicle_id`, text, required): The vehicle. Pick one, or give its Motive id from an earlier step.
- Driver (`driver_id`, text, required): The driver who bought the fuel.
- Purchased at (`purchased_at`, date and time, required): When the fuel was bought.
- State or province (`jurisdiction`, text, required): Where the fuel was bought. One of: `AL` (Alabama), `AK` (Alaska), `AZ` (Arizona), `AR` (Arkansas), `CA` (California), `CO` (Colorado), `CT` (Connecticut), `DE` (Delaware), `DC` (District of Columbia), `FL` (Florida), and 54 more.
- Fuel type (`fuel_type`, text, required): The fuel bought. One of: `diesel`, `gasoline`, `propane`, `lng`, `cng`, `ethanol`, `methanol`, `e85`, `m85`, `a55`, `biodiesel`, `other`.
- Amount (`fuel`, number, required): How much fuel, in the unit chosen, such as 120.5. At least 0.
- Unit (`fuel_unit`, text, required): Gallons or liters. One of: `gal` (Gallons), `ltr` (Litres).
- Total cost (`total_cost`, number): What it cost in all, such as 450.25. At least 0.
- Currency (`currency`, text): The currency of the cost. Defaults to US dollars. One of: `USD` (US dollars (USD)), `CAD` (Canadian dollars (CAD)).
- Vendor (`vendor`, text): Where it was bought, such as Pilot.
- Reference number (`ref_no`, text): The receipt or transaction number.
- Odometer (`odometer`, number): The odometer reading when fueling. At least 0.
- Odometer unit (`odometer_unit`, text): Miles or kilometers. One of: `MI` (Miles), `KM` (Kilometres).
- Location (`location`, text): Where, such as Dallas, TX.

**Outputs**

- `fuel_purchase` (object): The fuel purchase
- `fuel_purchase_id` (text): Its Motive id, for 'Delete fuel purchase'

**Example output**

```json
{
  "fuel_purchase": {
    "currency": "USD",
    "driver": {
      "driver_company_id": "D-101",
      "email": "john.connor@example.com",
      "first_name": "John",
      "id": 294979,
      "last_name": "Connor",
      "role": "driver",
      "status": "active",
      "username": "jconnor"
    },
    "fuel": 120,
    "fuel_type": "diesel",
    "fuel_unit": "gal",
    "id": 699,
    "jurisdiction": "TX",
    "location": "Dallas, TX",
    "odometer": 123456,
    "odometer_unit": "mi",
    "purchased_at": "2026-11-16T18:43:00Z",
    "ref_no": "R-1001",
    "total_cost": 450,
    "vehicle": {
      "id": 4565,
      "make": "Freightliner",
      "model": "Cascadia",
      "number": "301",
      "vin": "1FUJGLDR7CLBP8834",
      "year": "2016"
    },
    "vendor": "Pilot"
  },
  "fuel_purchase_id": "699"
}
```

### Send message to driver

Send a message to a driver (or other user), shown in the Motive Driver app.

**Inputs**

- Driver (`recipient_id`, text, required): Who to send it to.
- Message (`body`, text, required): What to say.

**Outputs**

- `body` (text): What was sent
- `recipient_id` (text): Who it went to
- `sent` (true/false): True once Motive took it

**Example output**

```json
{
  "body": "Please call dispatch.",
  "recipient_id": "294979",
  "sent": true
}
```

### Update user

Change a driver's or user's name, email, phone or driver ID, or deactivate or reactivate them. Only the fields given change.

**Inputs**

- User (`motive_user_id`, text, required): The driver or other Motive user. Pick one, or give their Motive id from an earlier step.
- First name (`first_name`, text): A new first name. Leave empty to keep it.
- Last name (`last_name`, text): A new last name. Leave empty to keep it.
- Email (`email`, text): A new email address. Leave empty to keep it.
- Phone (`phone`, text): A new phone number, without the country code. Give the country code too.
- Phone country code (`phone_country_code`, text): The phone's country code, such as +1 or +52.
- Driver ID (`driver_company_id`, text): Your own id for the driver. Leave empty to keep it.
- Status (`status`, text): Deactivated users can no longer sign in to Motive. Leave empty to keep it. One of: `active`, `deactivated`.

**Outputs**

- `changed` (list): The Motive fields that were sent
- `user` (object): The user as saved

**Example output**

```json
{
  "changed": [
    "first_name"
  ],
  "user": {
    "carrier_name": "Acme Freight",
    "created_at": "2024-08-09T00:43:40Z",
    "cycle": "70_8",
    "driver_company_id": "D-101",
    "drivers_license_number": "D1234567",
    "drivers_license_state": "CA",
    "duty_status": "off_duty",
    "eld_mode": "logs",
    "email": "john.connor@example.com",
    "first_name": "John",
    "id": 294979,
    "last_name": "Connor",
    "phone": "4155550100",
    "role": "driver",
    "status": "active",
    "time_zone": "Pacific Time (US & Canada)",
    "updated_at": "2026-11-01T21:08:32Z",
    "username": "jconnor"
  }
}
```

### Update vehicle

Change a vehicle's plate, VIN, make, model, year, notes or permanent driver, take it in or out of service, or deactivate it. Only the fields given change.

**Inputs**

- Vehicle (`vehicle_id`, text, required): The vehicle. Pick one, or give its Motive id from an earlier step.
- License plate (`license_plate_number`, text): A new license plate. Leave empty to keep it.
- Plate state or province (`license_plate_state`, text): Where the plate is registered, such as CA or ON.
- VIN (`vin`, text): A new vehicle identification number.
- Make (`make`, text): A new make, such as Freightliner.
- Model (`model`, text): A new model, such as Cascadia.
- Year (`year`, number): A new model year, such as 2022. From 1900 to 2100.
- Notes (`notes`, text): New notes for the vehicle. Leave empty to keep them.
- Permanent driver (`permanent_driver_id`, text): The driver the vehicle is assigned to.
- Status (`status`, text): Deactivate a vehicle that has left the fleet. Leave empty to keep it. One of: `active`, `deactivated`.
- Availability (`availability_status`, text): Take the vehicle out of service (such as for repairs) or back into service. One of: `in_service` (In service), `out_of_service` (Out of service).
- Availability note (`availability_note`, text): Why, such as Brake repair. Sent with Availability, which it needs.

**Outputs**

- `changed` (list): The Motive fields that were sent
- `vehicle` (object): The vehicle as saved

**Example output**

```json
{
  "changed": [
    "notes"
  ],
  "vehicle": {
    "availability_details": {
      "additional_note": "",
      "availability_status": "in_service",
      "out_of_service_reason": "",
      "updated_at": "2026-11-01T05:30:53Z"
    },
    "created_at": "2024-01-19T20:48:57Z",
    "current_driver": {
      "driver_company_id": "D-101",
      "email": "john.connor@example.com",
      "first_name": "John",
      "id": 294979,
      "last_name": "Connor",
      "role": "driver",
      "status": "active",
      "username": "jconnor"
    },
    "eld_device": {
      "id": 4144,
      "identifier": "AABL36FB400300",
      "model": "lbb-3.6ca"
    },
    "fuel_type": "diesel",
    "group_ids": [
      74153
    ],
    "id": 4565,
    "license_plate_number": "5M37250",
    "license_plate_state": "CA",
    "make": "Freightliner",
    "model": "Cascadia",
    "notes": "Day cab",
    "number": "301",
    "permanent_driver": {
      "driver_company_id": "D-101",
      "email": "john.connor@example.com",
      "first_name": "John",
      "id": 294979,
      "last_name": "Connor",
      "role": "driver",
      "status": "active",
      "username": "jconnor"
    },
    "status": "active",
    "updated_at": "2026-11-01T21:23:44Z",
    "vin": "1FUJGLDR7CLBP8834",
    "year": "2016"
  }
}
```
