# Shiftboard

> Schedule and assign shifts, manage people and time off, and read timecards in Shiftboard.

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

## Actions

### Approve time off request

Approve a time off request.

**Inputs**

- Time off request (`time_off_request_id`, text, required): The time off request.
- Reason (`status_reason`, text): Why it is approved, for the person to read.

**Outputs**

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

**Example output**

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

### Assign shift

Assign a shift to a person, with Shiftboard's conflict checks, optionally publishing it.

**Inputs**

- Shift (`shift_id`, text, required): The shift.
- Assign to (`covering_member`, text, required): Who works the shift.
- Publish (`publish`, true/false): Publish the shift too.
- Don't notify (`no_notify`, true/false): Don't tell the person about it.

**Outputs**

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

**Example output**

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

### Create account

Add a person to the Shiftboard site, optionally emailing them a welcome letter with their password.

**Inputs**

- First name (`first_name`, text, required): First name.
- Last name (`last_name`, text, required): Last name.
- Email (`email`, text, required): Email address, which the person signs in with.
- Mobile phone (`mobile_phone`, text): Mobile phone.
- Home phone (`home_phone`, text): Home phone.
- Address (`address`, text): Street address.
- City (`city`, text): City.
- State (`state`, text): Full name of the state or province.
- Postal code (`zip`, text): Postal code.
- Country (`country`, text): Country.
- External ID (`external_id`, text): Your own ID for the person, if your site uses external IDs.
- Add to default workgroups (`add_default_workgroups`, true/false): Add the person to the site's default workgroups.
- Send welcome letter (`send_welcome_letter`, true/false): Email the person Shiftboard's welcome letter with a temporary password.

**Outputs**

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

**Example output**

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

### Create shift

Add a shift to a workgroup's schedule, optionally assigned to someone and published.

**Inputs**

- Workgroup (`workgroup_id`, text, required): The workgroup (team) the shift belongs to.
- Start date (`start_date`, date, required): The day the shift starts.
- Start time (`start_time`, time): When the shift starts, in the shift's time zone, on a five minute mark. Leave empty for an all-day shift.
- End date (`end_date`, date): The day the shift ends. Leave empty when it ends on the day it starts.
- End time (`end_time`, time): When the shift ends, on a five minute mark.
- Subject (`subject`, text): The shift's subject, up to 100 characters.
- Details (`details`, text): More about the shift.
- Location (`location_id`, text): Where the shift is. Leave empty for the workgroup's default location.
- Role (`role_id`, text): The shift's role.
- Published (`published`, true/false): Publish the shift, so members can see it.
- Urgent (`urgent`, true/false): Mark the shift as critical to fill.
- Assigned to (`covering_member`, text): Who works the shift. A covered shift must also be published.
- Notify (`notify`, true/false): Tell the assigned person about the shift.

**Outputs**

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

**Example output**

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

### Create time off request

Request time off for a person, for whole days or between two times.

**Inputs**

- Person (`member`, text, required): Who the time off is for.
- Start date (`start_date`, date, required): The first day off.
- End date (`end_date`, date): The last day off. Leave empty for one day.
- Start time (`start_time`, time): When the time off starts, on a five minute mark. Leave both times empty for whole days.
- End time (`end_time`, time): When the time off ends, on a five minute mark.
- Summary (`summary`, text): A short reason.
- Details (`details`, text): More about the request.
- Paid (`paid`, true/false): Whether the time off is paid.
- Workgroup (`workgroup_id`, text): The workgroup the request is for. Leave empty for the whole site.

**Outputs**

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

**Example output**

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

### Delete account

Remove a person's account from the site.

**Inputs**

- Account (`account_id`, text, required): The account.
- Unconfirm future shifts (`unconfirm_future_shifts`, true/false): Also unconfirm the person's shifts from today on.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete shift

Delete a shift.

**Inputs**

- Shift (`shift_id`, text, required): The shift.
- Notify (`notify`, true/false): Tell the assigned person the shift is gone.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Delete time off request

Delete a time off request.

**Inputs**

