# FieldRoutes

> Run your pest control or lawn care business in FieldRoutes: find and add customers, schedule, update, cancel and complete appointments, read subscriptions and routes, and keep notes.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/fieldroutes

## Actions

### Add note

Add a note to a customer's account, optionally shown to technicians or the customer.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, from 'Search customers'.
- Note type (`note_type_id`, text, required): The note type, as set up in FieldRoutes.
- Note (`text`, text, required): The note.
- Date (`date`, date): The note's date. Defaults to today.
- Technicians see it (`show_technician`, true/false): Show the note to technicians on the mobile app.
- Customer sees it (`show_customer`, true/false): Show the note to the customer in notifications and the portal.

**Outputs**

- `note_id` (text): The new note's ID

**Example output**

```json
{
  "note_id": "7001"
}
```

### Cancel appointment

Cancel an appointment, with a reason. It can't be undone through the API.

**Inputs**

- Appointment ID (`appointment_id`, text, required): The appointment's ID, from 'Search appointments'.
- Reason (`reason`, text): Why it is cancelled.
- Cancelled by (`cancelled_by`, text): The employee cancelling it.

**Outputs**

- `appointment_id` (text): The appointment
- `cancelled` (true/false): True once cancelled

**Example output**

```json
{
  "appointment_id": "5001",
  "cancelled": true
}
```

### Complete appointment

Mark an appointment completed, with the technician's notes. This runs FieldRoutes' completion steps, such as invoicing.

**Inputs**

- Appointment ID (`appointment_id`, text, required): The appointment's ID, from 'Search appointments'.
- Notes for the customer (`completion_notes`, text): The technician's summary of the service.
- Office notes (`office_notes`, text): Notes only office staff see.
- Completed by (`completed_by`, text): The employee marking it completed.
- Serviced inside (`serviced_interior`, true/false): On if the interior was serviced.

**Outputs**

- `appointment` (object): The appointment
- `completed` (true/false): True once completed

**Example output**

```json
{
  "appointment": {
    "appointmentID": "5001",
    "assignedTech": "21",
    "customerID": "101",
    "date": "2026-12-02",
    "dateAdded": "2026-11-30 08:05:00",
    "dateCompleted": "0000-00-00",
    "duration": "30",
    "end": "10:00:00",
    "notes": "Gate code 1234",
    "routeID": "301",
    "servicedBy": "0",
    "spotID": "9001",
    "start": "08:00:00",
    "status": "1",
    "statusText": "Completed",
    "subscriptionID": "-1",
    "type": "4"
  },
  "completed": true
}
```

### Create customer

Add a customer to the key's office. Give a first name, last name or company.

**Inputs**

- First name (`first_name`, text): The customer's first name.
- Last name (`last_name`, text): The customer's last name.
- Company (`company_name`, text): The company name, for a commercial account.
- Email (`email`, text): The customer's email address.
- Phone (`phone`, text): The customer's main phone number, 10 digits.
- Street address (`address`, text): The service address.
- City (`city`, text): The service city.
- State (`state`, text): The two-letter state code, such as TX.
- ZIP code (`zip_code`, text): The service ZIP code.
- Notes (`notes`, text): General notes on the customer.
- Active (`active`, true/false): Whether the customer is active. Turning it off starts FieldRoutes' cancellation steps.
- Commercial (`commercial`, true/false): A commercial (not residential) account.

**Outputs**

- `customer` (object): The new customer
- `customer_id` (text): The new customer's ID

**Example output**

```json
{
  "customer": {
    "address": "100 Main St",
    "balance": "0.00",
    "city": "Austin",
    "companyName": "",
    "customerID": "101",
    "dateAdded": "2026-11-30 08:00:00",
    "dateUpdated": "2026-11-30 08:00:00",
    "email": "jane@example.com",
    "fname": "Jane",
    "lname": "Doe",
    "officeID": "1",
    "phone1": "5125550100",
    "state": "TX",
    "status": "1",
    "statusText": "Active",
    "zip": "78701"
  },
  "customer_id": "101"
}
```

### Delete note

Delete a customer note. It can't be undone.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, from 'Search customers'.
- Note ID (`note_id`, text, required): The note's ID, from 'Add note' or 'Search notes'.

**Outputs**

- `deleted` (true/false): True once deleted
- `note_id` (text): The note deleted

**Example output**

```json
{
  "deleted": true,
  "note_id": "7001"
}
```

### Get appointment

Get one appointment with its time window, technician, status and notes.

**Inputs**

- Appointment ID (`appointment_id`, text, required): The appointment's ID, from 'Search appointments'.

**Outputs**

- `appointment` (object): The appointment

