# Whip Around

> Read vehicle inspections and defects, and manage assets, drivers, work orders and fuel.

App · 32 actions. Web page: https://docs.lodol.com/docs/integrations/whip-around

## Actions

### Create asset

Add a vehicle or piece of equipment, with every inspection form unless forms are chosen.

**Inputs**

- Name (`name`, text, required): The asset's name.
- Subscription (`subscription_type`, text, required): The Whip Around plan the asset is billed on. One of: `INSPECT`, `INSPECT_LITE` (Inspect Lite), `MAINTAIN`, `MAINTAIN_LITE` (Maintain Lite), `LITE`, `STANDARD`, `PRO`, `PRO_LITE` (Pro Lite), `FIXED_UNLIMITED` (Fixed unlimited), `PREMIUM`.
- Make (`make`, text): The manufacturer.
- Model (`model`, text): The model.
- Year (`year`, text): The model year.
- License plate (`license_plate`, text): The license plate, up to 20 characters.
- VIN (`vin`, text): The vehicle identification number, up to 17 characters.
- Color (`color`, text): The asset's color.
- Notes (`bio`, text): Notes about the asset.
- Team (`team`, number): The team the asset belongs to. The business's default team when empty.
- Forms (`form_ids`, list): The inspection forms to give the asset. Every form when empty.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "id": 1
    }
  }
}
```

### Create defect

Report a defect on an asset by hand.

**Inputs**

- Asset (`asset_id`, number, required): The asset with the defect.
- Defect (`name`, text, required): What the defect is.
- Comment (`comment`, text, required): A comment describing it.
- Date (`date`, date, required): The day the defect was found. Today or earlier.
- Driver (`driver_id`, number): The driver who found it.
- Severity (`severity_id`, number): How severe it is: 1 or 2. From 1 to 2.
- Priority ID (`priority_id`, number): The ID of its priority in Whip Around.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "id": 1
    }
  }
}
```

### Create driver

Add a driver who can sign in to the Whip Around app.

**Inputs**

- First name (`first_name`, text, required): The driver's first name.
- Last name (`last_name`, text, required): The driver's last name.
- Mobile phone (`phone_number`, text, required): The driver's mobile phone number.
- Email (`email`, text): The driver's email address.
- Username (`username`, text): The name the driver signs in to the app with.
- Employee number (`employee_number`, text): The driver's employee number.
- Team (`team`, number): The team the driver belongs to.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "id": 1
    }
  }
}
```

### Create fuel transaction

Record a fuel purchase for an asset. Needs an integration API key.

**Inputs**

- Asset (`asset_id`, number, required): The asset that was fueled.
- Cost (`cost`, number, required): The total cost. At least 0.
- Currency (`currency`, text, required): The currency code, such as USD.
- Fuel type (`fuel_type`, text, required): The kind of fuel. One of: `diesel`, `gasoline`, `ethanol`, `regular unleaded 5.7`, `regular unleaded 7.7`, `regular unleaded 10`, `super unleaded`, `super unleaded 5.7`, `super unleaded 7.7`, `super unleaded 10`, and 4 more.
- Volume (`volume`, number): How much fuel. At least 0.
- Volume unit (`volume_unit`, text, required): The unit of the volume. One of: `gal` (Gallons), `l` (Liters).
- Odometer (`odometer`, number): The odometer reading at the fill-up. At least 0.
- Odometer unit (`odometer_unit`, text, required): The unit of the odometer reading. One of: `mi` (Miles), `km` (Kilometers).
- Purchased at (`transaction_date`, date and time): When the purchase was made. Now, when left empty.
- Driver (`driver_id`, number): The driver who bought the fuel.
- Fuel vendor (`fuel_vendor_id`, number): The fuel vendor.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "id": 1
    }
  }
}
```

### Create fuel vendor

Add a fuel vendor.

**Inputs**

- Name (`name`, text, required): The vendor's name.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "id": 1
    }
  }
}
```

### Delete asset

Delete a vehicle or piece of equipment.

**Inputs**

- Asset (`asset_id`, number, required): The asset to delete.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {}
}
```

### Delete driver

Delete a driver.

**Inputs**

- Driver (`driver_id`, number, required): The driver's ID.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {}
}
```

### Delete fuel vendor

Delete a fuel vendor.

**Inputs**

- Fuel vendor (`fuel_vendor_id`, number, required): The fuel vendor's ID.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {}
}
```