- Time off request (`time_off_request_id`, text, required): The time off request.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "deleted": true,
    "id": "example"
  }
}
```

### Deny time off request

Deny a time off request.

**Inputs**

- Time off request (`time_off_request_id`, text, required): The time off request.
- Reason (`status_reason`, text): Why it is denied, for the person to read.

**Outputs**

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

**Example output**

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

### Get account

Get one person's account.

**Inputs**

- Account (`account_id`, text, required): The account.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": "example",
    "bad_email": true,
    "city": "example",
    "country": "example",
    "email": "example",
    "external_id": "example",
    "first_name": "example",
    "home_phone": "example",
    "id": "example",
    "last_name": "example",
    "mobile_phone": "example",
    "org_hold": true,
    "org_pending": "example",
    "other_phone": "example",
    "profile_type": "example",
    "screen_name": "example",
    "state": "example",
    "timezone": "example",
    "zip": "example"
  }
}
```

### Get API account

Get the Shiftboard account the API keys act as.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": "example",
    "bad_email": true,
    "city": "example",
    "country": "example",
    "email": "example",
    "external_id": "example",
    "first_name": "example",
    "home_phone": "example",
    "id": "example",
    "last_name": "example",
    "mobile_phone": "example",
    "org_hold": true,
    "org_pending": "example",
    "other_phone": "example",
    "profile_type": "example",
    "screen_name": "example",
    "state": "example",
    "timezone": "example",
    "zip": "example"
  }
}
```

### Get shift

Get one shift with its details.

**Inputs**

- Shift (`shift_id`, text, required): The shift.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "covered": true,
    "covering_member": "example",
    "created": "example",
    "details": "example",
    "end_date": "example",
    "id": "example",
    "location": "example",
    "published": true,
    "qty": "example",
    "role": "example",
    "start_date": "example",
    "status_updated": "example",
    "subject": "example",
    "timezone": "example",
    "updated": "example",
    "urgent": true,
    "workgroup": "example"
  }
}
```

### Get time off request

Get one time off request.

**Inputs**

- Time off request (`time_off_request_id`, text, required): The time off request.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "category": "example",
    "details": "example",
    "end_date": "example",
    "id": "example",
    "last_status_update": "example",
    "member": "example",
    "paid": true,
    "start_date": "example",
    "status": "example",
    "status_reason": "example",
    "summary": "example",
    "timezone": "example",
    "use_time": "example",
    "workgroup": "example"
  }
}
```

### List accounts

List the people (accounts) on the site, optionally searching by name or limiting to a workgroup or email.

**Inputs**

- Search (`search`, text): Only list people whose name (or external ID) contains this.
- Workgroup (`workgroup_id`, text): Only list members of this workgroup (team).
- Email (`email`, text): Only list the person with this email.
- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "accounts": [
      {
        "address": "example",
        "bad_email": true,
        "city": "example",
        "country": "example",
        "email": "example",
        "external_id": "example",
        "first_name": "example",
        "home_phone": "example",
        "id": "example",
        "last_name": "example",
        "mobile_phone": "example",
        "org_hold": true,
        "org_pending": "example",
        "other_phone": "example",
        "profile_type": "example",
        "screen_name": "example",
        "state": "example",
        "timezone": "example",
        "zip": "example"
      }
    ],
    "count": "example",
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    }
  }
}
```

### List locations

List the site's locations.

**Inputs**

- Search (`search`, text): Only list locations whose name contains this.
- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "locations": [
      {
        "address": "example",
        "city": "example",
        "country": "example",
        "description": "example",
        "id": "example",
        "name": "example",
        "state": "example",
        "zip": "example"
      }
    ],
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    }
  }
}
```

### List recently updated accounts

List the people whose accounts were added or changed in the last 24 hours, or only those whose profile changed.

**Inputs**

- Profile changes only (`profile_only`, true/false): Only list people whose profile information changed.
- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "accounts": [
      {
        "address": "example",
        "bad_email": true,
        "city": "example",
        "country": "example",
        "email": "example",
        "external_id": "example",
        "first_name": "example",
        "home_phone": "example",
        "id": "example",
        "last_name": "example",
        "mobile_phone": "example",
        "org_hold": true,
        "org_pending": "example",
        "other_phone": "example",
        "profile_type": "example",
        "screen_name": "example",
        "state": "example",
        "timezone": "example",
        "zip": "example"
      }
    ],
    "count": "example",
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    }
  }
}
```

