Within this chapter the following scenarios will be described:

  • How to get task-results if notifications cannot be used
  • How to find tasks using the customer specific task reference

How to get task-results if notifications cannot be used

If you cannot use notification for processing the events CUSTOMER_INPUT_REQUIRED and/or the TASK_COMPLETED, you must take care tracking result sign off yourself. As explained in chapter Project setup - Getting the results any Task detail can be retrieved by an http-GET request to the corresponding URL (e.g.:

https://[environment].clickworker.com/api/marketplace/v2/customer/tasks/2405829?show_cloned_task=tr ue).

For practical reasons this approach must be extended by a feature to get an overview of all tasks and their corresponding states. A http-GET request to the URL:

https://[environment].clickworker.com/api/marketplace/v2/customer/tasks would show all tasks from the customer as a list in the following format:

<tasks>
  <link href="https://[environment].clickworker.com/api/marketplace/v2/customer/tasks/[task_id]"
  rel="task" type="application/xml"/> 
  <customer_ref>[CUSTOMER_REF]</customer_ref> 
  <template>
    <link href= "https://[environment].clickworker.com/api/marketplace/v2/customer/task_templates/ [tt_code]" rel="task_template" type="application/xml"/>
    <product>
      <link href= "https://[environment].clickworker.com/api/marketplace/v2/products/TextCreate" rel="product" type="application/xml"/>
    </product>
  </template>
  <state>finished</state> 
  <created_at>2013-10-17T09:22:16+02:00</created_at>
</tasks>

The request-URL can be configured by the use of request-Parameter:

parameter meaning values
state Filters tasks by specified state. Feedback
[All Tasks which require a customer buyoff]
Finished
from
to
Filters tasks by created_at date dd.mm.yyyy

To request a list of tasks that are waiting for the customer’s approval, the URL would be:

https://[environment].clickworker.com/api/marketplace/v2/customer/tasks?state=feedback

To request a list of tasks created during a specific timeframe, the URL would be:

https://[environment].clickworker.com/api/marketplace/v2/customer/tasks?from=10.10.2013&to=14.10.20 13

How to get tasks by customer reference

Within the examples of the Task-upload (see Project setup - Task - common elements) is shown that customers can pass-through their own identifier if desired. With this identifier all tasks from a specific customer can be filtered using the following URL:

https://[environment].clickworker.com/api/marketplace/v2/customer/tasks/search?customer_ref=[custome r_ref].

As a result the same list of tasks is presented to the customer as described in the section before.

Tags: