NAV Navbar
cURL .NET Java Go PHP Python Ruby

Tasks

Tasks are to-do items associated with collection efforts for a customer.

Task Object

Attributes

{
    "action": "phone",
    "chase_step_id": null,
    "complete": false,
    "completed_by_user_id": null,
    "completed_date": null,
    "created_at": 1571347283,
    "customer_id": 481594,
    "due_date": 1571288400,
    "id": 788,
    "name": "Call customer",
    "updated_at": 1571347283,
    "user_id": 1976
}
Parameter Type Description
id integer The task's unique ID
name string Task name
action string Action type, one of phone, letter, email, review
customer_id integer Associated customer ID
user_id integer ID of user assigned to task
due_date timestamp Task due date
complete boolean Task complete?
completed_date timestamp Date task was marked complete
completed_by_user_id integer User ID who completed task
chase_step_id integer Chasing step ID that created task
created_at timestamp Timestamp when created
updated_at timestamp Timestamp when updated

Create a task

curl "https://api.invoiced.com/tasks" \
  -u {API_KEY}: \
  -d customer_id=481594 \
  -d name="Call customer" \
  -d action="phone" \
  -d due_date=1571288400 \
  -d user_id=1976
customer = invoiced.Customer.retrieve("{CUSTOMER_ID}")
customer.tasks.create(
  :customer_id => 481594,
  :name => "Call customer",
  :action => "phone",
  :due_date => 1571288400,
  :user_id => 1976
)
<?php

$customer = $invoiced->Customer->retrieve("{CUSTOMER_ID}");
$customer->tasks()->create([
  'customer_id' => 481594,
  'name' => "Call customer",
  'action' => "phone",
  'due_date' => 1571288400,
  'user_id' => 1976
]);
customer = client.Customer.retrieve("{CUSTOMER_ID}")
customer.tasks().create(
  customer_id=481594,
  name="Call customer",
  action="phone",
  due_date=1571288400,
  user_id=1976
)
Customer customer = invoiced.newCustomer().retrieve({CUSTOMER_ID});
Task task = customer.newTask();
task.customerId = 481594;
task.name = "Call customer";
task.action = "phone";
task.dueDate = 1571288400L;
task.userId = 1976L;
task.create();
var customer = invoiced.NewCustomer().Retrieve({CUSTOMER_ID});
var task = customer.NewTask();
task.CustomerId = 481594;
task.Name = "Call customer";
task.Action = "phone";
task.DueDate = 1571288400;
task.UserId = 1976;
task.Create();
task, err := client.Task.Create(&invoiced.TaskRequest{
  CustomerId: invoiced.Int64(481594),
  Name: invoiced.String("Call customer"),
  Action: invoiced.String("phone"),
  DueDate: invoiced.Int64(1571288400),
  UserId: invoiced.Int64(1976),
})

The above command returns JSON structured like this:

{
    "action": "phone",
    "chase_step_id": null,
    "complete": false,
    "completed_by_user_id": null,
    "completed_date": null,
    "created_at": 1571347283,
    "customer_id": 481594,
    "due_date": 1571288400,
    "id": 788,
    "name": "Call customer",
    "updated_at": 1571347283,
    "user_id": 1976
}

Create a new task with this endpoint.

HTTP Request

POST /tasks

Attributes

Parameter Type Description
name string Task name
action string Action type, one of phone, letter, email, review
customer_id integer Associated customer ID
user_id integer ID of user assigned to task
due_date timestamp Task due date

Retrieve a task

curl "https://api.invoiced.com/tasks/:id" \
  -u {API_KEY}:
task = invoiced.Task.retrieve("{TASK_ID}")
<?php

$task = $invoiced->Task->retrieve("{TASK_ID}");
task = client.Task.retrieve("{TASK_ID}")
Task task = conn.newTask().retrieve({TASK_ID});
var task = invoiced.NewTask().Retrieve({TASK_ID});
task, err := client.Task.Retrieve({TASK_ID})

The above command returns JSON structured like this:

{
    "action": "phone",
    "chase_step_id": null,
    "complete": false,
    "completed_by_user_id": null,
    "completed_date": null,
    "created_at": 1571347283,
    "customer_id": 481594,
    "due_date": 1571288400,
    "id": 788,
    "name": "Call customer",
    "updated_at": 1571347283,
    "user_id": 1976
}

This endpoint retrieves a specific task.

HTTP Request

GET /tasks/:id

Update a task

curl "https://api.invoiced.com/tasks/:id" \
  -u {API_KEY}: \
  -d due_date=1587366000 \
  -X PATCH
task.due_date = 1587366000
task.save
<?php

task->due_date = 1587366000;
$task->save();
task.due_date = 1587366000
task.save()
task.dueDate = 1587366000;
task.save()
task.DueDate = 1587366000;
task.SaveAll();
task, err := invoiced.Task.Update({TASK_ID}, &invoiced.TaskRequest{
  DueDate: invoiced.Int64(1587366000),
})

The above command returns JSON structured like this:

{
    "action": "phone",
    "chase_step_id": null,
    "complete": false,
    "completed_by_user_id": null,
    "completed_date": null,
    "created_at": 1571347283,
    "customer_id": 481594,
    "due_date": 1587366000,
    "id": 788,
    "name": "Call customer",
    "updated_at": 1571347283,
    "user_id": 1976
}

Use this endpoint to update a task.

HTTP Request

PATCH /tasks/:id

Request Parameters

Parameter Type Description
name string Task name
action string Action type, one of phone, letter, email, review
user_id integer ID of user assigned to task
due_date timestamp Task due date

Delete a task

curl "https://api.invoiced.com/tasks/:id" \
  -u {API_KEY}: \
  -X DELETE
task.delete
<?php

$task->delete();
task.delete()
task.delete();
task.Delete();
err := invoiced.Task.Delete({TASK_ID})

The above command returns 204 No Content

This endpoint deletes a specific task.

HTTP Request

DELETE /tasks/:id

List all tasks

curl "https://api.invoiced.com/tasks" \
  -u {API_KEY}:
tasks, metadata = invoiced.Task.list(:per_page => 3)
<?php

list($tasks, $metadata) = $invoiced->Task->all(['per_page' => 3]);
tasks, metadata = invoiced.Task.list(per_page=3)
EntityList<Task> tasks = conn.newTask().listAll();
var tasks = invoiced.NewTask().ListAll();
tasks, err := client.Task.ListAll(nil, nil)

The above command returns JSON structured like this:

[
  {
     "action": "phone",
     "chase_step_id": null,
     "complete": false,
     "completed_by_user_id": null,
     "completed_date": null,
     "created_at": 1571347283,
     "customer_id": 481594,
     "due_date": 1587366000,
     "id": 788,
     "name": "Call customer",
     "updated_at": 1571347283,
     "user_id": 1976
 }
]

This endpoint retrieves all tasks.

HTTP Request

GET /tasks

Query Parameters

Parameter Description
sort string Column to sort by, i.e. name asc
filter object Filter object