# Xero Projects

> Manage projects, tasks and time entries in Xero Projects.

App · 17 actions. Web page: https://docs.lodol.com/docs/integrations/xero-projects

## Actions

### Change project status

Mark a Xero project as in progress or closed, by its project ID.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Status (`status`, text, required): Status for project. One of: `INPROGRESS`, `CLOSED`.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

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

### Create project

Create a Xero project for a contact, with a name and an optional estimate and deadline. Returns the new project with its ID.

**Inputs**

- Contact (`contact_id`, text, required): Identifier of the contact this project was created for.
- Name (`name`, text, required): Name of the project.
- Estimate amount (`estimate_amount`, number): Estimate amount.
- Deadline utc (`deadline_utc`, date and time): Deadline for the project. UTC Date Time in ISO-8601 format.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "contactId": "example",
    "creditNoteAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "currencyCode": "AED",
    "deadlineUtc": "example",
    "deposit": {
      "currency": "AED",
      "value": 1.0
    },
    "depositApplied": {
      "currency": "AED",
      "value": 1.0
    },
    "estimate": {
      "currency": "AED",
      "value": 1.0
    },
    "estimateAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "expenseAmountInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "expenseAmountToBeInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "minutesLogged": 1,
    "minutesToBeInvoiced": 1,
    "name": "example",
    "projectAmountInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "projectId": "example",
    "status": "INPROGRESS",
    "taskAmountInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "taskAmountToBeInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "totalExpenseAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "totalInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "totalTaskAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "totalToBeInvoiced": {
      "currency": "AED",
      "value": 1.0
    }
  }
}
```

### Create task

Add a task to a Xero project, with a name, a rate and how it is charged (by time, fixed price or not chargeable). Returns the new task with its ID.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Name (`name`, text, required): Name of the task. Max length 100 characters. At most 100.
- Rate (`rate`, object, required): Rate.
- Charge type (`charge_type`, text, required): Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`. One of: `TIME`, `FIXED`, `NON_CHARGEABLE` (Non chargeable).
- Estimate minutes (`estimate_minutes`, number): An estimated time to perform the task

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "amountInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "amountToBeInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "chargeType": "TIME",
    "estimateMinutes": 1,
    "fixedMinutes": 1,
    "minutesInvoiced": 1,
    "minutesToBeInvoiced": 1,
    "name": "example",
    "nonChargeableMinutes": 1,
    "projectId": "example",
    "rate": {
      "currency": "AED",
      "value": 1.0
    },
    "status": "ACTIVE",
    "taskId": "example",
    "totalAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "totalMinutes": 1
  }
}
```

### Create time entry

Log time on a Xero project against a task for a project user, with the date, number of minutes and an optional description. Returns the new time entry.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Project user (`project_user_id`, text, required): The xero user identifier of the person logging the time.
- Task (`task_id`, text, required): Identifier of the task that time entry is logged against.
- Date utc (`date_utc`, date and time, required): Date time entry is logged on. UTC Date Time in ISO-8601 format.
- Duration (`duration`, number, required): Number of minutes to be logged. Duration is between 1 and 59940 inclusively.
- Description (`description`, text): An optional description of the time entry, will be set to null if not provided during update.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "dateEnteredUtc": "example",
    "dateUtc": "example",
    "description": "example",
    "duration": 1,
    "projectId": "example",
    "status": "ACTIVE",
    "taskId": "example",
    "timeEntryId": "example",
    "userId": "example"
  }
}
```

### Delete task

Delete a task from a Xero project, by the project ID and task ID.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Task (`task_id`, text, required): Task id.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

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

### Delete time entry

Delete a time entry from a Xero project, by the project ID and time entry ID.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Time entry id (`time_entry_id`, text, required): Time entry id.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

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

### Get project

Get one Xero project by its ID, with its contact, currency, estimate, deadline, minutes logged and task and expense totals.

**Inputs**

- Project (`project_id`, text, required): Project id.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "contactId": "example",
    "creditNoteAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "currencyCode": "AED",
    "deadlineUtc": "example",
    "deposit": {
      "currency": "AED",
      "value": 1.0
    },
    "depositApplied": {
      "currency": "AED",
      "value": 1.0
    },
    "estimate": {
      "currency": "AED",
      "value": 1.0
    },
    "estimateAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "expenseAmountInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "expenseAmountToBeInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "minutesLogged": 1,
    "minutesToBeInvoiced": 1,
    "name": "example",
    "projectAmountInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "projectId": "example",
    "status": "INPROGRESS",
    "taskAmountInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "taskAmountToBeInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "totalExpenseAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "totalInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "totalTaskAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "totalToBeInvoiced": {
      "currency": "AED",
      "value": 1.0
    }
  }
}
```

### Get task

Get one task on a Xero project by its ID, with its rate, charge type, estimate and the minutes and amount logged against it.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Task (`task_id`, text, required): Task id.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "amountInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "amountToBeInvoiced": {
      "currency": "AED",
      "value": 1.0
    },
    "chargeType": "TIME",
    "estimateMinutes": 1,
    "fixedMinutes": 1,
    "minutesInvoiced": 1,
    "minutesToBeInvoiced": 1,
    "name": "example",
    "nonChargeableMinutes": 1,
    "projectId": "example",
    "rate": {
      "currency": "AED",
      "value": 1.0
    },
    "status": "ACTIVE",
    "taskId": "example",
    "totalAmount": {
      "currency": "AED",
      "value": 1.0
    },
    "totalMinutes": 1
  }
}
```

