# FreeAgent

> Work with your FreeAgent accounts: contacts, projects, tasks and time, draft invoices, bank transactions and expenses.

App · 31 actions. Web page: https://docs.lodol.com/docs/integrations/freeagent

## Actions

### Create contact

Add a contact. Give an organization, or a first and last name; e-mail, phone and address are optional.

**Inputs**

- First name (`first_name`, text): The contact's first name.
- Last name (`last_name`, text): The contact's last name.
- Organisation (`organisation_name`, text): The company the contact works for or is. A contact needs this, or both a first and a last name.
- E-mail (`email`, text): The contact's e-mail address.
- Billing e-mail (`billing_email`, text): Where invoices are sent, if not the e-mail above.
- Phone (`phone_number`, text): The contact's phone number.
- Mobile (`mobile`, text): The contact's mobile number.
- Address line 1 (`address1`, text): The first line of the address.
- Address line 2 (`address2`, text): The second line of the address.
- Town (`town`, text): The town or city.
- Region (`region`, text): The county, state or region.
- Postcode (`postcode`, text): The postcode or ZIP code.
- Country (`country`, text): The country's name, such as United Kingdom.
- Payment terms (days) (`default_payment_terms_in_days`, number): How many days they have to pay an invoice, 0 to 365. From 0 to 365.

**Outputs**

- `contact` (object): The contact as it was made

**Example output**