### List recently updated shifts

List the shifts added or changed in the last 24 hours, or only those assigned, confirmed or published in that time.

**Inputs**

- Status changes only (`status_only`, true/false): Only list shifts that were assigned, reassigned, confirmed, unconfirmed, published or unpublished.
- Workgroup (`workgroup_id`, text): Only include this workgroup (team).
- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    },
    "shifts": [
      {
        "count": "example",
        "covered": true,
        "covering_member": "example",
        "created": "example",
        "details": "example",
        "end_date": "example",
        "id": "example",
        "location": "example",
        "published": true,
        "qty": "example",
        "role": "example",
        "start_date": "example",
        "status_updated": "example",
        "subject": "example",
        "timezone": "example",
        "updated": "example",
        "urgent": true,
        "workgroup": "example"
      }
    ]
  }
}
```

### List roles

List the roles shifts can have.

**Inputs**

- Search (`search`, text): Only list roles whose name contains this.
- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    },
    "roles": [
      {
        "id": "example",
        "name": "example"
      }
    ]
  }
}
```

### List shifts

List shifts between two dates (from today for a week if left empty), optionally by workgroup, person, location, role or whether they're filled or published.

**Inputs**

- From (`start_date`, date): The first day of shifts to list. Leave empty for today.
- To (`end_date`, date): The last day of shifts to list. Leave empty for a week after the first.
- Workgroup (`workgroup_id`, text): Only include this workgroup (team).
- Assigned to (`covering_member`, text): Only list shifts this person works.
- Location (`location_id`, text): Only list shifts at this location.
- Role (`role_id`, text): Only list shifts with this role.
- Filled (`covered`, true/false): On: only filled shifts. Off: only open ones. Leave empty for both.
- Published (`published`, true/false): On: only published shifts. Off: only unpublished ones. Leave empty for both.
- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    },
    "shifts": [
      {
        "count": "example",
        "covered": true,
        "covering_member": "example",
        "created": "example",
        "details": "example",
        "end_date": "example",
        "id": "example",
        "location": "example",
        "published": true,
        "qty": "example",
        "role": "example",
        "start_date": "example",
        "status_updated": "example",
        "subject": "example",
        "timezone": "example",
        "updated": "example",
        "urgent": true,
        "workgroup": "example"
      }
    ]
  }
}
```

### List time off requests

List time off requests between two dates (from today for a week if left empty), optionally for one person or status.

**Inputs**

- From (`start_date`, date): The first day to list. Leave empty for today.
- To (`end_date`, date): The last day to list. Leave empty for a week after the first.
- Person (`member`, text): Only list this person's requests.
- Status (`status`, text): Only list requests with this status. One of: `0` (New), `2` (Approved), `3` (Denied).
- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    },
    "timeOffRequests": [
      {
        "category": "example",
        "details": "example",
        "end_date": "example",
        "id": "example",
        "last_status_update": "example",
        "member": "example",
        "paid": true,
        "start_date": "example",
        "status": "example",
        "status_reason": "example",
        "summary": "example",
        "timezone": "example",
        "use_time": "example",
        "workgroup": "example"
      }
    ]
  }
}
```

### List timecards

List timecards between two dates (the last 30 days if left empty), optionally for one person or workgroup, or only approved ones.

**Inputs**

