# Resource Guru

> Schedule people, rooms and equipment in Resource Guru: book them on projects, add time off and keep clients and projects up to date.

App · 26 actions. Web page: https://docs.lodol.com/docs/integrations/resource-guru

## Actions

### Add time off

Book time off (downtime) for people or resources, between two times on each day from one date to another.

**Inputs**

- Resources (`resource_ids`, list, required): The people or resources taking time off.
- From (`from_date`, date, required): The first day off.
- To (`to_date`, date, required): The last day off.
- Start time (`start_time`, time, required): When the time off starts each day, such as 09:00.
- End time (`end_time`, time, required): When the time off ends each day, such as 17:00.
- Type (`downtime_type_id`, number): The kind of time off, such as vacation or sick leave.
- Details (`details`, text): Notes about the time off.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "account_id": 1,
    "booker_id": 1,
    "created_at": "example",
    "creator_id": 1,
    "deleted": true,
    "details": "example",
    "downtime_type_id": 1,
    "end_time": 1,
    "from": "example",
    "id": 1,
    "is_public_holiday": true,
    "last_updated_by": 1,
    "leave": "example",
    "resource_ids": [
      1
    ],
    "start_time": 1,
    "state": "example",
    "timezone": "example",
    "to": "example",
    "updated_at": "example"
  }
}
```

### Create a booking

Book people or resources on a project or client, for the same time each working day between two dates.

**Inputs**

- Resources (`resource_ids`, list, required): The people or resources to book.
- Start date (`start_date`, date, required): The first day of the booking.
- End date (`end_date`, date, required): The last day of the booking.
- Minutes per day (`duration`, number, required): Minutes booked on each day, such as 240 for four hours. From 1 to 1440.
- Start time (`start_time`, time): When the booking starts each day. Leave empty to book time without a set start.
- Project (`project_id`, number): The project the booking is for.
- Client (`client_id`, number): The client the booking is for.
- Details (`details`, text): Notes shown on the booking.
- Billable (`billable`, true/false): Whether the time is billable.
- Tentative (`tentative`, true/false): Mark the booking as tentative.
- Allow waiting list (`allow_waiting`, true/false): Put the booking on the waiting list when the resource isn't free, instead of failing.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "activity_type_id": 1,
    "aggregated_approval_state": {
      "approved": [
        {
          "booking_id": 1,
          "resolved_by": 1,
          "resource_id": 1
        }
      ],
      "declined": [
        {
          "booking_id": 1,
          "message": "example",
          "resolved_at": "example",
          "resolved_by": 1,
          "resource_id": 1
        }
      ],
      "pending": [
        {
          "booking_id": 1,
          "resource_id": 1
        }
      ],
      "without_approval": [
        {
          "booking_id": 1,
          "resource_id": 1
        }
      ]
    },
    "approval_state": {
      "message": "example",
      "resolved_at": "example",
      "resolved_by": 1,
      "status": "pending"
    },
    "billable": true,
    "booker": {
      "color": "example",
      "email": "example",
      "id": 1,
      "name": "example"
    },
    "booking_type": "duration",
    "client_id": 1,
    "created_at": "example",
    "custom_field_values": {},
    "details": "example",
    "duration": 1,
    "durations": [
      {
        "date": "example",
        "duration": 1,
        "elastic_overtime": [
          {
            "end_time": 1,
            "start_time": 1
          }
        ],
        "end_time": 1,
        "start_time": 1,
        "waiting": true
      }
    ],
    "effort_flexibility": "example",
    "end_date": "example",
    "group_id": 1,
    "id": 1,
    "last_updated_by": 1,
    "notes": "example",
    "partial_waiting": true,
    "project_id": 1,
    "refreshable": true,
    "resource_id": 1,
    "resource_ids": [
      1
    ],
    "rrule": {
      "monthly": {
        "day_selection": {
          "type": "onWeekDay",
          "week": 1,
          "weekday": 1
        },
        "ends": {
          "count": 1,
          "date": "example",
          "type": "date"
        },
        "interval": 1
      },
      "weekly": {
        "ends": {
          "count": 1,
          "date": "example",
          "type": "date"
        },
        "interval": 1,
        "weekday": 1
      },
      "yearly": {
        "day_selection": {
          "month": 1,
          "type": "onWeekDayOfMonth",
          "week": 1,
          "weekday": 1
        },
        "ends": {
          "count": 1,
          "date": "example",
          "type": "date"
        },
        "interval": 1
      }
    },
    "sequence_no": 1,
    "start_date": "example",
    "start_time": 1,
    "tentative": true,
    "timezone": "example",
    "updated_at": "example"
  }
}
```

### Create a client

Add a client that projects and bookings can be for.

**Inputs**

- Name (`name`, text, required): The client's name.
- Notes (`notes`, text): Notes about the client.
- Color (`color`, text): The client's color, as a hex code such as #3366ff.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "archived": true,
    "color": "example",
    "created_at": "example",
    "creator_id": 1,
    "custom_field_values": {},
    "deleted": true,
    "deleted_at": "example",
    "id": 1,
    "last_updated_by": 1,
    "name": "example",
    "notes": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Create a project

Add a project, optionally for a client.

**Inputs**

- Name (`name`, text, required): The project's name.
- Client (`client_id`, number): The client the project is for.
- Project code (`project_code`, text): Your code for the project.
- Notes (`notes`, text): Notes about the project.
- Start date (`start_date`, date): When the project starts.
- End date (`end_date`, date): When the project ends.
- Billable by default (`default_billable`, true/false): Whether bookings on the project are billable unless set otherwise.
- Color (`color`, text): The project's color, as a hex code such as #3366ff.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "account": {
      "id": 1,
      "name": "example",
      "url": "example"
    },
    "account_id": 1,
    "activity_type_ids": [
      1
    ],
    "activity_types": [
      {
        "billable": true,
        "id": 1
      }
    ],
    "archived": true,
    "client": {
      "id": 1,
      "name": "example",
      "notes": "example",
      "url": "example"
    },
    "client_id": 1,
    "color": "example",
    "created_at": "example",
    "creator_id": 1,
    "custom_field_values": {},
    "default_billable": true,
    "deleted": true,
    "deleted_at": "example",
    "end_date": "example",
    "id": 1,
    "last_updated_by": 1,
    "name": "example",
    "notes": "example",
    "project_code": "example",
    "start_date": "example",
    "team": [
      {
        "hidden": true,
        "hourly_rate": 1,
        "resource_id": 1
      }
    ],
    "updated_at": "example",
    "url": "example"
  }
}
```

### Create a resource

Add a person, room, piece of equipment or other resource, with the account's default working hours.

**Inputs**

- Resource type (`resource_type_id`, number, required): What kind of resource it is, such as a person or a meeting room.
- Name (`name`, text): The resource's name. For a person, their full name.
- First name (`first_name`, text): A person's first name.
- Last name (`last_name`, text): A person's last name.
- Email (`email`, text): A person's email address.
- Job title (`job_title`, text): A person's job title.
- Phone (`phone`, text): A person's phone number.
- Notes (`notes`, text): Notes about the resource.
- Bookable (`bookable`, true/false): Whether the resource can be booked.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "account": {
      "id": 1,
      "name": "example",
      "url": "example"
    },
    "archived": true,
    "available_periods": [
      {
        "end_time": 1,
        "start_time": 1,
        "valid_from": "example",
        "valid_until": "example",
        "week_day": 1
      }
    ],
    "bookable": true,
    "booked_client_ids": [
      1
    ],
    "booked_project_ids": [
      1
    ],
    "booking_approver_ids": [
      1
    ],
    "color": "example",
    "created_at": "example",
    "creator_id": 1,
    "custom_attributes": {
      "capacity": "example",
      "phone": "example",
      "registration_number": "example"
    },
    "custom_available_periods": [
      {
        "date": "example",
        "end_time": 1,
        "start_time": 1
      }
    ],
    "email": "example",
    "first_name": "example",
    "human": true,
    "id": 1,
    "image": "example",
    "images": {
      "card": "example",
      "default": "example",
      "header": "example",
      "thumb": "example",
      "tiny": "example"
    },
    "job_title": "example",
    "last_name": "example",
    "last_updated_by": 1,
    "minutes_per_day": 1,
    "name": "example",
    "notes": "example",
    "overtimes": [
      {
        "created_at": "example",
        "creator_id": 1,
        "date": "example",
        "duration": 1,
        "id": 1,
        "resource_id": 1,
        "updated_at": "example"
      }
    ],
    "phone": "example",
    "placeholder_owner_ids": [
      1
    ],
    "resource_type": {
      "id": 1,
      "name": "example",
      "url": "example"
    },
    "selected_custom_field_options": [
      {
        "id": 1,
        "name": "example",
        "value": "example"
      }
    ],
    "timezone": {
      "name": "example",
      "offset": 1
    },
    "updated_at": "example",
    "url": "example",
    "user_id": 1,
    "vacation_allowance": 1
  }
}
```