**Example output**

```json
{
  "appointment": {
    "appointmentID": "5001",
    "assignedTech": "21",
    "customerID": "101",
    "date": "2026-12-02",
    "dateAdded": "2026-11-30 08:05:00",
    "dateCompleted": "0000-00-00",
    "duration": "30",
    "end": "10:00:00",
    "notes": "Gate code 1234",
    "routeID": "301",
    "servicedBy": "0",
    "spotID": "9001",
    "start": "08:00:00",
    "status": "0",
    "statusText": "Pending",
    "subscriptionID": "-1",
    "type": "4"
  }
}
```

### Get customers

Get full customer records by ID, up to 1,000 at a time, optionally with their subscriptions.

**Inputs**

- Customer IDs (`customer_ids`, list, required): One or more customer IDs.
- Include subscriptions (`include_subscriptions`, true/false): Also return each customer's subscriptions.

**Outputs**

- `count` (number): How many were returned
- `customers` (list): The customers

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "address": "100 Main St",
      "balance": "0.00",
      "city": "Austin",
      "companyName": "",
      "customerID": "101",
      "dateAdded": "2026-11-30 08:00:00",
      "dateUpdated": "2026-11-30 08:00:00",
      "email": "jane@example.com",
      "fname": "Jane",
      "lname": "Doe",
      "officeID": "1",
      "phone1": "5125550100",
      "state": "TX",
      "status": "1",
      "statusText": "Active",
      "zip": "78701"
    }
  ]
}
```

### List employees

List employees: technicians, office staff or sales reps.

**Inputs**

- Kind (`employee_type`, text): Only this kind of employee. Leave empty for all. One of: `1` (Technicians), `0` (Office staff), `2` (Sales reps).
- Active (`active`, true/false): On for active employees (FieldRoutes' default), off for inactive.

**Outputs**

- `count` (number): How many records were returned (at most 1,000)
- `employees` (list): The employees
- `ids` (list): The IDs of every match
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "employees": [
    {
      "active": "1",
      "email": "sam@example.com",
      "employeeID": "21",
      "fname": "Sam",
      "lname": "Tech",
      "phone": "5125550101",
      "type": "1"
    }
  ],
  "ids": [
    "21"
  ],
  "total": 1
}
```

### List note types

List the note types notes can be filed under.

**Inputs**: None.

**Outputs**

- `contactTypes` (list): The note types
- `count` (number): How many records were returned (at most 1,000)
- `ids` (list): The IDs of every match
- `total` (number): How many match in all

**Example output**

```json
{
  "contactTypes": [
    {
      "contactType": "General",
      "contactTypeID": "7",
      "visible": "1"
    }
  ],
  "count": 1,
  "ids": [
    "7"
  ],
  "total": 1
}
```

### List offices

List the offices the API key can reach, with their time zones and addresses.

**Inputs**: None.

**Outputs**

- `count` (number): How many records were returned (at most 1,000)
- `ids` (list): The IDs of every match
- `offices` (list): The offices
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "ids": [
    "1"
  ],
  "offices": [
    {
      "city": "Austin",
      "officeID": "1",
      "officeName": "Austin",
      "state": "TX",
      "timeZone": "America/Chicago"
    }
  ],
  "total": 1
}
```

### List routes

List routes (a technician's day of appointments) in a date range, optionally only those the API may schedule onto.

**Inputs**

- From (`date_from`, date): Routes on or after this day.
- To (`date_to`, date): Routes on or before this day.
- Technician (`technician_id`, text): The technician.
- Open to the API only (`api_can_schedule`, true/false): Only routes the API may put appointments on.

**Outputs**

- `count` (number): How many records were returned (at most 1,000)
- `ids` (list): The IDs of every match
- `routes` (list): The routes
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "ids": [
    "301"
  ],
  "routes": [
    {
      "apiCanSchedule": "1",
      "assignedTech": "21",
      "date": "2026-12-02",
      "groupTitle": "North",
      "routeID": "301",
      "title": "Sam - North"
    }
  ],
  "total": 1
}
```

### List service types

List the service types (kinds of service) appointments can be for.

**Inputs**: None.

**Outputs**