- From (`start_date`, date): The earliest day to list. Leave empty for 30 days ago.
- To (`end_date`, date): The latest day to list. Leave empty for today.
- Person (`account_id`, text): Only list this person's timecards.
- Workgroup (`workgroup_id`, text): Only include this workgroup (team).
- Approved (`approved`, true/false): On: only approved timecards. Off: only ones not yet approved. Leave empty for both.
- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    },
    "timecards": [
      {
        "account": "example",
        "approved": true,
        "duration": "example",
        "id": "example",
        "processed": true,
        "shift": "example",
        "start_date": "example",
        "start_time": "example",
        "workgroup": "example"
      }
    ]
  }
}
```

### List who is clocked in

List the people clocked in right now.

**Inputs**

- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    },
    "timeclocks": [
      {
        "account": "example",
        "can_clockout": true,
        "clocked_in": "example",
        "id": "example",
        "shift": "example",
        "workgroup": "example"
      }
    ]
  }
}
```

### List workgroups

List the site's workgroups (teams).

**Inputs**

- Search (`search`, text): Only list workgroups whose name or code contains this.
- Results per page (`batch_size`, number): How many records to read, from 1 to 1,000. Leave empty for 10. From 1 to 1000.
- Start at record (`start_at`, number): The number of the first record to read, from 1. Leave empty to start at the first. At least 1.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "page": {
      "next": {
        "batch": "example",
        "start": 1
      },
      "prev": {
        "batch": "example",
        "start": 1
      },
      "this": {
        "batch": "example",
        "start": 1
      }
    },
    "workgroups": [
      {
        "code": "example",
        "description": "example",
        "id": "example",
        "name": "example",
        "timezone": "example",
        "zip": "example"
      }
    ]
  }
}
```

### Update account

Change a person's name, contact details or hold status. Fields left empty stay as they are.

**Inputs**

- Account (`account_id`, text, required): The account.
- First name (`first_name`, text): First name.
- Last name (`last_name`, text): Last name.
- Email (`email`, text): Email address, which the person signs in with.
- Mobile phone (`mobile_phone`, text): Mobile phone.
- Home phone (`home_phone`, text): Home phone.
- Address (`address`, text): Street address.
- City (`city`, text): City.
- State (`state`, text): Full name of the state or province.
- Postal code (`zip`, text): Postal code.
- Country (`country`, text): Country.
- External ID (`external_id`, text): Your own ID for the person, if your site uses external IDs.
- On hold (`org_hold`, true/false): Put the person on hold, or take them off it.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "address": "example",
    "bad_email": true,
    "city": "example",
    "country": "example",
    "email": "example",
    "external_id": "example",
    "first_name": "example",
    "home_phone": "example",
    "id": "example",
    "last_name": "example",
    "mobile_phone": "example",
    "org_hold": true,
    "org_pending": "example",
    "other_phone": "example",
    "profile_type": "example",
    "screen_name": "example",
    "state": "example",
    "timezone": "example",
    "zip": "example"
  }
}
```

### Update shift

Change a shift's times, details, location, role, assignment or publishing. Fields left empty stay as they are.

**Inputs**

- Shift (`shift_id`, text, required): The shift.
- Start date (`start_date`, date): The day the shift starts.
- Start time (`start_time`, time): When the shift starts, in the shift's time zone, on a five minute mark. Leave empty for an all-day shift.
- End date (`end_date`, date): The day the shift ends. Leave empty when it ends on the day it starts.
- End time (`end_time`, time): When the shift ends, on a five minute mark.
- Subject (`subject`, text): The shift's subject, up to 100 characters.
- Details (`details`, text): More about the shift.
- Location (`location_id`, text): Where the shift is. Leave empty for the workgroup's default location.
- Role (`role_id`, text): The shift's role.
- Published (`published`, true/false): Publish the shift, so members can see it.
- Urgent (`urgent`, true/false): Mark the shift as critical to fill.
- Assigned to (`covering_member`, text): Who works the shift. A covered shift must also be published.
- Notify (`notify`, true/false): Tell the assigned person about the change.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "count": "example",
    "covered": true,
    "covering_member": "example",
    "created": "example",
    "details": "example",
    "end_date": "example",
    "id": "example",
    "location": "example",
    "published": true,
    "qty": "example",
    "role": "example",
    "start_date": "example",
    "status_updated": "example",
    "subject": "example",
    "timezone": "example",
    "updated": "example",
    "urgent": true,
    "workgroup": "example"
  }
}
```
