My account : API documentation

API documentation

Account

/campaign_b/get_task_info/<task_id> GET

Returns detailed info on selected task.

Parameters:

<task_id>

Task ID

Example values: 6767648

Return values:

SUCCESS

status=SUCCESS, task_id=<task_id>, task_details=[array of fields]

ERROR

status=ERROR, task_id=, error=[error message*]

*[NO SUCH TASK|NOT A CAMPAIGN OWNER]

Code:

cURL:

curl -H "MicroworkersApiKey:YOUR_API_KEY" -X GET https://api.microworkers.com/campaign_b/get_task_info/<task_id>

PHP:

<?php

include "includes/RESTClient.php";
define("cAPI_KEY", "YOUR_API_KEY");
define("cAPI_URL", "https://api.microworkers.com");

$client = new RESTClient();
$client->setApiKey(cAPI_KEY);
$client->setUrl(cAPI_URL . "/campaign_b/get_task_info/6767648");
$client->setMethod("GET");
$client->execute();
$response = $client->getLastResponse();
$client->resetClient();
echo $response;

?>

Perl:

use MW_API;
use Data::Dumper qw(Dumper);
my $mw_api = MW_API->new('api_key' => 'YOUR_API_KEY');
my $res = $mw_api->do_request('GET', '/campaign_b/get_task_info/6767648');
print Dumper($res);

Python:

from pprint import pprint
from MW_API import MW_API
mw_api = MW_API('YOUR_API_KEY')
res = mw_api.do_request('GET', '/campaign_b/get_task_info/6767648')
pprint(res)

C#:

using System;
using MWAPI;

public class Test
{
  public static void Main (string[] args)
  {
    MW_API MW_API_Client = new MW_API ("YOUR_API_KEY");
    string body = MW_API_Client.getRequest("/campaign_b/get_task_info/6767648");
    Console.WriteLine (body);
  }
}

Examples:

https://api.microworkers.com/campaign_b/get_task_info/6767648

{
  "status": "SUCCESS",
  "task_id": "6767648",
  "task_details": {
    "campaign_id": "a61f8dcf0134",
    "worker_id": "18f4174c",
    "proof": "I have signed up with this email [email protected]",
    "ip": "66.38.129.1",
    "finished_datetime": "2013-12-15 18:21:16",
    "employer_comment": "",
    "task_rating": "OK",
     "worker_earned": "0.10000",
    "csv_record_nr": "0",
    "country": "Poland",
    "bonus_worker_earned": "0.00000",
    "file_proof": {
      "file_proof_details":
      [
        {
          "content_type": "text/csv",
          "filename": "AssetsImportCompleteSample.csv",
          "size": 3245
        }
      ],
      "status": "SUCCESS"
    },
  }
}

https://api.microworkers.com/campaign_b/get_task_info/553917

{
"status": "ERROR",
"task_id": "553917",
"error": "NO SUCH TASK"
}