### Delete a booking

Delete a booking.

**Inputs**

- Booking ID (`booking_id`, number, required): The booking to delete. Use the id from List bookings or Create a booking.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

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

### Delete a client

Delete a client.

**Inputs**

- Client (`client_id`, number, required): The client to delete.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

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

### Delete a project

Delete a project.

**Inputs**

- Project (`project_id`, number, required): The project to delete.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

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

### Delete a resource

Delete a person or resource.

**Inputs**

- Resource (`resource_id`, number, required): The resource to delete.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

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

### Delete time off

Delete time off (downtime).

**Inputs**

- Time off ID (`downtime_id`, number, required): The time off to delete. Use the id from List time off or Add time off.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

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

### Get a booking

Get one booking, with its time on each day.

**Inputs**

- Booking ID (`booking_id`, number, required): The booking. Use the id from List bookings or Create a booking.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "activity_type_id": 1,
    "aggregated_approval_state": {
      "approved": [
        {
          "booking_id": 1,
          "resolved_by": 1,
          "resource_id": 1
        }
      ],
      "declined": [
        {
          "booking_id": 1,
          "message": "example",
          "resolved_at": "example",
          "resolved_by": 1,
          "resource_id": 1
        }
      ],
      "pending": [
        {
          "booking_id": 1,
          "resource_id": 1
        }
      ],
      "without_approval": [
        {
          "booking_id": 1,
          "resource_id": 1
        }
      ]
    },
    "approval_state": {
      "message": "example",
      "resolved_at": "example",
      "resolved_by": 1,
      "status": "pending"
    },
    "billable": true,
    "booker": {
      "color": "example",
      "email": "example",
      "id": 1,
      "name": "example"
    },
    "booking_type": "duration",
    "client_id": 1,
    "created_at": "example",
    "custom_field_values": {},
    "details": "example",
    "duration": 1,
    "durations": [
      {
        "date": "example",
        "duration": 1,
        "elastic_overtime": [
          {
            "end_time": 1,
            "start_time": 1
          }
        ],
        "end_time": 1,
        "start_time": 1,
        "waiting": true
      }
    ],
    "effort_flexibility": "example",
    "end_date": "example",
    "group_id": 1,
    "id": 1,
    "last_updated_by": 1,
    "notes": "example",
    "partial_waiting": true,
    "project_id": 1,
    "refreshable": true,
    "resource_id": 1,
    "resource_ids": [
      1
    ],
    "rrule": {
      "monthly": {
        "day_selection": {
          "type": "onWeekDay",
          "week": 1,
          "weekday": 1
        },
        "ends": {
          "count": 1,
          "date": "example",
          "type": "date"
        },
        "interval": 1
      },
      "weekly": {
        "ends": {
          "count": 1,
          "date": "example",
          "type": "date"
        },
        "interval": 1,
        "weekday": 1
      },
      "yearly": {
        "day_selection": {
          "month": 1,
          "type": "onWeekDayOfMonth",
          "week": 1,
          "weekday": 1
        },
        "ends": {
          "count": 1,
          "date": "example",
          "type": "date"
        },
        "interval": 1
      }
    },
    "sequence_no": 1,
    "start_date": "example",
    "start_time": 1,
    "tentative": true,
    "timezone": "example",
    "updated_at": "example"
  }
}
```

### Get a project

Get one project, with its client and team.

**Inputs**

- Project (`project_id`, number, required): The project.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "account": {
      "id": 1,
      "name": "example",
      "url": "example"
    },
    "account_id": 1,
    "activity_type_ids": [
      1
    ],
    "activity_types": [
      {
        "billable": true,
        "id": 1
      }
    ],
    "archived": true,
    "client": {
      "id": 1,
      "name": "example",
      "notes": "example",
      "url": "example"
    },
    "client_id": 1,
    "color": "example",
    "created_at": "example",
    "creator_id": 1,
    "custom_field_values": {},
    "default_billable": true,
    "deleted": true,
    "deleted_at": "example",
    "end_date": "example",
    "id": 1,
    "last_updated_by": 1,
    "name": "example",
    "notes": "example",
    "project_code": "example",
    "start_date": "example",
    "team": [
      {
        "hidden": true,
        "hourly_rate": 1,
        "resource_id": 1
      }
    ],
    "updated_at": "example",
    "url": "example"
  }
}
```

