Xero.Projects (Xero v1.0.0)

Copy Markdown View Source

Xero Projects API – Project, task, time, and project item management. Base URL: https://api.xero.com/projects.xro/2.0/ Scopes: projects or projects.read Status flow: INPROGRESS → CLOSED (irreversible) | CANCELLED

Summary

Functions

Creates a project item. Required: task_id, unit_amount, quantity. Optional: code, description, date_utc, account_code.

Creates a new project. Required: name, contact_id. Optional: deadline_utc, estimate_amount, currency_code.

Creates a task. Required: name, charge_type. For TIME tasks, optionally set rate and estimate_minutes.

Logs a time entry. Required: user_id, task_id, date_utc, duration (minutes). Optional: description.

Deletes a task (only if no time has been logged against it).

Lists project items (non-time charges: expenses, products).

Lists tasks for a project. Options: :page, :page_size, :task_ids, :charge_type charge_type values: "TIME" | "FIXED" | "NON_CHARGEABLE"

Lists time entries. Options: :user_id, :task_id, :invoice_id, :is_chargeable, :date_after_utc, :date_before_utc, :page, :page_size

Lists users who can be assigned to projects in this organisation.

Functions

cancel_project(t, tid, id)

close_project(t, tid, id)

create_item(t, tid, project_id, attrs)

Creates a project item. Required: task_id, unit_amount, quantity. Optional: code, description, date_utc, account_code.

create_project(t, tid, attrs)

Creates a new project. Required: name, contact_id. Optional: deadline_utc, estimate_amount, currency_code.

create_task(t, tid, project_id, attrs)

Creates a task. Required: name, charge_type. For TIME tasks, optionally set rate and estimate_minutes.

create_time(t, tid, project_id, attrs)

Logs a time entry. Required: user_id, task_id, date_utc, duration (minutes). Optional: description.

delete_item(t, tid, project_id, item_id)

Deletes a project item.

delete_task(t, tid, project_id, task_id)

Deletes a task (only if no time has been logged against it).

delete_time(t, tid, project_id, time_id)

get_item(t, tid, project_id, item_id)

get_project(t, tid, id)

get_task(t, tid, project_id, task_id)

get_time(t, tid, project_id, time_id)

list_items(t, tid, project_id, opts \\ [])

Lists project items (non-time charges: expenses, products).

list_projects(t, tid, opts \\ [])

list_tasks(t, tid, project_id, opts \\ [])

Lists tasks for a project. Options: :page, :page_size, :task_ids, :charge_type charge_type values: "TIME" | "FIXED" | "NON_CHARGEABLE"

list_time(t, tid, project_id, opts \\ [])

Lists time entries. Options: :user_id, :task_id, :invoice_id, :is_chargeable, :date_after_utc, :date_before_utc, :page, :page_size

list_users(t, tid, opts \\ [])

Lists users who can be assigned to projects in this organisation.

update_item(t, tid, project_id, item_id, attrs)

update_project(t, tid, id, attrs)

update_task(t, tid, project_id, task_id, attrs)

update_time(t, tid, project_id, time_id, attrs)