- `count` (number): How many records were returned (at most 1,000)
- `ids` (list): The IDs of every match
- `serviceTypes` (list): The service types
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "ids": [
    "4"
  ],
  "serviceTypes": [
    {
      "category": "Pest Control",
      "defaultCharge": "99.00",
      "defaultLength": "30",
      "description": "General pest",
      "typeID": "4"
    }
  ],
  "total": 1
}
```

### Schedule appointment

Schedule a service for a customer on a route or in a spot. The route must let the API schedule onto it.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, from 'Search customers'.
- Service type (`service_type_id`, text, required): The kind of service.
- Window starts (`start_time`, time): When the arrival window opens, in Pacific time. Defaults to the service type's.
- Window ends (`end_time`, time): When the arrival window closes, in Pacific time.
- Length (minutes) (`duration`, number): How long the service takes. Defaults to the service type's. At least 1.
- Technician (`technician_id`, text): The technician.
- Notes (`notes`, text): Notes for the technician before the service.
- Route ID (`route_id`, text): The route (a technician's day) to put it on, from 'List routes'.
- Spot ID (`spot_id`, text): The time slot on a route to put it in. Takes priority over the route.
- Subscription ID (`subscription_id`, text): The subscription it belongs to. Leave empty for a one-off service.

**Outputs**

- `appointment` (object): The new appointment
- `appointment_id` (text): The new appointment's ID

**Example output**

```json
{
  "appointment": {
    "appointmentID": "5001",
    "assignedTech": "21",
    "customerID": "101",
    "date": "2026-12-02",
    "dateAdded": "2026-11-30 08:05:00",
    "dateCompleted": "0000-00-00",
    "duration": "30",
    "end": "10:00:00",
    "notes": "Gate code 1234",
    "routeID": "301",
    "servicedBy": "0",
    "spotID": "9001",
    "start": "08:00:00",
    "status": "0",
    "statusText": "Pending",
    "subscriptionID": "-1",
    "type": "4"
  },
  "appointment_id": "5001"
}
```

### Search appointments

Find appointments by customer, status, technician, or the days they are scheduled, were added or were completed. Without a status, pending and completed ones are found. Returns up to 1,000 full records.

**Inputs**

- Customer ID (`customer_id`, text): Only this customer's appointments.
- Status (`status`, text): Only appointments with this status. One of: `0` (Pending), `1` (Completed), `2` (No show), `-1` (Cancelled), `-2` (Rescheduled).
- Scheduled from (`scheduled_from`, date): Appointments on or after this day.
- Scheduled to (`scheduled_to`, date): Appointments on or before this day.
- Added from (`added_from`, date): Appointments booked on or after this day.
- Completed on (`completed_on`, date): Appointments completed on this day.
- Technician (`technician_id`, text): The technician.

**Outputs**

- `appointments` (list): The appointments
- `count` (number): How many records were returned (at most 1,000)
- `ids` (list): The IDs of every match
- `total` (number): How many match in all

**Example output**

```json
{
  "appointments": [
    {
      "appointmentID": "5001",
      "assignedTech": "21",
      "customerID": "101",
      "date": "2026-12-02",
      "dateAdded": "2026-11-30 08:05:00",
      "dateCompleted": "0000-00-00",
      "duration": "30",
      "end": "10:00:00",
      "notes": "Gate code 1234",
      "routeID": "301",
      "servicedBy": "0",
      "spotID": "9001",
      "start": "08:00:00",
      "status": "0",
      "statusText": "Pending",
      "subscriptionID": "-1",
      "type": "4"
    }
  ],
  "count": 1,
  "ids": [
    "5001"
  ],
  "total": 1
}
```

### Search customers

Find customers by name, company, email, phone, ZIP, status or the days they were added or changed. Returns up to 1,000 full records.

**Inputs**

- Active (`active`, true/false): On for active customers, off for inactive. Leave empty for both.
- First name (`first_name`, text): Exact first name.
- Last name (`last_name`, text): Exact last name.
- Company (`company_name`, text): Company name.
- Email (`email`, text): Main email address.
- Phone (`phone`, text): Any of their phone numbers, 10 digits.
- ZIP code (`zip_code`, text): Service ZIP code.
- Added from (`added_from`, date): Customers added on or after this day.
- Added to (`added_to`, date): Customers added on or before this day.
- Changed from (`updated_from`, date): Customers changed on or after this day.
- Changed to (`updated_to`, date): Customers changed on or before this day.

**Outputs**

- `count` (number): How many records were returned (at most 1,000)
- `customers` (list): The customers
- `ids` (list): The IDs of every match
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "address": "100 Main St",
      "balance": "0.00",
      "city": "Austin",
      "companyName": "",
      "customerID": "101",
      "dateAdded": "2026-11-30 08:00:00",
      "dateUpdated": "2026-11-30 08:00:00",
      "email": "jane@example.com",
      "fname": "Jane",
      "lname": "Doe",
      "officeID": "1",
      "phone1": "5125550100",
      "state": "TX",
      "status": "1",
      "statusText": "Active",
      "zip": "78701"
    }
  ],
  "ids": [
    "101"
  ],
  "total": 1
}
```