### Get a resource

Get one person or resource, with their working hours.

**Inputs**

- Resource (`resource_id`, number, required): The person or resource.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "account": {
      "id": 1,
      "name": "example",
      "url": "example"
    },
    "archived": true,
    "available_periods": [
      {
        "end_time": 1,
        "start_time": 1,
        "valid_from": "example",
        "valid_until": "example",
        "week_day": 1
      }
    ],
    "bookable": true,
    "booked_client_ids": [
      1
    ],
    "booked_project_ids": [
      1
    ],
    "booking_approver_ids": [
      1
    ],
    "color": "example",
    "created_at": "example",
    "creator_id": 1,
    "custom_attributes": {
      "capacity": "example",
      "phone": "example",
      "registration_number": "example"
    },
    "custom_available_periods": [
      {
        "date": "example",
        "end_time": 1,
        "start_time": 1
      }
    ],
    "email": "example",
    "first_name": "example",
    "human": true,
    "id": 1,
    "image": "example",
    "images": {
      "card": "example",
      "default": "example",
      "header": "example",
      "thumb": "example",
      "tiny": "example"
    },
    "job_title": "example",
    "last_name": "example",
    "last_updated_by": 1,
    "minutes_per_day": 1,
    "name": "example",
    "notes": "example",
    "overtimes": [
      {
        "created_at": "example",
        "creator_id": 1,
        "date": "example",
        "duration": 1,
        "id": 1,
        "resource_id": 1,
        "updated_at": "example"
      }
    ],
    "phone": "example",
    "placeholder_owner_ids": [
      1
    ],
    "resource_type": {
      "id": 1,
      "name": "example",
      "url": "example"
    },
    "selected_custom_field_options": [
      {
        "id": 1,
        "name": "example",
        "value": "example"
      }
    ],
    "timezone": {
      "name": "example",
      "offset": 1
    },
    "updated_at": "example",
    "url": "example",
    "user_id": 1,
    "vacation_allowance": 1
  }
}
```

### Get the connected user

Get the Resource Guru user the connection signed in as.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "activation_state": "pending",
    "client_rights": "manage_all",
    "created_at": "example",
    "deleted": true,
    "downtime_rights": "manage_all",
    "email": "example",
    "first_name": "example",
    "id": 1,
    "image": "example",
    "images": {
      "card": "example",
      "default": "example",
      "header": "example",
      "thumb": "example",
      "tiny": "example"
    },
    "last_activity_at": "example",
    "last_login_at": "example",
    "last_logout_at": "example",
    "last_name": "example",
    "last_product_update_read_at": "example",
    "notices": {},
    "owner": true,
    "permissions": "basic_user",
    "project_rights": "manage_all",
    "report_rights": "manage_all",
    "resource_rights": "manage_all",
    "timezone": "example",
    "updated_at": "example"
  }
}
```

### List accounts

List the Resource Guru accounts the connected user can reach, with each one's URL ID.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Resource Guru.

**Example output**

```json
{
  "data": [
    {
      "created_at": "example",
      "dashboard_path": "example",
      "default_booking_approver_ids": [
        1
      ],
      "id": 1,
      "name": "example",
      "owner": {
        "email": "example",
        "id": 1,
        "image": "example",
        "name": "example",
        "timezone": "example"
      },
      "plan": "example",
      "rootdomain": "example",
      "subdomain": "example",
      "updated_at": "example",
      "url": "example"
    }
  ]
}
```

### List bookings

List bookings between two days, optionally for some resources or approval states.

**Inputs**

- From (`start_date`, date): Only bookings starting on or after this day.
- To (`end_date`, date): Only bookings ending on or before this day.
- Resources (`resource_ids`, list): Only bookings for these resources.
- Approval states (`approval_states`, list): Only bookings in these approval states. One or more of: `pending`, `approved`, `declined`.
- Waiting list only (`waiting`, true/false): Only bookings on the waiting list.
- Page size (`limit`, number): How many to return. Leave empty for Resource Guru's default; for resources, clients and projects, 0 returns them all. At least 0.
- Skip (`offset`, number): How many to skip, to read the next page. At least 0.

