# ServiceTitan

> Manage customers, locations and leads, and look up jobs, appointments and team settings.

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

## Actions

### Create customer

Create customer.

**Inputs**

- Name (`name`, text, required): Name of the customer
- Customer type (`customer_type`, text): Residential or commercial. One of: `Residential`, `Commercial`.
- Do not mail (`doNotMail`, true/false): Customer has been flagged as “do not mail”
- Do not service (`doNotService`, true/false): Customer has been flagged as “do not service”
- National account (`nationalAccount`, true/false): Customer has been flagged as National Account
- Locations (`locations`, list, required): Locations for the customer
- Address (`address`, object, required): Bill-To address of the customer record
- Contacts (`contacts`, list): Contacts for the customer
- Custom fields (`customFields`, list): Customer record’s custom fields
- Tag type ids (`tagTypeIds`, list): Tag Type IDs to be associated with the customer
- External data (`externalData`, object): Optional model that contains a list of external data items that should be attached to this Customer.
- Tax exempt (`taxExempt`, true/false): Optional Tax Exempt.
- Payment term id (`paymentTermId`, number): Optional Payment Term ID.
- Credit limit (`creditLimit`, number): Credit Limit for the customer.
- Credit limit balance (`creditLimitBalance`, number): Credit Limit for the customer.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": {
      "city": "example",
      "country": "example",
      "latitude": 1.0,
      "longitude": 1.0,
      "state": "example",
      "street": "example",
      "unit": "example",
      "zip": "example"
    },
    "balance": 1.0,
    "contacts": [],
    "createdById": 1,
    "createdOn": "example",
    "creditLimit": 1.0,
    "creditLimitBalance": 1.0,
    "customFields": [],
    "doNotMail": false,
    "doNotService": false,
    "externalData": [],
    "id": 1,
    "locations": [],
    "mergedToId": 1,
    "modifiedOn": "example",
    "name": "example",
    "nationalAccount": false,
    "paymentTermId": 1,
    "tagTypeIds": [],
    "taxExempt": false,
    "type": "Residential"
  }
}
```

### Create customer contact

Create customer contact.

**Inputs**

- Id (`id`, number, required): Id.
- Contact type (`contact_type`, text, required): Landline, mobile, e-mail, or fax. One of: `Phone`, `Email`, `Fax`, `MobilePhone`.
- Value (`value`, text, required): The email, phone number, or fax number for the contact
- Memo (`memo`, text): Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly”

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "createdOn": "example",
    "id": 1,
    "memo": "example",
    "modifiedOn": "example",
    "phoneSettings": {
      "doNotText": false,
      "phoneNumber": "example"
    },
    "preferences": {
      "invoiceNotification": false,
      "invoiceStatementNotification": false,
      "jobRemindersEnabled": false,
      "marketingUpdatesEnabled": false,
      "statementNotification": false
    },
    "type": "Phone",
    "value": "example"
  }
}
```

### Create lead

Create lead.

**Inputs**

