# ServiceM8

> Manage jobs, customers and job scheduling records in your ServiceM8 account.

App · 16 actions. Web page: https://docs.lodol.com/docs/integrations/servicem8

## Actions

### Archive a customer

Set a customer inactive in ServiceM8.

**Inputs**

- Customer (`customer_id`, text, required): The customer id.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

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

### Archive a job

Set a job inactive in ServiceM8.

**Inputs**

- Job (`job_id`, text, required): The job id.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

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

### Create a customer

Add a new customer to ServiceM8.

**Inputs**

- Name (`name`, text, required): The customer or company name.
- Email (`email`, text): The customer email address.
- Phone (`phone`, text): The customer phone number.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "uuid": "example"
  }
}
```

### Create a job

Add a new job to ServiceM8.

**Inputs**

- Description (`description`, text, required): Describe the work to do.
- Address (`address`, text): The address of the job.
- Status (`status`, text): Choose the job status. One of: `Quote`, `Work Order`, `Completed`, `Unsuccessful`.
- Customer (`customer`, text): Choose the customer.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "uuid": "example"
  }
}
```

### Get a customer

Read one customer by ID.

**Inputs**

- Customer (`customer_id`, text, required): The customer id.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "active": 1,
    "edit_date": "example",
    "email": "example",
    "name": "example",
    "phone": "example",
    "uuid": "example"
  }
}
```

### Get a customer contact

Read one customer contact by ID.

**Inputs**

- Customer contact (`customer_contact_id`, text, required): The customer contact id.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "active": 1,
    "company_uuid": "example",
    "email": "example",
    "first": "example",
    "last": "example",
    "mobile": "example",
    "phone": "example",
    "uuid": "example"
  }
}
```

### Get a job

Read one job by ID.

**Inputs**

- Job (`job_id`, text, required): The job id.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "active": 1,
    "company_uuid": "example",
    "edit_date": "example",
    "generated_job_id": "example",
    "job_address": "example",
    "job_description": "example",
    "status": "example",
    "uuid": "example"
  }
}
```

### Get a job activity

Read one job activity by ID.

**Inputs**

- Job activity (`job_activity_id`, text, required): The job activity id.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "active": 1,
    "edit_date": "example",
    "end_date": "example",
    "job_uuid": "example",
    "staff_uuid": "example",
    "start_date": "example",
    "uuid": "example"
  }
}
```

### Get a staff member

Read one staff member by ID.

**Inputs**

- Staff member (`staff_member_id`, text, required): The staff member id.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "active": 1,
    "email": "example",
    "first": "example",
    "last": "example",
    "uuid": "example"
  }
}
```

### List customer contacts

Return a page of customer contacts.

**Inputs**

- Limit (`limit`, number): Maximum number of results to return. From 1 to 999.
- Cursor (`cursor`, text): Use the next cursor from the previous response. Leave empty for the first page.
- Filter (`filter`, text): An optional ServiceM8 filter, such as active eq 1.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "active": 1,
        "company_uuid": "example",
        "email": "example",
        "first": "example",
        "last": "example",
        "mobile": "example",
        "phone": "example",
        "uuid": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List customers

Return a page of customers.

**Inputs**

- Limit (`limit`, number): Maximum number of results to return. From 1 to 999.
- Cursor (`cursor`, text): Use the next cursor from the previous response. Leave empty for the first page.
- Filter (`filter`, text): An optional ServiceM8 filter, such as active eq 1.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "active": 1,
        "edit_date": "example",
        "email": "example",
        "name": "example",
        "phone": "example",
        "uuid": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List job activities

Return a page of job activities.

**Inputs**

- Limit (`limit`, number): Maximum number of results to return. From 1 to 999.
- Cursor (`cursor`, text): Use the next cursor from the previous response. Leave empty for the first page.
- Filter (`filter`, text): An optional ServiceM8 filter, such as active eq 1.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "active": 1,
        "edit_date": "example",
        "end_date": "example",
        "job_uuid": "example",
        "staff_uuid": "example",
        "start_date": "example",
        "uuid": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List jobs

Return a page of jobs.

**Inputs**

- Limit (`limit`, number): Maximum number of results to return. From 1 to 999.
- Cursor (`cursor`, text): Use the next cursor from the previous response. Leave empty for the first page.
- Filter (`filter`, text): An optional ServiceM8 filter, such as active eq 1.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "active": 1,
        "company_uuid": "example",
        "edit_date": "example",
        "generated_job_id": "example",
        "job_address": "example",
        "job_description": "example",
        "status": "example",
        "uuid": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### List staff

Return a page of staff.

**Inputs**

- Limit (`limit`, number): Maximum number of results to return. From 1 to 999.
- Cursor (`cursor`, text): Use the next cursor from the previous response. Leave empty for the first page.
- Filter (`filter`, text): An optional ServiceM8 filter, such as active eq 1.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

```json
{
  "data": {
    "items": [
      {
        "active": 1,
        "email": "example",
        "first": "example",
        "last": "example",
        "uuid": "example"
      }
    ],
    "next_cursor": "example"
  }
}
```

### Update a customer

Change the supplied fields on a customer.

**Inputs**

- Customer (`customer_id`, text, required): The customer id.
- Name (`name`, text): The customer or company name.
- Email (`email`, text): The customer email address.
- Phone (`phone`, text): The customer phone number.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

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

### Update a job

Change the supplied fields on a job.

**Inputs**

- Job (`job_id`, text, required): The job id.
- Description (`description`, text): Describe the work to do.
- Address (`address`, text): The address of the job.
- Status (`status`, text): Choose the job status. One of: `Quote`, `Work Order`, `Completed`, `Unsuccessful`.
- Customer (`customer`, text): Choose the customer.

**Outputs**

- `data` (object): The response from ServiceM8.

**Example output**

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