**Outputs**

- `data` (list): The response from Resource Guru.

**Example output**

```json
{
  "data": [
    {
      "activity_type_id": 1,
      "aggregated_approval_state": {
        "approved": [
          {
            "booking_id": 1,
            "resolved_by": 1,
            "resource_id": 1
          }
        ],
        "declined": [
          {
            "booking_id": 1,
            "message": "example",
            "resolved_at": "example",
            "resolved_by": 1,
            "resource_id": 1
          }
        ],
        "pending": [
          {
            "booking_id": 1,
            "resource_id": 1
          }
        ],
        "without_approval": [
          {
            "booking_id": 1,
            "resource_id": 1
          }
        ]
      },
      "approval_state": {
        "message": "example",
        "resolved_at": "example",
        "resolved_by": 1,
        "status": "pending"
      },
      "billable": true,
      "booker": {
        "color": "example",
        "email": "example",
        "id": 1,
        "name": "example"
      },
      "booking_type": "duration",
      "client_id": 1,
      "created_at": "example",
      "custom_field_values": {},
      "details": "example",
      "duration": 1,
      "durations": [
        {
          "date": "example",
          "duration": 1,
          "elastic_overtime": [
            {
              "end_time": 1,
              "start_time": 1
            }
          ],
          "end_time": 1,
          "start_time": 1,
          "waiting": true
        }
      ],
      "effort_flexibility": "example",
      "end_date": "example",
      "group_id": 1,
      "id": 1,
      "last_updated_by": 1,
      "notes": "example",
      "partial_waiting": true,
      "project_id": 1,
      "refreshable": true,
      "resource_id": 1,
      "resource_ids": [
        1
      ],
      "rrule": {
        "monthly": {
          "day_selection": {
            "type": "onWeekDay",
            "week": 1,
            "weekday": 1
          },
          "ends": {
            "count": 1,
            "date": "example",
            "type": "date"
          },
          "interval": 1
        },
        "weekly": {
          "ends": {
            "count": 1,
            "date": "example",
            "type": "date"
          },
          "interval": 1,
          "weekday": 1
        },
        "yearly": {
          "day_selection": {
            "month": 1,
            "type": "onWeekDayOfMonth",
            "week": 1,
            "weekday": 1
          },
          "ends": {
            "count": 1,
            "date": "example",
            "type": "date"
          },
          "interval": 1
        }
      },
      "sequence_no": 1,
      "start_date": "example",
      "start_time": 1,
      "tentative": true,
      "timezone": "example",
      "updated_at": "example"
    }
  ]
}
```

### List clients

List the account's clients.

**Inputs**

- Include archived (`include_archived`, true/false): Also list archived clients. Resource Guru then lists them all, ignoring paging.
- Page size (`limit`, number): How many to return. Leave empty for Resource Guru's default; for resources, clients and projects, 0 returns them all. At least 0.
- Skip (`offset`, number): How many to skip, to read the next page. At least 0.

**Outputs**

- `data` (list): The response from Resource Guru.

**Example output**

```json
{
  "data": [
    {
      "archived": true,
      "color": "example",
      "created_at": "example",
      "creator_id": 1,
      "custom_field_values": {},
      "deleted": true,
      "deleted_at": "example",
      "id": 1,
      "last_updated_by": 1,
      "name": "example",
      "notes": "example",
      "updated_at": "example",
      "url": "example"
    }
  ]
}
```

### List projects

List the account's projects.

**Inputs**

- Include archived (`include_archived`, true/false): Also list archived projects. Resource Guru then lists them all, ignoring paging.
- Page size (`limit`, number): How many to return. Leave empty for Resource Guru's default; for resources, clients and projects, 0 returns them all. At least 0.
- Skip (`offset`, number): How many to skip, to read the next page. At least 0.

**Outputs**

- `data` (list): The response from Resource Guru.

**Example output**