### Get asset

Get one vehicle or piece of equipment.

**Inputs**

- Asset (`asset_id`, number, required): The asset (vehicle or equipment).

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "asset_subtype": "example",
      "asset_type": "example",
      "bio": "example",
      "colour": "example",
      "custom_fields": [
        {}
      ],
      "engine_hours": "example",
      "id": 1,
      "is_out_of_service": true,
      "last_service_date": "example",
      "licence_plate": "example",
      "make": "example",
      "model": "example",
      "name": "example",
      "odometer": "example",
      "odometer_updated_at": "example",
      "photo_url": "example",
      "vin": "example",
      "year": "example"
    }
  }
}
```

### Get driver

Get one driver with their contact details, license and team.

**Inputs**

- Driver (`driver_id`, number, required): The driver's ID.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "bio": "example",
      "date_of_birth": "example",
      "division": "example",
      "email": "example",
      "employee_number": "example",
      "first_name": "example",
      "health": "example",
      "home_phone": "example",
      "hourly_rate": "example",
      "id": 1,
      "is_admin": true,
      "last_name": "example",
      "licence": "example",
      "licence_class_name": "example",
      "licence_number": "example",
      "mobile_phone": "example",
      "on_hold": true,
      "position": "example",
      "team_name": "example",
      "username": "example",
      "work_phone": "example"
    }
  }
}
```

### Get inspection

Get one inspection with its answers, defects, signatures and PDF link.

**Inputs**

- Inspection (`inspection_id`, number, required): The inspection's ID.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "asset_id": 1,
      "asset_name": "example",
      "asset_vin": "example",
      "cards": [
        {}
      ],
      "completion": "example",
      "created_at": "example",
      "defects": [
        {}
      ],
      "driver_first_name": "example",
      "driver_id": 1,
      "driver_last_name": "example",
      "driver_signature_on_last_inspection": "example",
      "driver_username": "example",
      "end_latitude": "example",
      "end_longitude": "example",
      "form_id": 1,
      "form_name": "example",
      "id": 1,
      "inspection_duration_sec": 1,
      "inspection_ended_on_device": "example",
      "passed": true,
      "pdf_url": "example",
      "signature_photo_urls": [
        {}
      ],
      "start_latitude": "example",
      "start_longitude": "example",
      "team_id": 1,
      "team_name": "example"
    }
  }
}
```

### Get part

Get one part with its stock, storage location and vendors.

**Inputs**

- Part (`part_id`, number, required): The part's ID.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "added_by": {},
      "categories": [
        {}
      ],
      "custom_fields": [
        {}
      ],
      "description": "example",
      "id": 1,
      "manufacturer": {},
      "measurement_unit": {},
      "name": "example",
      "part_image_url": "example",
      "part_number": "example",
      "status": {},
      "stock_on_hand": 1,
      "teams": [
        {}
      ],
      "upc": "example"
    }
  }
}
```

### Get work order

Get one work order with its items, costs and attachments.

**Inputs**