### Get time entry

Get one time entry on a Xero project by its ID, with the user, task, date, minutes logged and description.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Time entry id (`time_entry_id`, text, required): Time entry id.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "dateEnteredUtc": "example",
    "dateUtc": "example",
    "description": "example",
    "duration": 1,
    "projectId": "example",
    "status": "ACTIVE",
    "taskId": "example",
    "timeEntryId": "example",
    "userId": "example"
  }
}
```

### List contacts

List Xero contacts, a page at a time, to find the contact a project is for. Returns each contact's ID and details.

**Inputs**

- Page (`page`, number): Page. At least 1. Default: `1`.
- Page size (`page_size`, number): Page size. From 1 to 1000. Default: `100`.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "Contacts": []
  }
}
```

### List project users

List the Xero users who can be assigned to projects, a page at a time, with each user's ID, name and email.

**Inputs**

- Page (`page`, number): Page. Default: `1`.
- Page size (`page_size`, number): Page size. From 1 to 500. Default: `50`.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "itemCount": 1,
      "page": 1,
      "pageCount": 1,
      "pageSize": 1
    }
  }
}
```

### List projects

List Xero projects, a page at a time, optionally narrowed to certain project IDs, one contact or a project status. Returns each project's name, contact, estimate and totals.

**Inputs**

- Project ids (`project_ids`, list): Project ids.
- Contact (`contact_id`, text): Contact id.
- States (`states`, text): States.
- Page (`page`, number): Page. Default: `1`.
- Page size (`page_size`, number): Page size. From 1 to 500. Default: `50`.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "itemCount": 1,
      "page": 1,
      "pageCount": 1,
      "pageSize": 1
    }
  }
}
```

### List tasks

List the tasks on a Xero project, a page at a time, optionally narrowed to certain task IDs or a charge type. Returns each task's rate, estimate and time logged.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Page (`page`, number): Page.
- Page size (`page_size`, number): Page size.
- Task ids (`task_ids`, text): Task ids.
- Charge type (`charge_type`, text): Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`. One of: `TIME`, `FIXED`, `NON_CHARGEABLE` (Non chargeable).

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "itemCount": 1,
      "page": 1,
      "pageCount": 1,
      "pageSize": 1
    }
  }
}
```

### List time entries

List the time logged on a Xero project, a page at a time, filtered by user, task, invoice, contact, status, chargeable or a date range. Returns each entry's date, minutes and description.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Project user (`project_user_id`, text): Project user id.
- Task (`task_id`, text): Task id.
- Invoice id (`invoice_id`, text): Invoice id.
- Contact (`contact_id`, text): Contact id.
- Page (`page`, number): Page.
- Page size (`page_size`, number): Page size.
- States (`states`, list): States.
- Is chargeable (`is_chargeable`, true/false): Is chargeable.
- Date after utc (`date_after_utc`, date and time): Date after utc.
- Date before utc (`date_before_utc`, date and time): Date before utc.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

```json
{
  "data": {
    "items": [],
    "pagination": {
      "itemCount": 1,
      "page": 1,
      "pageCount": 1,
      "pageSize": 1
    }
  }
}
```

### Update project

Change a Xero project's name, contact, estimate or deadline, found by its project ID.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Contact (`contact_id`, text): Identifier of the contact this project was created for.
- Name (`name`, text, required): Name of the project.
- Estimate amount (`estimate_amount`, number): Estimate amount.
- Deadline utc (`deadline_utc`, date and time): Deadline for the project. UTC Date Time in ISO-8601 format.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

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

### Update task

Change a task on a Xero project, such as its name, rate, charge type or estimated minutes.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Task (`task_id`, text, required): Task id.
- Name (`name`, text, required): Name of the task. Max length 100 characters. At most 100.
- Rate (`rate`, object, required): Rate.
- Charge type (`charge_type`, text, required): Can be `TIME`, `FIXED` or `NON_CHARGEABLE`, defines how the task will be charged. Use `TIME` when you want to charge per hour and `FIXED` to charge as a fixed amount. If the task will not be charged use `NON_CHARGEABLE`. One of: `TIME`, `FIXED`, `NON_CHARGEABLE` (Non chargeable).
- Estimate minutes (`estimate_minutes`, number): An estimated time to perform the task

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

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

### Update time entry

Change a time entry on a Xero project, such as its user, task, date, minutes or description.

**Inputs**

- Project (`project_id`, text, required): Project id.
- Time entry id (`time_entry_id`, text, required): Time entry id.
- Project user (`project_user_id`, text, required): The xero user identifier of the person logging the time.
- Task (`task_id`, text, required): Identifier of the task that time entry is logged against.
- Date utc (`date_utc`, date and time, required): Date time entry is logged on. UTC Date Time in ISO-8601 format.
- Duration (`duration`, number, required): Number of minutes to be logged. Duration is between 1 and 59940 inclusively.
- Description (`description`, text): An optional description of the time entry, will be set to null if not provided during update.

**Outputs**

- `data` (object): Xero Projects response data.

**Example output**

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