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/submit_proof/<type>/<campaign_id>

Submit Proof using this API method.
The value of 'type' (Campaign type) can be 'B' or 'HG'. This API method is use for Submit Proof for External Template Only.

user_id :

required

Text

Worker Id.

ip_address :

required

Text

Ip address of currrent worker.

rand_key :

optional

Text

If Campaign type is HG then random key field is required.

answers :

optional

Array

If Employer wants to store answer in TTV then they can pass data here.
Example: answers=["question1"=>"answer","question2"=>"answer"]

This API method is use for Submit Proof for External Template Only.
Submit Proof URL is also available.
curl -H "MicroworkersApiKey:YOUR_API_KEY" -X PUT "https://ttv.microworkers.com/api/campaign/submit_proof/B/2168e3b09815/format/json" -d "user_id=1111&ip_address=123.123.123.34&rand_key=d23f1da5bb2ad82d98a3c661043794c4&answers[0][question1]=answer1&answers[1][question2]=answer2"
from pprint import pprint
from MW_API import MW_API
mw_api = MW_API('YOUR_API_KEY')
res = mw_api.do_request('PUT','/campaign/submit_proof/B/2168e3b09815/format/json', {"user_id" : "1111", "ip_address" : "123.123.123.34", "rand_key" : "d23f1da5bb2ad82d98a3c661043794c4", "answers[0][question1]":"answer1", "answers[1][question2]":"answer2"}, {})
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('PUT', '/campaign/submit_proof/B/2168e3b09815/format/json', {
  "user_id" => "1111", "ip_address" => "123.123.123.34", "rand_key" => "d23f1da5bb2ad82d98a3c661043794c4", "answers" => [{"question1"=>"answer1"}, {"question2"=>"answer2"}]
});
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/submit_proof/B/2168e3b09815/format/json");
$client->setMethod("PUT");
$client->setData(array("user_id" => "1111", "ip_address" => "123.123.123.34", "rand_key" => "d23f1da5bb2ad82d98a3c661043794c4", "answers" => array(array("question1"=>"answer1"), array("question2"=>"answer2"))));
$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("user_id", "1111");
     postData.Add("ip_address", "123.123.123.34");
     postData.Add("rand_key", "d23f1da5bb2ad82d98a3c661043794c4");
     postData.Add("answers", [{\"question1\":\"answer1\"}, {\"question2\":\"answer2\"}]);
    
    string body = MW_API_Client.putRequest("/campaign/submit_proof/B/2168e3b09815/format/json", postData);
    Console.WriteLine (body);
  }
}

Definition


Result Format

{
  "status": "SUCCESS",
  "response": {
    "message": "VCode successfully submitted.",
    "task_id": 2233223,
    "campaign_id": "4dfafb7d01d8",
    "campaign_type": "HG",
    "worker_id": "de917005"
  }
}
{
  "status": "ERROR",
  "message": "You don't have permission to access this page. Please check given parameters or contact Administrator for more details."
}