- Work order (`work_order_id`, number, required): The work order's ID.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": {
      "asset_id": 1,
      "asset_name": "example",
      "assignee": "example",
      "attachments": [
        {}
      ],
      "booking_date": "example",
      "completed_by_name": "example",
      "completion_date": "example",
      "completion_engine_hours": "example",
      "completion_odometer": "example",
      "cost": {},
      "createdBy": {},
      "created_at": "example",
      "id": 1,
      "items": [
        {}
      ],
      "number": "example",
      "scheduled_date": "example",
      "status": {}
    }
  }
}
```

### List asset mileage history

List an asset's odometer readings and where each came from.

**Inputs**

- Asset (`asset_id`, number, required): The asset (vehicle or equipment).
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "asset_name": "example",
        "created_at": "example",
        "driver_name": "example",
        "form_name": "example",
        "inspected_at": "example",
        "inspection_id": 1,
        "source_type": "example",
        "team": {},
        "unit": "example",
        "value": 1
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List assets

List the business's vehicles and equipment with their odometer, engine hours and service state.

**Inputs**

- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "asset_subtype": "example",
        "asset_type": "example",
        "bio": "example",
        "colour": "example",
        "custom_fields": [
          {}
        ],
        "engine_hours": "example",
        "id": 1,
        "is_out_of_service": true,
        "last_service_date": "example",
        "licence_plate": "example",
        "make": "example",
        "model": "example",
        "name": "example",
        "odometer": "example",
        "odometer_updated_at": "example",
        "photo_url": "example",
        "vin": "example",
        "year": "example"
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List defects

List defects found in inspections or reported by hand, filtered by asset, driver, team or time.

**Inputs**

- Asset (`asset_id`, number): Only records for this asset.
- Driver (`driver_id`, number): Only defects reported by this driver.
- Team (`team`, number): Only defects in this team.
- From (`datetime_from`, date and time): Only defects found at or after this time.
- To (`datetime_to`, date and time): Only defects found before this time.
- Limit (`limit`, number): How many defects to return, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "asset_id": 1,
        "assignee": "example",
        "card_id": "example",
        "comments": [
          {}
        ],
        "corrected_by": {},
        "created_at": "example",
        "custom_fields": [
          {}
        ],
        "driver_id": 1,
        "id": 1,
        "inspection_id": "example",
        "mechanic_declaration": "example",
        "mechanic_name": "example",
        "name": "example",
        "status": "example",
        "team_id": "example",
        "updated_at": "example",
        "work_order": {}
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List driver wellness reports

List the fitness-for-duty reports drivers submitted.

**Inputs**

- From (`datetime_from`, date and time): Only reports submitted at or after this time.
- To (`datetime_to`, date and time): Only reports submitted before this time.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {}
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List drivers

List the business's drivers, filtered by username or employee number.

**Inputs**

- Username (`username`, text): Only drivers whose username contains this.
- Employee number (`employee_number`, text): Only drivers whose employee number contains this.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "bio": "example",
        "date_of_birth": "example",
        "division": "example",
        "email": "example",
        "employee_number": "example",
        "first_name": "example",
        "health": "example",
        "home_phone": "example",
        "hourly_rate": "example",
        "id": 1,
        "is_admin": true,
        "last_name": "example",
        "licence": "example",
        "licence_class_name": "example",
        "licence_number": "example",
        "mobile_phone": "example",
        "on_hold": true,
        "position": "example",
        "team_name": "example",
        "username": "example",
        "work_phone": "example"
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List fuel transactions

List fuel purchases, newest or oldest first, for one asset or all.

**Inputs**

- Asset (`asset_id`, number): Only records for this asset.
- Order (`order_direction`, text): The order to return them in, by when they were recorded. One of: `desc` (Newest first), `asc` (Oldest first).
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "asset_id": 1,
        "cost": 1,
        "created_at": "example",
        "currency": "example",
        "driver_id": 1,
        "fuel_type": "example",
        "fuel_vendor_id": 1,
        "id": 1,
        "odometer": 1,
        "odometer_unit": "example",
        "source": "example",
        "updated_at": "example",
        "volume": 1,
        "volume_unit": "example"
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List fuel vendors

List the fuel vendors fuel purchases can name.

**Inputs**

- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "created_at": "example",
        "id": 1,
        "name": "example",
        "updated_at": "example"
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List inspections

List completed inspections, filtered by asset, time or a keyword.

**Inputs**

- Asset (`asset_id`, number): Only records for this asset.
- From (`datetime_from`, date and time): Only inspections at or after this time.
- To (`datetime_to`, date and time): Only inspections before this time.
- Keyword (`keyword`, text): Only inspections matching this word.
- Limit (`limit`, number): How many inspections to return, up to 1,000. From 1 to 1000.
- Cursor (`cursor`, text): To get the next page, the next cursor from an earlier list.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "asset_id": 1,
        "completion": "example",
        "created_at": "example",
        "driver_id": 1,
        "driver_name": "example",
        "end_latitude": "example",
        "end_longitude": "example",
        "form_id": 1,
        "form_name": "example",
        "id": 1,
        "inspection_duration_sec": 1,
        "inspection_ended_on_device": "example",
        "passed": true,
        "pdf_url": "example",
        "start_latitude": "example",
        "start_longitude": "example",
        "team_id": 1
      }
    ],
    "meta": {
      "next_cursor": "example",
      "previous_cursor": "example",
      "result_count": 1
    }
  }
}
```

### List parts

List the parts in inventory, with stock for each team, searched by name or part number.

**Inputs**

- Search (`search`, text): Only parts whose name or part number contains this.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "added_by": {},
        "categories": [
          {}
        ],
        "custom_fields": [
          {}
        ],
        "description": "example",
        "id": 1,
        "manufacturer": {},
        "measurement_unit": {},
        "name": "example",
        "part_image_url": "example",
        "part_number": "example",
        "status": {},
        "stock_on_hand": 1,
        "teams": [
          {}
        ],
        "upc": "example"
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List services