```json
{
  "data": [
    {
      "account": {
        "id": 1,
        "name": "example",
        "url": "example"
      },
      "account_id": 1,
      "activity_type_ids": [
        1
      ],
      "activity_types": [
        {
          "billable": true,
          "id": 1
        }
      ],
      "archived": true,
      "client": {
        "id": 1,
        "name": "example",
        "notes": "example",
        "url": "example"
      },
      "client_id": 1,
      "color": "example",
      "created_at": "example",
      "creator_id": 1,
      "custom_field_values": {},
      "default_billable": true,
      "deleted": true,
      "deleted_at": "example",
      "end_date": "example",
      "id": 1,
      "last_updated_by": 1,
      "name": "example",
      "notes": "example",
      "project_code": "example",
      "start_date": "example",
      "team": [
        {
          "hidden": true,
          "hourly_rate": 1,
          "resource_id": 1
        }
      ],
      "updated_at": "example",
      "url": "example"
    }
  ]
}
```

### List resource types

List the kinds of resource the account has, such as people and meeting rooms.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Resource Guru.

**Example output**

```json
{
  "data": [
    {
      "created_at": "example",
      "custom_attributes": [
        "phone"
      ],
      "custom_fields": [
        {
          "created_at": "example",
          "custom_field_options": {
            "id": 1,
            "value": "example"
          },
          "id": 1,
          "label": "example",
          "name": "example",
          "required": true,
          "resource_type_ids": [
            1
          ],
          "single_select": true,
          "type": "single_select",
          "updated_at": "example"
        }
      ],
      "human": true,
      "id": 1,
      "name": "example",
      "updated_at": "example"
    }
  ]
}
```

### List resources

List the account's active people and other resources (rooms, equipment).

**Inputs**

- Details (`detail`, true/false): Include each resource's extra details.
- Page size (`limit`, number): How many to return. Leave empty for Resource Guru's default; for resources, clients and projects, 0 returns them all. At least 0.
- Skip (`offset`, number): How many to skip, to read the next page. At least 0.

**Outputs**

- `data` (list): The response from Resource Guru.

**Example output**

```json
{
  "data": [
    {
      "account": {
        "id": 1,
        "name": "example",
        "url": "example"
      },
      "archived": true,
      "available_periods": [
        {
          "end_time": 1,
          "start_time": 1,
          "valid_from": "example",
          "valid_until": "example",
          "week_day": 1
        }
      ],
      "bookable": true,
      "booked_client_ids": [
        1
      ],
      "booked_project_ids": [
        1
      ],
      "booking_approver_ids": [
        1
      ],
      "color": "example",
      "created_at": "example",
      "creator_id": 1,
      "custom_attributes": {
        "capacity": "example",
        "phone": "example",
        "registration_number": "example"
      },
      "custom_available_periods": [
        {
          "date": "example",
          "end_time": 1,
          "start_time": 1
        }
      ],
      "email": "example",
      "first_name": "example",
      "human": true,
      "id": 1,
      "image": "example",
      "images": {
        "card": "example",
        "default": "example",
        "header": "example",
        "thumb": "example",
        "tiny": "example"
      },
      "job_title": "example",
      "last_name": "example",
      "last_updated_by": 1,
      "minutes_per_day": 1,
      "name": "example",
      "notes": "example",
      "overtimes": [
        {
          "created_at": "example",
          "creator_id": 1,
          "date": "example",
          "duration": 1,
          "id": 1,
          "resource_id": 1,
          "updated_at": "example"
        }
      ],
      "phone": "example",
      "placeholder_owner_ids": [
        1
      ],
      "resource_type": {
        "id": 1,
        "name": "example",
        "url": "example"
      },
      "selected_custom_field_options": [
        {
          "id": 1,
          "name": "example",
          "value": "example"
        }
      ],
      "timezone": {
        "name": "example",
        "offset": 1
      },
      "updated_at": "example",
      "url": "example",
      "user_id": 1,
      "vacation_allowance": 1
    }
  ]
}
```

### List time off

List time off (Resource Guru calls it downtime) between two days, optionally for some resources.

**Inputs**

- From (`from_date`, date): Only time off starting on or after this day.
- To (`to_date`, date): Only time off ending on or before this day.
- Resources (`resource_ids`, list): Only time off for these resources.
- Page size (`limit`, number): How many to return. Leave empty for Resource Guru's default; for resources, clients and projects, 0 returns them all. At least 0.
- Skip (`offset`, number): How many to skip, to read the next page. At least 0.