- Customer (`customerId`, number): ID of the customer
- Location (`locationId`, number): ID of the location
- Campaign id (`campaignId`, number, required): ID of the campaign
- Business unit (`businessUnitId`, number): ID of the business unit
- Job type (`jobTypeId`, number): ID of job type
- Summary (`summary`, text, required): Lead summary
- Tag type ids (`tagTypeIds`, list): List of IDs of tags on the lead
- Priority (`priority`, text): Priority of the lead. One of: `Low`, `Normal`, `High`, `Urgent`.
- Call reason id (`callReasonId`, number): ID of the call reason. Required if follow up date is not provided.
- Follow up date (`followUpDate`, date and time): Date of when to follow up. Required if call reason ID is not provided.
- Booking id (`bookingId`, number): The associated Booking Id to use for creating the Lead. This Booking will be dismissed and a Lead will get created associated to this Booking.
- Lead customer name (`leadCustomerName`, text): Customer name provided for the lead
- Lead phone (`leadPhone`, text): Phone number provided for the lead
- Lead email (`leadEmail`, text): Email provided for the lead
- Lead street (`leadStreet`, text): Street provided for the lead
- Lead unit (`leadUnit`, text): Unit provided for the lead
- Lead city (`leadCity`, text): City provided for the lead
- Lead state (`leadState`, text): State provided for the lead
- Lead zip (`leadZip`, text): Zip provided for the lead
- Lead country (`leadCountry`, text): Country provided for the lead

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "bookingId": 1,
    "businessUnitId": 1,
    "callId": 1,
    "callReasonId": 1,
    "campaignId": 1,
    "captureSource": "example",
    "createdById": 1,
    "createdOn": "example",
    "customerId": 1,
    "dismissingReasonId": 1,
    "followUpDate": "example",
    "id": 1,
    "jobTypeId": 1,
    "leadCity": "example",
    "leadCountry": "example",
    "leadCustomerName": "example",
    "leadEmail": "example",
    "leadPhone": "example",
    "leadState": "example",
    "leadStreet": "example",
    "leadUnit": "example",
    "leadUrl": "example",
    "leadZip": "example",
    "locationId": 1,
    "manualCallId": 1,
    "modifiedOn": "example",
    "priority": "Low",
    "status": "Open",
    "summary": "example",
    "tagTypeIds": []
  }
}
```

### Create location

Create location.

**Inputs**

- Name (`name`, text, required): Name of the location
- Address (`address`, object, required): Address of the location record
- Contacts (`contacts`, list): Contacts for the location
- Custom fields (`customFields`, list): Location record’s custom fields
- Tag type ids (`tagTypeIds`, list): Tag type ids for the location
- External data (`externalData`, object): Optional model that contains a list of external data items that should be attached to this Location.
- Coordinates source (`coordinatesSource`, text): Gets or sets the source of the coordinates. One of: `None`, `System`, `User`, `Imported`.
- Coordinates verification status (`coordinatesVerificationStatus`, text): Gets or sets the verification status of the coordinates. One of: `Unverified`, `InProgress`, `Failed`, `Verified`.
- Tax zone id (`taxZoneId`, number): Optional tax zone id to use for the location. When provided, this tax zone is used instead of being automatically resolved from the location’s address.
- Customer (`customerId`, number, required): ID of the location’s customer.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": {
      "city": "example",
      "country": "example",
      "latitude": 1.0,
      "longitude": 1.0,
      "state": "example",
      "street": "example",
      "unit": "example",
      "zip": "example"
    },
    "contacts": [],
    "createdById": 1,
    "createdOn": "example",
    "customFields": [],
    "customerId": 1,
    "externalData": [],
    "id": 1,
    "mergedToId": 1,
    "modifiedOn": "example",
    "name": "example",
    "tagTypeIds": [],
    "taxExempt": false,
    "taxZoneId": 1,
    "zoneId": 1
  }
}
```

### Create location contact

Create location contact.

**Inputs**

- Id (`id`, number, required): Id.
- Contact type (`contact_type`, text, required): Type of contact. One of: `Phone`, `Email`, `Fax`, `MobilePhone`.
- Value (`value`, text, required): Value of contact
- Memo (`memo`, text): Memo of contact

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "createdOn": "example",
    "id": 1,
    "memo": "example",
    "modifiedOn": "example",
    "phoneSettings": {
      "doNotText": false,
      "phoneNumber": "example"
    },
    "preferences": {
      "invoiceNotification": false,
      "invoiceStatementNotification": false,
      "jobRemindersEnabled": false,
      "marketingUpdatesEnabled": false,
      "statementNotification": false
    },
    "type": "Phone",
    "value": "example"
  }
}
```

### Get appointment

Get appointment.

**Inputs**

- Id (`id`, number, required): Id.

**Outputs**

- `data` (object): Appointment response model

**Example output**

```json
{
  "data": {
    "active": false,
    "appointmentNumber": "example",
    "appointmentSummaries": [],
    "arrivalWindowEnd": "example",
    "arrivalWindowStart": "example",
    "createdById": 1,
    "createdOn": "example",
    "customerId": 1,
    "end": "example",
    "id": 1,
    "isConfirmed": false,
    "jobId": 1,
    "modifiedOn": "example",
    "specialInstructions": "example",
    "start": "example",
    "status": "Scheduled",
    "unused": false
  }
}
```

### Get customer

Get customer.

**Inputs**

- Id (`id`, number, required): Id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": {
      "city": "example",
      "country": "example",
      "latitude": 1.0,
      "longitude": 1.0,
      "state": "example",
      "street": "example",
      "unit": "example",
      "zip": "example"
    },
    "balance": 1.0,
    "createdById": 1,
    "createdOn": "example",
    "creditLimit": 1.0,
    "creditLimitBalance": 1.0,
    "customFields": [],
    "doNotMail": false,
    "doNotService": false,
    "externalData": [],
    "id": 1,
    "mergedToId": 1,
    "modifiedOn": "example",
    "name": "example",
    "nationalAccount": false,
    "paymentTermId": 1,
    "tagTypeIds": [],
    "taxExempt": false,
    "type": "Residential"
  }
}
```