List scheduled services, filtered by whether they're due.

**Inputs**

- Status (`status`, text): Only services in this state. One of: `overdue`, `due_soon` (Due soon), `pending`, `completed`.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "asset_name": "example",
        "completed": {},
        "id": 1,
        "number": "example",
        "schedule": {},
        "service_program_number": "example",
        "status": "example",
        "team": {},
        "title": "example",
        "work_order_item_names": [
          {}
        ]
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List teams

List the business's teams.

**Inputs**

- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "id": 1,
        "name": "example"
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List users

List the business's dashboard users: admins, managers and mechanics.

**Inputs**

- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "email": "example",
        "first_name": "example",
        "id": 1,
        "last_name": "example",
        "phone_number": "example",
        "user_role": "example"
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### List work orders

List maintenance work orders, filtered by due date.

**Inputs**

- Due from (`due_date_from`, date and time): Only work orders due at or after this time.
- Due to (`due_date_to`, date and time): Only work orders due at or before this time.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Limit (`limit`, number): How many records a page holds, up to 1,000. From 1 to 1000.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "asset_id": 1,
        "asset_name": "example",
        "assignee": "example",
        "booking_date": "example",
        "completion_date": "example",
        "completion_engine_hours": "example",
        "completion_odometer": "example",
        "created_at": "example",
        "id": 1,
        "items": [
          {}
        ],
        "number": "example",
        "scheduled_date": "example",
        "status": {}
      }
    ],
    "pagination": {
      "current_page": 1,
      "result_count": 1,
      "total_count": 1
    }
  }
}
```

### Mark asset in service

Put an asset back in service.

**Inputs**

- Asset (`asset_id`, number, required): The asset (vehicle or equipment).
- Reason (`reason`, text): Why, up to 255 characters.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {}
}
```

### Mark asset out of service

Take an asset out of service, so drivers know not to use it.

**Inputs**

- Asset (`asset_id`, number, required): The asset (vehicle or equipment).
- Reason (`reason`, text): Why, up to 255 characters.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {}
}
```

### Update asset

Change an asset's details. Fields left empty keep their value.

**Inputs**

- Asset (`asset_id`, number, required): The asset to change.
- Name (`name`, text): The asset's name.
- Make (`make`, text): The manufacturer.
- Model (`model`, text): The model.
- Year (`year`, number): The model year. From 1900 to 2100.
- VIN (`vin`, text): The vehicle identification number.
- License plate (`license_plate`, text): The license plate.
- Color (`color`, text): The asset's color.
- Tire size (`tire_size`, text): The tire size.
- Estimated cost (`estimated_cost`, number): What the asset is worth. At least 0.
- Team (`team`, number): The team to move the asset to.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {}
}
```

### Update asset mileage

Record an asset's odometer reading. Needs an integration API key.

**Inputs**

- Asset (`asset`, text, required): The asset's ID or VIN.
- Reading (`value`, number, required): The odometer reading. From 0 to 1000000000.
- Unit (`unit`, text, required): The unit of the reading. One of: `mi` (Miles), `km` (Kilometers).
- Override (`override`, true/false): Replace the current reading even when the new one is lower. Default: `false`.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {}
}
```

### Update defect

Move a defect to In progress or Corrected, with the mechanic's declaration.

**Inputs**

- Defect (`defect_id`, number, required): The defect's ID.
- Status (`status`, text): The defect's new status. One of: `NEW`, `IN_PROGRESS` (In progress), `CORRECTED`.
- Mechanic declaration (`mechanic_declaration`, text): What the mechanic did to correct it.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {}
}
```

### Update driver

Change a driver's details. Fields left empty keep their value.

**Inputs**

- Driver (`driver_id`, number, required): The driver's ID.
- First name (`first_name`, text): The driver's first name.
- Last name (`last_name`, text): The driver's last name.
- Mobile phone (`phone_number`, text): The driver's mobile phone number.
- Email (`email`, text): The driver's email address.
- Username (`username`, text): The name the driver signs in to the app with.
- Employee number (`employee_number`, text): The driver's employee number.
- Team (`team`, number): The team the driver belongs to.

**Outputs**

- `data` (object): The response from Whip Around.

**Example output**

```json
{
  "data": {}
}
```