**Outputs**

- `data` (list): The response from Resource Guru.

**Example output**

```json
{
  "data": [
    {
      "account_id": 1,
      "booker_id": 1,
      "created_at": "example",
      "creator_id": 1,
      "deleted": true,
      "details": "example",
      "downtime_type_id": 1,
      "end_time": 1,
      "from": "example",
      "id": 1,
      "is_public_holiday": true,
      "last_updated_by": 1,
      "leave": "example",
      "resource_ids": [
        1
      ],
      "start_time": 1,
      "state": "example",
      "timezone": "example",
      "to": "example",
      "updated_at": "example"
    }
  ]
}
```

### List time off types

List the kinds of time off the account uses, such as vacation or sick leave.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Resource Guru.

**Example output**

```json
{
  "data": [
    {
      "account_id": 1,
      "created_at": "example",
      "default": true,
      "id": 1,
      "name": "example",
      "updated_at": "example"
    }
  ]
}
```

### Update a booking

Change a booking's days, minutes, start time, project, client or notes. Blank fields are left as they are.

**Inputs**

- Booking ID (`booking_id`, number, required): The booking to change. Use the id from List bookings or Create a booking.
- Start date (`start_date`, date): The new first day.
- End date (`end_date`, date): The new last day.
- Minutes per day (`duration`, number): Minutes booked on each day. From 1 to 1440.
- Start time (`start_time`, time): When the booking starts each day.
- Project (`project_id`, number): The project the booking is for.
- Client (`client_id`, number): The client the booking is for.
- Details (`details`, text): Notes shown on the booking.
- Billable (`billable`, true/false): Whether the time is billable.
- Tentative (`tentative`, true/false): Mark the booking as tentative (true) or confirmed (false).

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "activity_type_id": 1,
    "aggregated_approval_state": {
      "approved": [
        {
          "booking_id": 1,
          "resolved_by": 1,
          "resource_id": 1
        }
      ],
      "declined": [
        {
          "booking_id": 1,
          "message": "example",
          "resolved_at": "example",
          "resolved_by": 1,
          "resource_id": 1
        }
      ],
      "pending": [
        {
          "booking_id": 1,
          "resource_id": 1
        }
      ],
      "without_approval": [
        {
          "booking_id": 1,
          "resource_id": 1
        }
      ]
    },
    "approval_state": {
      "message": "example",
      "resolved_at": "example",
      "resolved_by": 1,
      "status": "pending"
    },
    "billable": true,
    "booker": {
      "color": "example",
      "email": "example",
      "id": 1,
      "name": "example"
    },
    "booking_type": "duration",
    "client_id": 1,
    "created_at": "example",
    "custom_field_values": {},
    "details": "example",
    "duration": 1,
    "durations": [
      {
        "date": "example",
        "duration": 1,
        "elastic_overtime": [
          {
            "end_time": 1,
            "start_time": 1
          }
        ],
        "end_time": 1,
        "start_time": 1,
        "waiting": true
      }
    ],
    "effort_flexibility": "example",
    "end_date": "example",
    "group_id": 1,
    "id": 1,
    "last_updated_by": 1,
    "notes": "example",
    "partial_waiting": true,
    "project_id": 1,
    "refreshable": true,
    "resource_id": 1,
    "resource_ids": [
      1
    ],
    "rrule": {
      "monthly": {
        "day_selection": {
          "type": "onWeekDay",
          "week": 1,
          "weekday": 1
        },
        "ends": {
          "count": 1,
          "date": "example",
          "type": "date"
        },
        "interval": 1
      },
      "weekly": {
        "ends": {
          "count": 1,
          "date": "example",
          "type": "date"
        },
        "interval": 1,
        "weekday": 1
      },
      "yearly": {
        "day_selection": {
          "month": 1,
          "type": "onWeekDayOfMonth",
          "week": 1,
          "weekday": 1
        },
        "ends": {
          "count": 1,
          "date": "example",
          "type": "date"
        },
        "interval": 1
      }
    },
    "sequence_no": 1,
    "start_date": "example",
    "start_time": 1,
    "tentative": true,
    "timezone": "example",
    "updated_at": "example"
  }
}
```

### Update a client

Rename a client, change its notes, or archive it. Blank fields are left as they are.

**Inputs**

- Client (`client_id`, number, required): The client to change.
- Name (`name`, text): The new name.
- Notes (`notes`, text): New notes.
- Archived (`archived`, true/false): Archive (true) or restore (false) the client.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "archived": true,
    "color": "example",
    "created_at": "example",
    "creator_id": 1,
    "custom_field_values": {},
    "deleted": true,
    "deleted_at": "example",
    "id": 1,
    "last_updated_by": 1,
    "name": "example",
    "notes": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Update a project

Change a project's name, client, code, dates or notes, or archive it. Blank fields are left as they are.

**Inputs**

- Project (`project_id`, number, required): The project to change.
- Name (`name`, text): The new name.
- Client (`client_id`, number): The client the project is for.
- Project code (`project_code`, text): The new project code.
- Notes (`notes`, text): New notes.
- Start date (`start_date`, date): When the project starts.
- End date (`end_date`, date): When the project ends.
- Archived (`archived`, true/false): Archive (true) or restore (false) the project.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "account": {
      "id": 1,
      "name": "example",
      "url": "example"
    },
    "account_id": 1,
    "activity_type_ids": [
      1
    ],
    "activity_types": [
      {
        "billable": true,
        "id": 1
      }
    ],
    "archived": true,
    "client": {
      "id": 1,
      "name": "example",
      "notes": "example",
      "url": "example"
    },
    "client_id": 1,
    "color": "example",
    "created_at": "example",
    "creator_id": 1,
    "custom_field_values": {},
    "default_billable": true,
    "deleted": true,
    "deleted_at": "example",
    "end_date": "example",
    "id": 1,
    "last_updated_by": 1,
    "name": "example",
    "notes": "example",
    "project_code": "example",
    "start_date": "example",
    "team": [
      {
        "hidden": true,
        "hourly_rate": 1,
        "resource_id": 1
      }
    ],
    "updated_at": "example",
    "url": "example"
  }
}
```