### Search notes

Find customer notes, optionally for one customer or containing some words.

**Inputs**

- Customer ID (`customer_id`, text): Only this customer's notes.
- Contains (`contains`, text): Only notes with these words in them.

**Outputs**

- `count` (number): How many records were returned (at most 1,000)
- `ids` (list): The IDs of every match
- `notes` (list): The notes
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "ids": [
    "7001"
  ],
  "notes": [
    {
      "customerID": "101",
      "date": "2026-11-30",
      "employeeName": "Sam Tech",
      "noteID": "7001",
      "notes": "Called about pricing",
      "typeID": "7"
    }
  ],
  "total": 1
}
```

### Search subscriptions

Find subscriptions (recurring services), optionally for one customer or only active ones. Returns up to 1,000 full records.

**Inputs**

- Customer ID (`customer_id`, text): Only this customer's subscriptions.
- Active (`active`, true/false): On for active subscriptions, off for inactive.

**Outputs**

- `count` (number): How many records were returned (at most 1,000)
- `ids` (list): The IDs of every match
- `subscriptions` (list): The subscriptions
- `total` (number): How many match in all

**Example output**

```json
{
  "count": 1,
  "ids": [
    "8001"
  ],
  "subscriptions": [
    {
      "active": "1",
      "customerID": "101",
      "dateAdded": "2026-01-15 09:00:00",
      "frequency": "90",
      "lastCompleted": "2026-11-30",
      "nextService": "2027-02-28",
      "recurringCharge": "99.00",
      "serviceType": "General pest",
      "subscriptionID": "8001"
    }
  ],
  "total": 1
}
```

### Update appointment

Change an appointment's time window, length, technician, notes, route or spot. Only the fields given change.

**Inputs**

- Appointment ID (`appointment_id`, text, required): The appointment's ID, from 'Search appointments'.
- Window starts (`start_time`, time): When the arrival window opens, in Pacific time. Defaults to the service type's.
- Window ends (`end_time`, time): When the arrival window closes, in Pacific time.
- Length (minutes) (`duration`, number): How long the service takes. Defaults to the service type's. At least 1.
- Technician (`technician_id`, text): The technician.
- Notes (`notes`, text): Notes for the technician before the service.
- Route ID (`route_id`, text): The route (a technician's day) to put it on, from 'List routes'.
- Spot ID (`spot_id`, text): The time slot on a route to put it in. Takes priority over the route.

**Outputs**

- `appointment` (object): The appointment
- `appointment_id` (text): The appointment's ID

**Example output**

```json
{
  "appointment": {
    "appointmentID": "5001",
    "assignedTech": "21",
    "customerID": "101",
    "date": "2026-12-02",
    "dateAdded": "2026-11-30 08:05:00",
    "dateCompleted": "0000-00-00",
    "duration": "30",
    "end": "10:00:00",
    "notes": "Dog in yard",
    "routeID": "301",
    "servicedBy": "0",
    "spotID": "9001",
    "start": "08:00:00",
    "status": "0",
    "statusText": "Pending",
    "subscriptionID": "-1",
    "type": "4"
  },
  "appointment_id": "5001"
}
```

### Update customer

Change a customer's name, contact details, address, notes or status. Only the fields given change.

**Inputs**

- Customer ID (`customer_id`, text, required): The customer's ID, from 'Search customers'.
- First name (`first_name`, text): The customer's first name.
- Last name (`last_name`, text): The customer's last name.
- Company (`company_name`, text): The company name, for a commercial account.
- Email (`email`, text): The customer's email address.
- Phone (`phone`, text): The customer's main phone number, 10 digits.
- Street address (`address`, text): The service address.
- City (`city`, text): The service city.
- State (`state`, text): The two-letter state code, such as TX.
- ZIP code (`zip_code`, text): The service ZIP code.
- Notes (`notes`, text): General notes on the customer.
- Active (`active`, true/false): Whether the customer is active. Turning it off starts FieldRoutes' cancellation steps.

**Outputs**

- `customer` (object): The customer
- `customer_id` (text): The customer's ID

**Example output**

```json
{
  "customer": {
    "address": "100 Main St",
    "balance": "0.00",
    "city": "Austin",
    "companyName": "",
    "customerID": "101",
    "dateAdded": "2026-11-30 08:00:00",
    "dateUpdated": "2026-11-30 08:00:00",
    "email": "jane@example.com",
    "fname": "Jane",
    "lname": "Doe",
    "officeID": "1",
    "phone1": "5125550199",
    "state": "TX",
    "status": "1",
    "statusText": "Active",
    "zip": "78701"
  },
  "customer_id": "101"
}
```
