These are all the 1.0 APIs that have been deprecated since 23-Jan-2019. Please use the latest version of API 2.0.

/campaign/create_external_template_campaign

Create new external template campaign using this API method.

campaign_type :

required

Text

Possible value for campaign type is HG or B.

title :

required

Text

Title of campaign

qt_required :

optional

Boolean

Required Qualification Test. Values: true(Default)/false

category_id :

required

Text

Category ID

minutes_to_finish :

required

Text

How many minutes will this job take

available_positions :

required

Text

Must be higher than 30

paymentPerTask :

required

Text

Cost per task (example: 0.10, 0.13, 0.56,...)

job_instructions :

required

Text

Instructions on Job URL Page

ttr :

required

Text

Time to rate in days (1-30)

zone :

required

Text

Zone you want to target [asia1|caribbean1|europe1|europe2|int|west1]
(Required only for campaign type "B")

selected_country :

required

Text

String of countries targetted (IN CN US...)
Only applicable when "int" zone is selected
(Required only for campaign type "B")

speed :

required

Integer

Speed of campaign (1-1000) where 1000 is fastest
(Required only for campaign type "B")

group_id :

required

Text

Group ID
(Required only for campaign type "HG")

maxPositionsPerWorker :

required

Integer

Maximum number of positions (tasks) each worker can participate in
(Required only for campaign type "HG")

csv_file :

optional

File

File type must be *.csv
(Required only If you want to give different URL & Height & Width otherwise use you can pass value by URL, HEIGHT, WIDTH paramaters.).

URL :

optional

Text

URL of your application. URL must be starts with https.
Example: https://www.yourapplication.com/{{CAMP_ID}}/{{MW_ID}}/{{RAND_KEY}}
You can use following variable:
Campaign Id: {{CAMP_ID}}
WorkerId: {{MW_ID}}
Random Key: {{RAND_KEY}}
.

Width :

optional

Text

Width of iframe. Example: 800, 100%. Default value of Width is 100%

Height :

optional

Text

Height of iframe. Example: 600. Default value of Height is 500

parameters :

optional

Text

Comma seperated value of paramters. Employer can you it for storing answer in TTV.

csv_order :

optional

Integer

Possible value is 1 or 2.
1=Random Order
2=Ascending Order(same order as CSV file)

This API method is use for creating new external template campaign.
curl -H "MicroworkersApiKey:YOUR_API_KEY" -X POST "https://ttv.microworkers.com/api/campaign/create_external_template_campaign/format/json" -F "campaign_type=B" -F "title=title" -F "qt_required=1" -F "category_id=9900" -F "minutes_to_finish=30" -F "available_positions=30" -F "paymentPerTask=0.5" -F "job_instructions=job instructions" -F "ttr=7" -F "zone=int" -F "selected_country=IN CN" -F "speed=1000" -F "URL=https://www.yourapplication.com/{{CAMP_ID}}/{{MW_ID}}/{{RAND_KEY}}" -F "parameters=gameid,movieid,movieName" -F "csv_order=1" 
from pprint import pprint
from MW_API import MW_API
mw_api = MW_API('YOUR_API_KEY')
res = mw_api.do_request('POST','/campaign/create_external_template_campaign/format/json', {"campaign_type" : "B", "title" : "title", "qt_required" : , "category_id" : "9900", "minutes_to_finish" : "30", "available_positions" : "30", "paymentPerTask" : "0.5", "job_instructions" : "job instructions", "ttr" : "7", "zone" : "int", "selected_country" : "IN CN", "speed" : 1000, "URL" : "https://www.yourapplication.com/{{CAMP_ID}}/{{MW_ID}}/{{RAND_KEY}}", "parameters" : "gameid,movieid,movieName", "csv_order" : 1}, {})
pprint(res)
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('POST', '/campaign/create_external_template_campaign/format/json', {
  "campaign_type" => "B", "title" => "title", "qt_required" => , "category_id" => "9900", "minutes_to_finish" => "30", "available_positions" => "30", "paymentPerTask" => "0.5", "job_instructions" => "job instructions", "ttr" => "7", "zone" => "int", "selected_country" => "IN CN", "speed" => 1000, "URL" => "https://www.yourapplication.com/{{CAMP_ID}}/{{MW_ID}}/{{RAND_KEY}}", "parameters" => "gameid,movieid,movieName", "csv_order" => 1
});
print Dumper($res);
<?php

include "includes/RESTClient.php";
define("cAPI_KEY", "YOUR_API_KEY");
define("cAPI_URL", "https://ttv.microworkers.com/api");
$client = new RESTClient();
$client->setApiKey(cAPI_KEY);
$client->setUrl(cAPI_URL . "/campaign/create_external_template_campaign/format/json");
$client->setMethod("POST");
$client->setData(array("campaign_type" => "B", "title" => "title", "qt_required" => , "category_id" => "9900", "minutes_to_finish" => "30", "available_positions" => "30", "paymentPerTask" => "0.5", "job_instructions" => "job instructions", "ttr" => "7", "zone" => "int", "selected_country" => "IN CN", "speed" => 1000, "URL" => "https://www.yourapplication.com/{{CAMP_ID}}/{{MW_ID}}/{{RAND_KEY}}", "parameters" => "gameid,movieid,movieName", "csv_order" => 1));
$client->execute();
$response = $client->getLastResponse();
$client->resetClient();
echo $response;
?>
using System;
using MWAPI;
using System.Collections.Specialized;

public class Test{
  public static void Main (string[] args){
    MW_API MW_API_Client = new MW_API ("YOUR_API_KEY");
NameValueCollection postData = new NameValueCollection();
    postData.Add("campaign_type", "B");
     postData.Add("title", "title");
     postData.Add("qt_required", );
     postData.Add("category_id", "9900");
     postData.Add("minutes_to_finish", "30");
     postData.Add("available_positions", "30");
     postData.Add("paymentPerTask", "0.5");
     postData.Add("job_instructions", "job instructions");
     postData.Add("ttr", "7");
     postData.Add("zone", "int");
     postData.Add("selected_country", "IN CN");
     postData.Add("speed", 1000);
     postData.Add("URL", "https://www.yourapplication.com/{{CAMP_ID}}/{{MW_ID}}/{{RAND_KEY}}");
     postData.Add("parameters", "gameid,movieid,movieName");
     postData.Add("csv_order", 1);
    
    string body = MW_API_Client.postRequest("/campaign/create_external_template_campaign/format/json", postData);
    Console.WriteLine (body);
  }
}

Definition


Result Format

{
  "status": "SUCCESS",
  "response": {
    "campaign_id": "94c23ca0bbf4",
    "campaign_type": "HG",
    "campaign_cost": 52.30
  }
}
{
  "status": "ERROR",
  "message": "TTVAPI-E0004:TTVCampaign-E0011:The 'title' field is required."
}