### Get job

Get job.

**Inputs**

- Id (`id`, number, required): Id.
- External data application guid (`externalDataApplicationGuid`, text): External data application guid.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "appointmentCount": 1,
    "bookingId": 1,
    "businessUnitId": 1,
    "campaignId": 1,
    "completedOn": "example",
    "createdById": 1,
    "createdFromEstimateId": 1,
    "createdOn": "example",
    "customFields": [],
    "customerId": 1,
    "customerPo": "example",
    "equipmentIds": [],
    "estimateIds": [],
    "externalData": [],
    "firstAppointmentId": 1,
    "id": 1,
    "invoiceId": 1,
    "isAutoDispatched": false,
    "jobGeneratedLeadSource": {
      "employeeId": 1,
      "jobId": 1
    },
    "jobNumber": "example",
    "jobStatus": "example",
    "jobTypeId": 1,
    "lastAppointmentId": 1,
    "leadCallId": 1,
    "locationId": 1,
    "membershipId": 1,
    "modifiedOn": "example",
    "noCharge": false,
    "notificationsEnabled": false,
    "partnerLeadCallId": 1,
    "priority": "example",
    "projectId": 1,
    "recallForId": 1,
    "soldById": 1,
    "summary": "example",
    "summaryOfWork": "example",
    "tagTypeIds": [],
    "total": 1.0,
    "warrantyId": 1
  }
}
```

### Get lead

Get lead.

**Inputs**

- Id (`id`, number, required): Id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "bookingId": 1,
    "businessUnitId": 1,
    "callId": 1,
    "callReasonId": 1,
    "campaignId": 1,
    "captureSource": "example",
    "createdById": 1,
    "createdOn": "example",
    "customerId": 1,
    "dismissingReasonId": 1,
    "followUpDate": "example",
    "id": 1,
    "jobTypeId": 1,
    "leadCity": "example",
    "leadCountry": "example",
    "leadCustomerName": "example",
    "leadEmail": "example",
    "leadPhone": "example",
    "leadState": "example",
    "leadStreet": "example",
    "leadUnit": "example",
    "leadUrl": "example",
    "leadZip": "example",
    "locationId": 1,
    "manualCallId": 1,
    "modifiedOn": "example",
    "priority": "Low",
    "status": "Open",
    "summary": "example",
    "tagTypeIds": []
  }
}
```

### Get location

Get location.

**Inputs**