```json
{
  "contact": {
    "account_balance": "example",
    "active_projects_count": 1,
    "address1": "example",
    "address2": "example",
    "billing_email": "example",
    "country": "example",
    "created_at": "example",
    "default_payment_terms_in_days": 1,
    "email": "example",
    "first_name": "example",
    "id": "12345",
    "last_name": "example",
    "mobile": "example",
    "organisation_name": "example",
    "phone_number": "example",
    "postcode": "example",
    "region": "example",
    "status": "example",
    "town": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Create draft invoice

Make a draft invoice for a contact with one line. It is never sent: open it in FreeAgent to review and send it.

**Inputs**

- Contact (`contact`, text, required): Who to bill.
- Invoice date (`dated_on`, date, required): The date on the invoice.
- Line description (`description`, text, required): What the invoice line is for.
- Unit price (`price`, number, required): The price of one unit, before sales tax.
- Quantity (`quantity`, number): How many units. Defaults to 1.
- Unit (`item_type`, text): What the quantity counts. Defaults to Services. One of: `Hours`, `Days`, `Weeks`, `Months`, `Years`, `Products`, `Services`, `Training`, `Expenses`, `Comment`, `Discount`, `Credit`.
- Sales tax rate (%) (`sales_tax_rate`, number): The sales tax rate for the line, such as 20. Leave empty to let FreeAgent decide. At least 0.
- Payment terms (days) (`payment_terms_in_days`, number): How many days to pay. Defaults to 14. From 0 to 365.
- Currency (`currency`, text): A three-letter currency code, such as GBP. Defaults to the company's currency.
- Invoice number (`reference`, text): Leave empty to let FreeAgent number it.
- Purchase order (`po_reference`, text): The customer's purchase order reference.
- Notes (`comments`, text): Text shown on the invoice.

**Outputs**

- `invoice` (object): The draft invoice as it was made

**Example output**

```json
{
  "invoice": {
    "comments": "example",
    "contact": "example",
    "contact_name": "example",
    "created_at": "example",
    "currency": "example",
    "dated_on": "example",
    "due_on": "example",
    "due_value": "example",
    "id": "12345",
    "invoice_items": [],
    "net_value": "example",
    "paid_value": "example",
    "payment_terms_in_days": 1,
    "po_reference": "example",
    "reference": "example",
    "status": "example",
    "total_value": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Create expense

Record an expense for a user, in a category, on a day. Enter the amount as a positive number.

**Inputs**

- Category (`category`, text, required): What kind of expense it is.
- Date (`dated_on`, date, required): The day it was spent.
- Amount (`amount`, number, required): How much was spent, including tax, as a positive number such as 12.50. At least 0.
- Description (`description`, text): What it was for.
- Spent by (`user`, text): Defaults to the signed-in user.
- Project (`project`, text): Charge it to this project.

**Outputs**

- `expense` (object): The expense as it was made

**Example output**

```json
{
  "expense": {
    "category": "example",
    "created_at": "example",
    "currency": "example",
    "dated_on": "example",
    "description": "example",
    "gross_value": "example",
    "id": "12345",
    "project": "example",
    "updated_at": "example",
    "url": "example",
    "user": "example"
  }
}
```

### Create project

Start a project for a contact, with an optional budget and billing rate.

**Inputs**

- Contact (`contact`, text, required): The contact the project is for.
- Name (`name`, text, required): The project's name.
- Status (`status`, text): Whether the project is active. Defaults to Active. One of: `Active`, `Completed`, `Cancelled`, `Hidden`.
- Currency (`currency`, text): A three-letter currency code, such as GBP. Defaults to the company's currency.
- Budget in (`budget_units`, text): What the budget counts. Defaults to Hours. One of: `Hours`, `Days`, `Monetary` (Money).
- Budget (`budget`, number): How much of the budget units the project has. At least 0.
- Billing rate (`normal_billing_rate`, number): What you usually charge per hour or day on this project. At least 0.
- Billing rate per (`billing_period`, text): Whether the billing rate is per hour or per day. One of: `hour` (Per hour), `day` (Per day).
- Starts on (`starts_on`, date): The project's start date.
- Ends on (`ends_on`, date): The project's end date.
- Purchase order (`contract_po_reference`, text): The customer's purchase order reference.

**Outputs**

- `project` (object): The project as it was made

**Example output**

```json
{
  "project": {
    "billing_period": "example",
    "budget": 1,
    "budget_units": "example",
    "contact": "example",
    "contact_name": "example",
    "created_at": "example",
    "currency": "example",
    "ends_on": "example",
    "id": "12345",
    "name": "example",
    "normal_billing_rate": "example",
    "starts_on": "example",
    "status": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Create task

Add a task to a project, so time can be logged against it.

**Inputs**

- Project (`project`, text, required): The project the task belongs to.
- Name (`name`, text, required): The task's name.
- Status (`status`, text): Whether the task is active. Defaults to Active. One of: `Active`, `Completed`, `Hidden`.
- Billable (`is_billable`, true/false): Whether time on the task can be billed.
- Billing rate (`billing_rate`, number): What you charge per hour or day for this task. At least 0.
- Billing rate per (`billing_period`, text): Whether the billing rate is per hour or per day. One of: `hour` (Per hour), `day` (Per day).

**Outputs**

- `task` (object): The task as it was made

**Example output**

```json
{
  "task": {
    "billing_period": "example",
    "billing_rate": "example",
    "created_at": "example",
    "currency": "example",
    "id": "12345",
    "is_billable": true,
    "name": "example",
    "project": "example",
    "status": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Create timeslip

Log hours worked on a task of a project, for yourself or another user.

**Inputs**

- Project (`project`, text, required): The project the time was spent on.
- Task (`task`, text, required): The task the time was spent on. Pick the project first.
- Date (`dated_on`, date, required): The day the work was done.
- Hours (`hours`, number, required): How many hours were worked, such as 1.5. At least 0.
- Who did the work (`user`, text): Defaults to the signed-in user.
- Comment (`comment`, text): A note on the work.

**Outputs**

- `timeslip` (object): The timeslip as it was made

**Example output**

```json
{
  "timeslip": {
    "billed_on_invoice": "example",
    "comment": "example",
    "created_at": "example",
    "dated_on": "example",
    "hours": "example",
    "id": "12345",
    "project": "example",
    "task": "example",
    "updated_at": "example",
    "url": "example",
    "user": "example"
  }
}
```

### Delete contact

Delete a contact. FreeAgent refuses if the contact has invoices, bills or projects. This cannot be undone.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's id, from 'List contacts' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `id` (text): The id of the record deleted

**Example output**

```json
{
  "deleted": true,
  "id": "12345"
}
```

### Delete draft invoice

Delete an invoice that is still a draft. FreeAgent refuses once it has been sent. This cannot be undone.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's id, from 'List invoices' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `id` (text): The id of the record deleted

**Example output**

```json
{
  "deleted": true,
  "id": "12345"
}
```

### Delete expense

Delete an expense. This cannot be undone.

**Inputs**

- Expense ID (`expense_id`, text, required): The expense's id, from 'List expenses' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `id` (text): The id of the record deleted

**Example output**

```json
{
  "deleted": true,
  "id": "12345"
}
```

### Delete project

Delete a project. FreeAgent refuses if it has invoiced time or expenses. This cannot be undone.

**Inputs**

- Project ID (`project_id`, text, required): The project's id, from 'List projects' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `id` (text): The id of the record deleted

**Example output**

```json
{
  "deleted": true,
  "id": "12345"
}
```

### Delete task

Delete a task. FreeAgent refuses if time is logged on it. This cannot be undone.

**Inputs**

- Task ID (`task_id`, text, required): The task's id, from 'List tasks' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `id` (text): The id of the record deleted

**Example output**

```json
{
  "deleted": true,
  "id": "12345"
}
```

### Delete timeslip

Delete a timeslip. FreeAgent refuses if it is already billed. This cannot be undone.

**Inputs**

- Timeslip ID (`timeslip_id`, text, required): The timeslip's id, from 'List timeslips' or an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `id` (text): The id of the record deleted

**Example output**

```json
{
  "deleted": true,
  "id": "12345"
}
```

### Get company

Get the FreeAgent company that's connected: its name, currency, type, address and sales tax status.

**Inputs**: None.

**Outputs**

- `company` (object): The company

**Example output**

```json
{
  "company": {
    "address1": "example",
    "company_start_date": "example",
    "country": "example",
    "currency": "example",
    "id": "12345",
    "name": "example",
    "postcode": "example",
    "sales_tax_registration_status": "example",
    "subdomain": "example",
    "time_zone": "example",
    "town": "example",
    "type": "example",
    "url": "example"
  }
}
```

### Get contact

Get one contact with their e-mail, phone numbers, address and what they owe.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's id, from 'List contacts' or an earlier step.

**Outputs**

- `contact` (object): The contact

**Example output**

```json
{
  "contact": {
    "account_balance": "example",
    "active_projects_count": 1,
    "address1": "example",
    "address2": "example",
    "billing_email": "example",
    "country": "example",
    "created_at": "example",
    "default_payment_terms_in_days": 1,
    "email": "example",
    "first_name": "example",
    "id": "12345",
    "last_name": "example",
    "mobile": "example",
    "organisation_name": "example",
    "phone_number": "example",
    "postcode": "example",
    "region": "example",
    "status": "example",
    "town": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Get current user

Get the FreeAgent user that's connected: name, e-mail, role and permission level.

**Inputs**: None.

**Outputs**

- `user` (object): The user

**Example output**

```json
{
  "user": {
    "created_at": "example",
    "email": "example",
    "first_name": "example",
    "hidden": true,
    "id": "12345",
    "last_name": "example",
    "permission_level": 1,
    "role": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Get invoice

Get one invoice with its lines, totals and what is still owed.

**Inputs**

- Invoice ID (`invoice_id`, text, required): The invoice's id, from 'List invoices' or an earlier step.

**Outputs**

- `invoice` (object): The invoice

**Example output**

```json
{
  "invoice": {
    "comments": "example",
    "contact": "example",
    "contact_name": "example",
    "created_at": "example",
    "currency": "example",
    "dated_on": "example",
    "due_on": "example",
    "due_value": "example",
    "id": "12345",
    "invoice_items": [],
    "net_value": "example",
    "paid_value": "example",
    "payment_terms_in_days": 1,
    "po_reference": "example",
    "reference": "example",
    "status": "example",
    "total_value": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Get project

Get one project with its contact, budget and billing rate.

**Inputs**

- Project ID (`project_id`, text, required): The project's id, from 'List projects' or an earlier step.

**Outputs**

- `project` (object): The project

**Example output**

```json
{
  "project": {
    "billing_period": "example",
    "budget": 1,
    "budget_units": "example",
    "contact": "example",
    "contact_name": "example",
    "created_at": "example",
    "currency": "example",
    "ends_on": "example",
    "id": "12345",
    "name": "example",
    "normal_billing_rate": "example",
    "starts_on": "example",
    "status": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### List bank accounts

List the company's bank accounts with their balances. An account's id is what 'List bank transactions' takes.

**Inputs**

- Page size (`page_size`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Page number (`page_number`, number): Which page to return, starting at 1. Use it with 'Has more' to read on. At least 1.

**Outputs**

- `bank_accounts` (list): The bank accounts
- `count` (number): How many came back on this page
- `has_more` (true/false): Whether a next page exists; raise the page number to get it
- `page_number` (number): The page number returned
- `page_size` (number): The page size used
- `total` (number): How many match in all, as FreeAgent counts them

**Example output**

```json
{
  "bank_accounts": [
    {
      "bank_name": "example",
      "currency": "example",
      "current_balance": "example",
      "id": "12345",
      "is_personal": true,
      "is_primary": true,
      "latest_activity_date": "example",
      "name": "example",
      "status": "example",
      "type": "example",
      "unexplained_transaction_count": 1,
      "url": "example"
    }
  ],
  "count": 1,
  "has_more": false,
  "page_number": 1,
  "page_size": 25,
  "total": 1
}
```

### List bank transactions

List the transactions of one bank account, by whether they are explained or by day range. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Bank account (`bank_account`, text, required): The account to list transactions of.
- Show (`view`, text): Which transactions to list. Defaults to all. One of: `all` (All transactions), `unexplained`, `explained`, `manual` (Added by hand), `imported`, `marked_for_review` (Marked for review).
- From date (`from_date`, date): Only those dated on or after this day.
- To date (`to_date`, date): Only those dated on or before this day.
- Updated since (`updated_since`, date and time): Only those changed on or after this date and time.
- Page size (`page_size`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Page number (`page_number`, number): Which page to return, starting at 1. Use it with 'Has more' to read on. At least 1.

**Outputs**

- `bank_transactions` (list): The bank transactions
- `count` (number): How many came back on this page
- `has_more` (true/false): Whether a next page exists; raise the page number to get it
- `page_number` (number): The page number returned
- `page_size` (number): The page size used
- `total` (number): How many match in all, as FreeAgent counts them

**Example output**

```json
{
  "bank_transactions": [
    {
      "amount": "example",
      "bank_account": "example",
      "created_at": "example",
      "dated_on": "example",
      "description": "example",
      "id": "12345",
      "is_manual": true,
      "unexplained_amount": "example",
      "updated_at": "example",
      "url": "example"
    }
  ],
  "count": 1,
  "has_more": false,
  "page_number": 1,
  "page_size": 25,
  "total": 1
}
```

### List categories

List the categories an expense can be filed under, with their groups. A category's id is what 'Create expense' takes.

**Inputs**: None.

**Outputs**

- `categories` (list): The categories
- `count` (number): How many categories

**Example output**

```json
{
  "categories": [
    {
      "allowable_for_tax": true,
      "description": "example",
      "group_description": "example",
      "id": "12345",
      "nominal_code": "example",
      "url": "example"
    }
  ],
  "count": 1
}
```

### List contacts

List contacts, such as clients and suppliers, by kind or last update. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Show (`view`, text): Which contacts to list. Defaults to all. One of: `all` (All contacts), `active` (Active contacts), `clients`, `suppliers`, `active_projects` (With active projects), `completed_projects` (With completed projects), `open_clients` (Clients with open invoices), `open_suppliers` (Suppliers with open bills), `hidden` (Hidden contacts).
- Updated since (`updated_since`, date and time): Only those changed on or after this date and time.
- Sort by (`sort_by`, text): What to order the results by. One of: `name`, `created_at` (Date created), `updated_at` (Last updated).
- Order (`sort_order`, text): Ascending or descending. Defaults to ascending when 'Sort by' is set. One of: `asc` (Ascending), `desc` (Descending).
- Page size (`page_size`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Page number (`page_number`, number): Which page to return, starting at 1. Use it with 'Has more' to read on. At least 1.

**Outputs**

- `contacts` (list): The contacts
- `count` (number): How many came back on this page
- `has_more` (true/false): Whether a next page exists; raise the page number to get it
- `page_number` (number): The page number returned
- `page_size` (number): The page size used
- `total` (number): How many match in all, as FreeAgent counts them

**Example output**

```json
{
  "contacts": [
    {
      "account_balance": "example",
      "active_projects_count": 1,
      "address1": "example",
      "address2": "example",
      "billing_email": "example",
      "country": "example",
      "created_at": "example",
      "default_payment_terms_in_days": 1,
      "email": "example",
      "first_name": "example",
      "id": "12345",
      "last_name": "example",
      "mobile": "example",
      "organisation_name": "example",
      "phone_number": "example",
      "postcode": "example",
      "region": "example",
      "status": "example",
      "town": "example",
      "updated_at": "example",
      "url": "example"
    }
  ],
  "count": 1,
  "has_more": false,
  "page_number": 1,
  "page_size": 25,
  "total": 1
}
```

### List expenses

List expenses by person, project or day range. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Show (`view`, text): Which expenses to list. Defaults to all. One of: `all` (All expenses), `recurring` (Recurring expenses).
- User (`user`, text): Only those belonging to this user.
- Project (`project`, text): Only those in this project.
- From date (`from_date`, date): Only those dated on or after this day.
- To date (`to_date`, date): Only those dated on or before this day.
- Updated since (`updated_since`, date and time): Only those changed on or after this date and time.
- Page size (`page_size`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Page number (`page_number`, number): Which page to return, starting at 1. Use it with 'Has more' to read on. At least 1.

**Outputs**

- `count` (number): How many came back on this page
- `expenses` (list): The expenses
- `has_more` (true/false): Whether a next page exists; raise the page number to get it
- `page_number` (number): The page number returned
- `page_size` (number): The page size used
- `total` (number): How many match in all, as FreeAgent counts them

**Example output**

```json
{
  "count": 1,
  "expenses": [
    {
      "category": "example",
      "created_at": "example",
      "currency": "example",
      "dated_on": "example",
      "description": "example",
      "gross_value": "example",
      "id": "12345",
      "project": "example",
      "updated_at": "example",
      "url": "example",
      "user": "example"
    }
  ],
  "has_more": false,
  "page_number": 1,
  "page_size": 25,
  "total": 1
}
```

### List invoices

List invoices by state, contact, project or last update, each with its lines. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Show (`view`, text): Which invoices to list. Defaults to recent, open or overdue ones. One of: `recent_open_or_overdue` (Recent, open or overdue), `open`, `overdue`, `open_or_overdue` (Open or overdue), `draft`, `paid`, `scheduled_to_email` (Scheduled to be e-mailed), `thank_you_emails` (Waiting for a thank-you e-mail), `reminder_emails` (Waiting for a reminder e-mail).
- Contact (`contact`, text): Only those for this contact.
- Project (`project`, text): Only those in this project.
- Updated since (`updated_since`, date and time): Only those changed on or after this date and time.
- Sort by (`sort_by`, text): What to order the results by. One of: `dated_on` (Invoice date), `created_at` (Date created), `updated_at` (Last updated).
- Order (`sort_order`, text): Ascending or descending. Defaults to ascending when 'Sort by' is set. One of: `asc` (Ascending), `desc` (Descending).
- Page size (`page_size`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Page number (`page_number`, number): Which page to return, starting at 1. Use it with 'Has more' to read on. At least 1.

**Outputs**

- `count` (number): How many came back on this page
- `has_more` (true/false): Whether a next page exists; raise the page number to get it
- `invoices` (list): The invoices
- `page_number` (number): The page number returned
- `page_size` (number): The page size used
- `total` (number): How many match in all, as FreeAgent counts them

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "invoices": [
    {
      "comments": "example",
      "contact": "example",
      "contact_name": "example",
      "created_at": "example",
      "currency": "example",
      "dated_on": "example",
      "due_on": "example",
      "due_value": "example",
      "id": "12345",
      "invoice_items": [],
      "net_value": "example",
      "paid_value": "example",
      "payment_terms_in_days": 1,
      "po_reference": "example",
      "reference": "example",
      "status": "example",
      "total_value": "example",
      "updated_at": "example",
      "url": "example"
    }
  ],
  "page_number": 1,
  "page_size": 25,
  "total": 1
}
```

### List projects

List projects, optionally only those of one contact or in one state. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Show (`view`, text): Which projects to list. Defaults to active ones. One of: `active` (Active projects), `completed` (Completed projects), `cancelled` (Canceled projects), `hidden` (Hidden projects).
- Contact (`contact`, text): Only projects for this contact.
- Updated since (`updated_since`, date and time): Only those changed on or after this date and time.
- Sort by (`sort_by`, text): What to order the results by. One of: `name`, `created_at` (Date created), `updated_at` (Last updated).
- Order (`sort_order`, text): Ascending or descending. Defaults to ascending when 'Sort by' is set. One of: `asc` (Ascending), `desc` (Descending).
- Page size (`page_size`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Page number (`page_number`, number): Which page to return, starting at 1. Use it with 'Has more' to read on. At least 1.

**Outputs**

- `count` (number): How many came back on this page
- `has_more` (true/false): Whether a next page exists; raise the page number to get it
- `page_number` (number): The page number returned
- `page_size` (number): The page size used
- `projects` (list): The projects
- `total` (number): How many match in all, as FreeAgent counts them

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page_number": 1,
  "page_size": 25,
  "projects": [
    {
      "billing_period": "example",
      "budget": 1,
      "budget_units": "example",
      "contact": "example",
      "contact_name": "example",
      "created_at": "example",
      "currency": "example",
      "ends_on": "example",
      "id": "12345",
      "name": "example",
      "normal_billing_rate": "example",
      "starts_on": "example",
      "status": "example",
      "updated_at": "example",
      "url": "example"
    }
  ],
  "total": 1
}
```

### List tasks

List tasks, optionally only those of one project. A task's id is what 'Create timeslip' takes. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Project (`project`, text): Only tasks in this project.
- Show (`view`, text): Which tasks to list. Defaults to all. One of: `all` (All tasks), `active` (Active tasks), `completed` (Completed tasks), `hidden` (Hidden tasks).
- Updated since (`updated_since`, date and time): Only those changed on or after this date and time.
- Page size (`page_size`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Page number (`page_number`, number): Which page to return, starting at 1. Use it with 'Has more' to read on. At least 1.

**Outputs**

- `count` (number): How many came back on this page
- `has_more` (true/false): Whether a next page exists; raise the page number to get it
- `page_number` (number): The page number returned
- `page_size` (number): The page size used
- `tasks` (list): The tasks
- `total` (number): How many match in all, as FreeAgent counts them

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page_number": 1,
  "page_size": 25,
  "tasks": [
    {
      "billing_period": "example",
      "billing_rate": "example",
      "created_at": "example",
      "currency": "example",
      "id": "12345",
      "is_billable": true,
      "name": "example",
      "project": "example",
      "status": "example",
      "updated_at": "example",
      "url": "example"
    }
  ],
  "total": 1
}
```

### List timeslips

List logged time, by project, task, person, day range or whether it is billed. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Project (`project`, text): Only those in this project.
- Task ID (`task`, text): Only time on this task, from 'List tasks' or an earlier step.
- User (`user`, text): Only those belonging to this user.
- Show (`view`, text): Which timeslips to list. Defaults to all. One of: `all` (All timeslips), `unbilled` (Not yet billed), `running` (Timers still running).
- From date (`from_date`, date): Only those dated on or after this day.
- To date (`to_date`, date): Only those dated on or before this day.
- Updated since (`updated_since`, date and time): Only those changed on or after this date and time.
- Page size (`page_size`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Page number (`page_number`, number): Which page to return, starting at 1. Use it with 'Has more' to read on. At least 1.

**Outputs**

- `count` (number): How many came back on this page
- `has_more` (true/false): Whether a next page exists; raise the page number to get it
- `page_number` (number): The page number returned
- `page_size` (number): The page size used
- `timeslips` (list): The timeslips
- `total` (number): How many match in all, as FreeAgent counts them

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page_number": 1,
  "page_size": 25,
  "timeslips": [
    {
      "billed_on_invoice": "example",
      "comment": "example",
      "created_at": "example",
      "dated_on": "example",
      "hours": "example",
      "id": "12345",
      "project": "example",
      "task": "example",
      "updated_at": "example",
      "url": "example",
      "user": "example"
    }
  ],
  "total": 1
}
```

### List users

List the people with access to the company. A user's id is what 'Create timeslip' and 'Create expense' take. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Page size (`page_size`, number): How many to return, 1 to 100. Defaults to 25. From 1 to 100.
- Page number (`page_number`, number): Which page to return, starting at 1. Use it with 'Has more' to read on. At least 1.

**Outputs**

- `count` (number): How many came back on this page
- `has_more` (true/false): Whether a next page exists; raise the page number to get it
- `page_number` (number): The page number returned
- `page_size` (number): The page size used
- `total` (number): How many match in all, as FreeAgent counts them
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page_number": 1,
  "page_size": 25,
  "total": 1,
  "users": [
    {
      "created_at": "example",
      "email": "example",
      "first_name": "example",
      "hidden": true,
      "id": "12345",
      "last_name": "example",
      "permission_level": 1,
      "role": "example",
      "updated_at": "example",
      "url": "example"
    }
  ]
}
```

### Update contact

Change a contact's details. Only the fields you fill in change.

**Inputs**

- Contact ID (`contact_id`, text, required): The contact's id, from 'List contacts' or an earlier step.
- First name (`first_name`, text): The contact's first name.
- Last name (`last_name`, text): The contact's last name.
- Organisation (`organisation_name`, text): The company the contact works for or is. A contact needs this, or both a first and a last name.
- E-mail (`email`, text): The contact's e-mail address.
- Billing e-mail (`billing_email`, text): Where invoices are sent, if not the e-mail above.
- Phone (`phone_number`, text): The contact's phone number.
- Mobile (`mobile`, text): The contact's mobile number.
- Address line 1 (`address1`, text): The first line of the address.
- Address line 2 (`address2`, text): The second line of the address.
- Town (`town`, text): The town or city.
- Region (`region`, text): The county, state or region.
- Postcode (`postcode`, text): The postcode or ZIP code.
- Country (`country`, text): The country's name, such as United Kingdom.
- Payment terms (days) (`default_payment_terms_in_days`, number): How many days they have to pay an invoice, 0 to 365. From 0 to 365.

**Outputs**

- `contact` (object): The contact as it is now

**Example output**

```json
{
  "contact": {
    "account_balance": "example",
    "active_projects_count": 1,
    "address1": "example",
    "address2": "example",
    "billing_email": "example",
    "country": "example",
    "created_at": "example",
    "default_payment_terms_in_days": 1,
    "email": "example",
    "first_name": "example",
    "id": "12345",
    "last_name": "example",
    "mobile": "example",
    "organisation_name": "example",
    "phone_number": "example",
    "postcode": "example",
    "region": "example",
    "status": "example",
    "town": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Update project

Change a project's name, status, budget, billing rate or dates. Only the fields you fill in change.

**Inputs**

- Project ID (`project_id`, text, required): The project's id, from 'List projects' or an earlier step.
- Name (`name`, text): A new name.
- Status (`status`, text): Whether the project is active. Defaults to Active. One of: `Active`, `Completed`, `Cancelled`, `Hidden`.
- Currency (`currency`, text): A three-letter currency code, such as GBP. Defaults to the company's currency.
- Budget in (`budget_units`, text): What the budget counts. Defaults to Hours. One of: `Hours`, `Days`, `Monetary` (Money).
- Budget (`budget`, number): How much of the budget units the project has. At least 0.
- Billing rate (`normal_billing_rate`, number): What you usually charge per hour or day on this project. At least 0.
- Billing rate per (`billing_period`, text): Whether the billing rate is per hour or per day. One of: `hour` (Per hour), `day` (Per day).
- Starts on (`starts_on`, date): The project's start date.
- Ends on (`ends_on`, date): The project's end date.
- Purchase order (`contract_po_reference`, text): The customer's purchase order reference.

**Outputs**

- `project` (object): The project as it is now

**Example output**

```json
{
  "project": {
    "billing_period": "example",
    "budget": 1,
    "budget_units": "example",
    "contact": "example",
    "contact_name": "example",
    "created_at": "example",
    "currency": "example",
    "ends_on": "example",
    "id": "12345",
    "name": "example",
    "normal_billing_rate": "example",
    "starts_on": "example",
    "status": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Update task

Change a task's name, status or billing rate. Only the fields you fill in change.

**Inputs**

- Task ID (`task_id`, text, required): The task's id, from 'List tasks' or an earlier step.
- Name (`name`, text): A new name.
- Status (`status`, text): Whether the task is active. Defaults to Active. One of: `Active`, `Completed`, `Hidden`.
- Billable (`is_billable`, true/false): Whether time on the task can be billed.
- Billing rate (`billing_rate`, number): What you charge per hour or day for this task. At least 0.
- Billing rate per (`billing_period`, text): Whether the billing rate is per hour or per day. One of: `hour` (Per hour), `day` (Per day).

**Outputs**

- `task` (object): The task as it is now

**Example output**

```json
{
  "task": {
    "billing_period": "example",
    "billing_rate": "example",
    "created_at": "example",
    "currency": "example",
    "id": "12345",
    "is_billable": true,
    "name": "example",
    "project": "example",
    "status": "example",
    "updated_at": "example",
    "url": "example"
  }
}
```

### Update timeslip

Change a timeslip's day, hours or comment. Only the fields you fill in change.

**Inputs**

- Timeslip ID (`timeslip_id`, text, required): The timeslip's id, from 'List timeslips' or an earlier step.
- Date (`dated_on`, date): A new date.
- Hours (`hours`, number): A new number of hours. At least 0.
- Comment (`comment`, text): A new note.

**Outputs**

- `timeslip` (object): The timeslip as it is now

**Example output**

```json
{
  "timeslip": {
    "billed_on_invoice": "example",
    "comment": "example",
    "created_at": "example",
    "dated_on": "example",
    "hours": "example",
    "id": "12345",
    "project": "example",
    "task": "example",
    "updated_at": "example",
    "url": "example",
    "user": "example"
  }
}
```