### Update a resource

Change a resource's name, contact details or notes, or archive it. Blank fields are left as they are.

**Inputs**

- Resource (`resource_id`, number, required): The resource to change.
- Name (`name`, text): The new name.
- Job title (`job_title`, text): The new job title.
- Phone (`phone`, text): The new phone number.
- Notes (`notes`, text): New notes.
- Bookable (`bookable`, true/false): Whether the resource can be booked.
- Archived (`archived`, true/false): Archive (true) or restore (false) the resource.

**Outputs**

- `data` (object): The response from Resource Guru.

**Example output**

```json
{
  "data": {
    "account": {
      "id": 1,
      "name": "example",
      "url": "example"
    },
    "archived": true,
    "available_periods": [
      {
        "end_time": 1,
        "start_time": 1,
        "valid_from": "example",
        "valid_until": "example",
        "week_day": 1
      }
    ],
    "bookable": true,
    "booked_client_ids": [
      1
    ],
    "booked_project_ids": [
      1
    ],
    "booking_approver_ids": [
      1
    ],
    "color": "example",
    "created_at": "example",
    "creator_id": 1,
    "custom_attributes": {
      "capacity": "example",
      "phone": "example",
      "registration_number": "example"
    },
    "custom_available_periods": [
      {
        "date": "example",
        "end_time": 1,
        "start_time": 1
      }
    ],
    "email": "example",
    "first_name": "example",
    "human": true,
    "id": 1,
    "image": "example",
    "images": {
      "card": "example",
      "default": "example",
      "header": "example",
      "thumb": "example",
      "tiny": "example"
    },
    "job_title": "example",
    "last_name": "example",
    "last_updated_by": 1,
    "minutes_per_day": 1,
    "name": "example",
    "notes": "example",
    "overtimes": [
      {
        "created_at": "example",
        "creator_id": 1,
        "date": "example",
        "duration": 1,
        "id": 1,
        "resource_id": 1,
        "updated_at": "example"
      }
    ],
    "phone": "example",
    "placeholder_owner_ids": [
      1
    ],
    "resource_type": {
      "id": 1,
      "name": "example",
      "url": "example"
    },
    "selected_custom_field_options": [
      {
        "id": 1,
        "name": "example",
        "value": "example"
      }
    ],
    "timezone": {
      "name": "example",
      "offset": 1
    },
    "updated_at": "example",
    "url": "example",
    "user_id": 1,
    "vacation_allowance": 1
  }
}
```