- Id (`id`, number, required): Id.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": {
      "city": "example",
      "country": "example",
      "latitude": 1.0,
      "longitude": 1.0,
      "state": "example",
      "street": "example",
      "unit": "example",
      "zip": "example"
    },
    "createdById": 1,
    "createdOn": "example",
    "customFields": [],
    "customerId": 1,
    "externalData": [],
    "id": 1,
    "mergedToId": 1,
    "modifiedOn": "example",
    "name": "example",
    "tagTypeIds": [],
    "taxExempt": false,
    "taxZoneId": 1,
    "zoneId": 1
  }
}
```

### List appointments

List appointments.

**Inputs**

- Ids (`ids`, text): Ids.
- Active (`active`, text): Represents possible HTTP query argument values, when applying filters based on active status. One of: `True`, `Any`, `False`.
- Job id (`jobId`, number): Job id.
- Project id (`projectId`, number): Project id.
- Number (`number`, text): Number.
- Status (`status`, text): Indicates the status of a Job Appointment. One of: `Scheduled`, `Dispatched`, `Working`, `Hold`, `Done`, `Canceled`.
- Starts on or after (`startsOnOrAfter`, date and time): Starts on or after.
- Starts before (`startsBefore`, date and time): Starts before.
- Technician (`technicianId`, number): Technician id.
- Customer (`customerId`, number): Customer id.
- Unused (`unused`, true/false): Unused.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Created before (`createdBefore`, date and time): Created before.
- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Sort (`sort`, text): Sort.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List business units

List business units.

**Inputs**

- Ids (`ids`, text): Ids.
- Name (`name`, text): Name.
- Active (`active`, text): Represents possible HTTP query argument values, when applying filters based on active status. One of: `True`, `Any`, `False`.
- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Created before (`createdBefore`, date and time): Created before.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.
- Sort (`sort`, text): Sort.
- External data application guid (`externalDataApplicationGuid`, text): External data application guid.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List contacts

List contacts.

**Inputs**

- Name (`name`, text): Name.
- Title (`title`, text): Title.
- Reference id (`referenceId`, text): Reference id.
- Is archived (`isArchived`, text): Is archived.
- Created before (`createdBefore`, date and time): Created before.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.
- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Sort (`sort`, text): Sort.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List customer contacts

List customer contacts.

**Inputs**

- Id (`id`, number, required): Id.
- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List customers

List customers.

**Inputs**

- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Sort (`sort`, text): Sort.
- Ids (`ids`, text): Ids.
- Created before (`createdBefore`, date and time): Created before.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.
- Exclude accounting changes from modified date range (`excludeAccountingChangesFromModifiedDateRange`, true/false): Exclude accounting changes from modified date range.
- Name (`name`, text): Name.
- Street (`street`, text): Street.
- Unit (`unit`, text): Unit.
- City (`city`, text): City.
- State (`state`, text): State.
- Zip (`zip`, text): Zip.
- Country (`country`, text): Country.
- Latitude (`latitude`, number): Latitude.
- Longitude (`longitude`, number): Longitude.
- Phone (`phone`, text): Phone.
- Active (`active`, text): Represents possible HTTP query argument values, when applying filters based on active status. One of: `True`, `Any`, `False`.
- External data application guid (`externalDataApplicationGuid`, text): External data application guid.
- External data key (`externalDataKey`, text): External data key.
- External data values (`externalDataValues`, text): External data values.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List job types

List job types.

**Inputs**

- Name (`name`, text): Name.
- Min duration (`minDuration`, number): Min duration.
- Max duration (`maxDuration`, number): Max duration.
- Priority (`priority`, text): Priority.
- Ids (`ids`, text): Ids.
- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Active (`active`, text): Represents possible HTTP query argument values, when applying filters based on active status. One of: `True`, `Any`, `False`.
- Order by (`orderBy`, text): Order by.
- Order by direction (`orderByDirection`, text): Order by direction.
- Created before (`createdBefore`, date and time): Created before.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.
- External data application guid (`externalDataApplicationGuid`, text): External data application guid.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List jobs

List jobs.

**Inputs**

- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Ids (`ids`, text): Ids.
- Number (`number`, text): Number.
- Project id (`projectId`, number): Project id.
- Booking id (`bookingId`, number): Booking id.
- Job status (`jobStatus`, text): Jobstatus. One of: `Scheduled`, `Dispatched`, `InProgress`, `Hold`, `Completed`, `Canceled`.
- Appointment status (`appointmentStatus`, text): Appointmentstatus. One of: `Scheduled`, `Dispatched`, `Working`, `Hold`, `Done`, `Canceled`.
- Priority (`priority`, text): Priority.
- First appointment starts on or after (`firstAppointmentStartsOnOrAfter`, date and time): First appointment starts on or after.
- First appointment starts before (`firstAppointmentStartsBefore`, date and time): First appointment starts before.
- Appointment starts on or after (`appointmentStartsOnOrAfter`, date and time): Appointment starts on or after.
- Appointment starts before (`appointmentStartsBefore`, date and time): Appointment starts before.
- Technician (`technicianId`, number): Technician id.
- Customer (`customerId`, number): Customer id.
- Location (`locationId`, number): Location id.
- Sold by id (`soldById`, number): Sold by id.
- Job type (`jobTypeId`, number): Job type id.
- Campaign id (`campaignId`, number): Campaign id.
- Business unit (`businessUnitId`, number): Business unit id.
- Invoice id (`invoiceId`, number): Invoice id.
- Created from estimate id (`createdFromEstimateId`, number): Created from estimate id.
- Estimate ids (`estimateIds`, text): Estimate ids.
- Created before (`createdBefore`, date and time): Created before.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.
- Completed on or after (`completedOnOrAfter`, date and time): Completed on or after.
- Completed before (`completedBefore`, date and time): Completed before.
- Tag type ids (`tagTypeIds`, text): Tag type ids.
- Equipment ids (`equipmentIds`, text): Equipment ids.
- Sort (`sort`, text): Sort.
- External data application guid (`externalDataApplicationGuid`, text): External data application guid.
- External data key (`externalDataKey`, text): External data key.
- External data values (`externalDataValues`, text): External data values.
- Has unused appointments (`hasUnusedAppointments`, true/false): Has unused appointments.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List leads

List leads.

**Inputs**

- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Ids (`ids`, text): Ids.
- Created before (`createdBefore`, date and time): Created before.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.
- Customer (`customerId`, number): Customer id.
- Is prospect (`isProspect`, true/false): Is prospect.
- Without customer (`withoutCustomer`, true/false): Without customer.
- Status (`status`, text): Status. One of: `Open`, `Dismissed`, `Converted`.
- Customer city (`customerCity`, text): Customer city.
- Customer state (`customerState`, text): Customer state.
- Customer zip (`customerZip`, text): Customer zip.
- Customer created on or after (`customerCreatedOnOrAfter`, date and time): Customer created on or after.
- Customer created before (`customerCreatedBefore`, date and time): Customer created before.
- Customer modified on or after (`customerModifiedOnOrAfter`, date and time): Customer modified on or after.
- Sort (`sort`, text): Sort.
- Gen perm url (`genPermUrl`, true/false): Gen perm url.
- Lead customer name (`leadCustomerName`, text): Lead customer name.
- Lead phone (`leadPhone`, text): Lead phone.
- Is capture source form (`isCaptureSourceForm`, true/false): Is capture source form.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List location contacts

List location contacts.

**Inputs**

- Id (`id`, number, required): Id.
- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List locations

List locations.

**Inputs**

- Ids (`ids`, text): Ids.
- Name (`name`, text): Name.
- Customer (`customerId`, number): Customer id.
- Street (`street`, text): Street.
- Unit (`unit`, text): Unit.
- City (`city`, text): City.
- State (`state`, text): State.
- Zip (`zip`, text): Zip.
- Country (`country`, text): Country.
- Latitude (`latitude`, number): Latitude.
- Longitude (`longitude`, number): Longitude.
- Active (`active`, text): Represents possible HTTP query argument values, when applying filters based on active status. One of: `True`, `Any`, `False`.
- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Sort (`sort`, text): Sort.
- Created before (`createdBefore`, date and time): Created before.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.
- External data application guid (`externalDataApplicationGuid`, text): External data application guid.
- External data key (`externalDataKey`, text): External data key.
- External data values (`externalDataValues`, text): External data values.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List tag types

List tag types.

**Inputs**

- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Active (`active`, text): Represents possible HTTP query argument values, when applying filters based on active status. One of: `True`, `Any`, `False`.
- Created before (`createdBefore`, date and time): Created before.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.
- Sort (`sort`, text): Sort.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### List technicians

List technicians.

**Inputs**

- Ids (`ids`, text): Ids.
- User ids (`userIds`, text): User ids.
- Name (`name`, text): Name.
- Active (`active`, text): Represents possible HTTP query argument values, when applying filters based on active status. One of: `True`, `Any`, `False`.
- Page (`page`, number): Page. From 1 to 100000. Default: `1`.
- Page size (`pageSize`, number): Page size. From 1 to 5000. Default: `50`.
- Include total (`includeTotal`, true/false): Include total.
- Created before (`createdBefore`, date and time): Created before.
- Created on or after (`createdOnOrAfter`, date and time): Created on or after.
- Modified before (`modifiedBefore`, date and time): Modified before.
- Modified on or after (`modifiedOnOrAfter`, date and time): Modified on or after.

**Outputs**

- `data` (object): Represents paginated API response.

**Example output**

```json
{
  "data": {
    "data": [],
    "hasMore": false,
    "page": 1,
    "pageSize": 1,
    "totalCount": 1
  }
}
```

### Update customer

Update customer.

**Inputs**

- Id (`id`, number, required): Id.
- Name (`name`, text): Name of the customer
- Customer type (`customer_type`, text): Residential or commercial. One of: `Residential`, `Commercial`.
- Address (`address`, object): Bill-To address of the customer record
- Custom fields (`customFields`, list): Customer record’s custom fields
- External data (`externalData`, object): External data update model.
- Do not mail (`doNotMail`, true/false): Customer has been flagged as “do not mail”
- Do not service (`doNotService`, true/false): Customer has been flagged as “do not service”
- National account (`nationalAccount`, true/false): Customer has been flagged as National Account
- Active (`active`, true/false): Customer has been flagged as “active” ar "innactive"
- Tag type ids (`tagTypeIds`, list): IDs of the Tag Types
- Tax exempt (`taxExempt`, true/false): Customer has been flagged as Tax Exempt
- Payment term id (`paymentTermId`, number): Payment Term ID
- Credit limit (`creditLimit`, number): Credit Limit for the customer.
- Credit limit balance (`creditLimitBalance`, number): Credit Limit Balance for the customer.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": {
      "city": "example",
      "country": "example",
      "latitude": 1.0,
      "longitude": 1.0,
      "state": "example",
      "street": "example",
      "unit": "example",
      "zip": "example"
    },
    "balance": 1.0,
    "createdById": 1,
    "createdOn": "example",
    "creditLimit": 1.0,
    "creditLimitBalance": 1.0,
    "customFields": [],
    "doNotMail": false,
    "doNotService": false,
    "externalData": [],
    "id": 1,
    "mergedToId": 1,
    "modifiedOn": "example",
    "name": "example",
    "nationalAccount": false,
    "paymentTermId": 1,
    "tagTypeIds": [],
    "taxExempt": false,
    "type": "Residential"
  }
}
```

### Update lead

Update lead.

**Inputs**

- Id (`id`, number, required): Id.
- Campaign id (`campaignId`, number): ID of the campaign
- Priority (`priority`, text): Priority of the lead. One of: `Low`, `Normal`, `High`, `Urgent`.
- Business unit (`businessUnitId`, number): ID of the business unit
- Job type (`jobTypeId`, number): ID of job type
- Summary (`summary`, text): Lead summary
- Lead customer name (`leadCustomerName`, text): Customer name provided for the lead
- Lead phone (`leadPhone`, text): Phone number provided for the lead
- Lead email (`leadEmail`, text): Email provided for the lead
- Lead street (`leadStreet`, text): Street provided for the lead
- Lead unit (`leadUnit`, text): Unit provided for the lead
- Lead city (`leadCity`, text): City provided for the lead
- Lead state (`leadState`, text): State provided for the lead
- Lead zip (`leadZip`, text): Zip provided for the lead
- Lead country (`leadCountry`, text): Country provided for the lead

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "bookingId": 1,
    "businessUnitId": 1,
    "callId": 1,
    "callReasonId": 1,
    "campaignId": 1,
    "captureSource": "example",
    "createdById": 1,
    "createdOn": "example",
    "customerId": 1,
    "dismissingReasonId": 1,
    "followUpDate": "example",
    "id": 1,
    "jobTypeId": 1,
    "leadCity": "example",
    "leadCountry": "example",
    "leadCustomerName": "example",
    "leadEmail": "example",
    "leadPhone": "example",
    "leadState": "example",
    "leadStreet": "example",
    "leadUnit": "example",
    "leadUrl": "example",
    "leadZip": "example",
    "locationId": 1,
    "manualCallId": 1,
    "modifiedOn": "example",
    "priority": "Low",
    "status": "Open",
    "summary": "example",
    "tagTypeIds": []
  }
}
```

### Update location

Update location.

**Inputs**

- Id (`id`, number, required): Id.
- Customer (`customerId`, number): ID of the location’s customer.
- Name (`name`, text): Name of the location
- Address (`address`, object): Address of the location record
- Active (`active`, true/false): If false, the record has been deactivated.
- Tax zone id (`taxZoneId`, number): ID of the location tax zone
- Custom fields (`customFields`, list): List of custom fields and their values. This list must describe the full list of custom fields on the location. If location A has values for custom fields X and Y and this field only contains a model for custom field X, then the value for custom field Y on location A will be removed.
- Tag type ids (`tagTypeIds`, list): List of tag type IDs. If location has tag types X and Y and this field only contains tag type X, then Y will removed from the location. If it is an empty list, all tags on the location will be removed.
- External data (`externalData`, object): Optional model that contains a list of external data items that should be updated to this Location.

**Outputs**

- `data` (object): Result.

**Example output**

```json
{
  "data": {
    "active": false,
    "address": {
      "city": "example",
      "country": "example",
      "latitude": 1.0,
      "longitude": 1.0,
      "state": "example",
      "street": "example",
      "unit": "example",
      "zip": "example"
    },
    "createdById": 1,
    "createdOn": "example",
    "customFields": [],
    "customerId": 1,
    "externalData": [],
    "id": 1,
    "mergedToId": 1,
    "modifiedOn": "example",
    "name": "example",
    "tagTypeIds": [],
    "taxExempt": false,
    "taxZoneId": 1,
    "zoneId": 1
  }
}
```
