NAV Navbar
Lucid fulcrum type [color]

Introduction

Cint brings efficiency and automation to online sampling with Cint Marketplace, the world’s most powerful, open, and customizable online sampling platform.

The Demand and Supply APIs provide a simple way to connect to millions of people and get answers in real time. By specifying a set of demographic qualifications and quotas, buyers can target a wide or very specific population on a topic of your choosing. As a supplier, you get fine grain control over your survey matching and business relationships on the platform.

We want to encourage innovation with minimal limits. We ask that you please be practical and considerate when determining call frequencies. We rate limit when needed to protect the system and ensure the highest level of service to all of our clients.

We also have a status page that displays real-time system performance. Any and all system downtime will be posted here.

New to Market Research & Surveys? Check out our glossary for definitions of common terms you will see in our documentation.

Environments

Sandbox Endpoint

https://sandbox.techops.engineering/

Production Endpoint

https://api.samplicio.us/

To make Cint’s APIs as explorable as possible, we have environments specific to your development needs. For access to these environments contact your Integration Consultant at integrations@cint.com. Please navigate to the Supply Integration Guide or the Demand Integration Guide to see how to get started.

Please note: Sandbox keys are only available for the Demand API, and not for the Supply API.

Users are financially responsible for all transactions made on the system regardless of whether it was the result of a bug in your integration.

Authentication

The Cint APIs use a HTTP Authorization header for authentication. Every call should have a header Authorization: {{APIkey}}. Ensure that the key you are passing is the correct key for the environment. If you don’t already have a Cint account, get started by signing up for a demo!

Request Format

Built on RESTful principles, the API uses HTTP methods and verbs. Requests should be made using JSON, and JSON is returned by all responses.

Running in Postman

postman

The entire Cint Marketplace API collection can be easily imported into Postman, by clicking the button below:

Run in Postman

Postman is a free application that allows you to execute test calls in an intuitive interface.

HTTP Status Codes

Cint Marketplace APIs use conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error caused by the information provided (i.e., a required parameter was omitted, a method was not found, etc.), and codes in the 5xx range indicate an error with Cint’s servers (these are rare).

Status Code Status Text Description
200 OK The request has succeeded. The meaning of a success varies depending on the HTTP method:
GET: The resource has been fetched and is transmitted in the message body.
POST: The resource describing the result of the action is transmitted in the message body
201 Created The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request.
202 Accepted The request has succeeded and has been added to the queue, but the resource has not yet been created. This is typically the response sent after PUT and POST requests.
204 No Content There is no content to send for this request. This is common for DELETE requests.
307 Temporary Redirect The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.
400 Bad Request This response means that server could not understand the request due to invalid syntax.
401 Unauthorized Authentication is needed to get requested response. This is similar to 403, but in this case, authentication is possible.
403 Forbidden Client does not have access rights to the content so server is refusing to give proper response.
404 Not Found Server cannot find the requested resource.
405 Method Not Found The request method is known by the server but has been disabled and cannot be used. Double check your method type (i.e. GET, POST, PUT, DELETE)
409 Conflict This response would be sent when a request conflicts with the current state of the server.
429 Too Many Requests The user has sent too many requests in a given amount of time (“rate limiting”).
499 Internal Server Error The server has encountered an internal error.
500 Internal Server Error The server has encountered a situation it doesn’t know how to handle.
502 Bad Gateway The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.
503 Service Unavailable The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded.
504 Gateway Timeout This error response is given when the server is acting as a gateway and cannot get a response in time.

FAQs

Do you have a question regarding your Cint integration? Click on the appropriate FAQ article to find the answer. If you still can’t find the answer to your question, get in touch with your account team.

Demand Integration FAQs

Supply Integration FAQs

Lookup

Definitions

GET List Global Definitions

Definition

GET  https://api.samplicio.us/Lookup/v1/BasicLookups/BundledLookups/{Bundle}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Lookup/v1/BasicLookups/BundledLookups/CountryLanguages,Industries,SampleTypes,StudyTypes,SupplierLinkTypes,SurveyStatuses
require 'net/http'

uri = URI('https://api.samplicio.us/Lookup/v1/BasicLookups/BundledLookups/CountryLanguages,Industries,SampleTypes,StudyTypes,SupplierLinkTypes,SurveyStatuses')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$URL = "https://api.samplicio.us/Lookup/v1/BasicLookups/BundledLookups/CountryLanguages,Industries,SampleTypes,StudyTypes,SupplierLinkTypes,SurveyStatuses";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Lookup/v1/BasicLookups/BundledLookups/CountryLanguages,Industries,SampleTypes,StudyTypes,SupplierLinkTypes,SurveyStatuses'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Lookup/v1/BasicLookups/BundledLookups/CountryLanguages,Industries,SampleTypes,StudyTypes,SupplierLinkTypes,SurveyStatuses");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Lookup/v1/BasicLookups/BundledLookups/CountryLanguages,Industries,SampleTypes,StudyTypes,SupplierLinkTypes,SurveyStatuses",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetBundledLookups successful."
  ],
  "ResultCount": 6,
  "AllBidProbabilities": [],
  "AllBidStatuses": [],
  "AllCategoryLockOutDurations": [],
  "AllCountries": [],
  "AllCountryLanguages": [
  {
      "Code": "CHI-CN",
      "Id": "1",
      "IsActive": true,
      "Name": "Chinese Simplified - China",
      "SortOrder": 1
    }
  ],
  "AllIndustries": [
  {
      "Code": "AUTO",
      "Id": "1",
      "IsActive": true,
      "Name": "Automotive",
      "SortOrder": 1
    }
  ],
  "AllProposalTypes": [],
  "AllQuestionClassifications": [],
  "AllSampleTypes": [
  {
      "Code": "Consumer",
      "Id": "100",
      "IsActive": true,
      "Name": "Consumer",
      "SortOrder": 1
    }
  ],
  "AllStudyTypes": [
  {
      "Code": "ADH",
      "Id": "1",
      "IsActive": true,
      "Name": "Adhoc",
      "SortOrder": 1
    }
  ],
  "AllSupplierLinkTypes": [
  {
      "Code": "TS",
      "Id": "1",
      "IsActive": true,
      "Name": "Targeted / Standalone",
      "SortOrder": 1
    }
  ],
  "AllSupplierPreferenceTypes": [],
  "AllSupplierRequestStatuses": [],
  "AllSupplierTrackingUrlTypes": [],
  "AllSurveyPlatforms": [],
  "AllSurveyStatuses": [
  {
      "Code": "02",
      "Id": "1",
      "IsActive": true,
      "Name": "Pending",
      "SortOrder": 1
    }
  ],
  "AllThirdPartyServices": []
  }

Returns a list of global system definitions. Arguments can be passed individually or in aggregate, with arguments separated by a comma. One argument must be provided at minimum.

Arguments

Property Type Required Description
Bundle string true A string of lookup options delimited by a comma.

Options

Option Description
Countries Array of all countries.
CountryLanguages Array of all Country-Language pairs by ID.
Industries Array of all options for industry type.
SampleTypes Array of all types of sample that buyers can field on the platform.
StudyTypes Array of all types of studies buyers can field on the platform.
SupplierLinkTypes Array of all link types suppliers can use to send sample.
SurveyStatuses Array of all possible survey statuses on the platform.
BidProbabilities Array of all probabilities of a bid being awarded (Low, Med, High).
BidStatuses Array of all possible statuses for a bid.
ProposalTypes Array of all possible proposal types.
CategoryLockOutDurations Array of all possible lockout times.
QuestionClassifications Array of all question categories on the platform.
SupplierPreferenceTypes Array of all possible preferences a supplier can communicate.
SupplierRequestStatuses Array of all tracking methods a supplier can use to track a respondent’s status.
ThirdPartyServices Array of all Third Party Services on the platform.

GET List Suppliers

Definition

GET  https://api.samplicio.us/Core/v1/Suppliers/AllWithAccount

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Core/v1/Suppliers/AllWithAccount
require 'net/http'

uri = URI('https://api.samplicio.us/Core/v1/Suppliers/AllWithAccount')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$URL = "https://api.samplicio.us/Core/v1/Suppliers/AllWithAccount",

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Core/v1/Suppliers/AllWithAccount'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Core/v1/Suppliers/AllWithAccount");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "https://api.samplicio.us/Core/v1/Suppliers/AllWithAccount",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetAllSuppliersGroupedByAccount successful."
  ],
  "ResultCount": 4,
  "AccountsWithSuppliers": [
    {
      "AccountName": "Sample Company",
      "Suppliers": [
        {
          "Name": "Supplier 1",
          "Code": "1010"
        },
        {
          "Name": "Supplier 2",
          "Code": "1010"
        },
        {
          "Name": "Supplier 3",
          "Code": "1010"
        },
        {
          "Name": "Supplier 4",
          "Code": "1010"
        },
      ]
    }
  ]
}

Returns a list of all suppliers.

GET List Business Units

Definition

GET  https://api.samplicio.us/Core/v1/BusinessUnits/All

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Core/v1/BusinessUnits/All
require 'net/http'

uri = URI('https://api.samplicio.us/Core/v1/BusinessUnits/All')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php

$URL = "https://api.samplicio.us/Core/v1/BusinessUnits/All";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Core/v1/BusinessUnits/All'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Core/v1/BusinessUnits/All");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Core/v1/BusinessUnits/All",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

 {
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetAllBusinessUnits successful."
  ],
  "ResultCount": 1,
  "BusinessUnits": [
    {
      "AccountID": 001,
      "Id": "001",
      "Name": "Fulcrum"
    },
  ]
}

Returns a list of all Business Units.

Question Library

The questions in this library can be used to build qualifications for surveys created in the Cint Marketplace. Each question represents a respondent profile datapoint.

GET List Standard Questions

Definition

GET  https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestions/{CountryLanguageID}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestions/{CountryLanguageID}
require 'net/http'

uri = URI('https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestions/{CountryLanguageID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$URL = "https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestions/{CountryLanguageID}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestions/{CountryLanguageID}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestions/{CountryLanguageID}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Lookup/v1/QuestionLibrary/AllQuestions/{CountryLanguageID}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetAllQuestions successful."
  ],
  "ResultCount": 1,
  "Questions": [
    {
      "IsCoreDemographic": true,
      "IsFeasibilityFactor": true,
      "LK_QuestionClassificationID": 8,
      "Name": "AGE",
      "QuestionID": 42,
      "QuestionText": "What is your age?",
      "QuestionType": "Numeric - Open-end",
      "SurveyUse": 8162
    }
  ]
}    

Returns a list of all standard questions and question texts for the specified Country-Language pair.

Arguments

Property Type Required Description
CountryLanguageID int true Unique id associated with the Country-Language pair the question text applies to.

GET List Custom Questions

Definition

GET  https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllCustomQuestionsByAccount/{CountryLanguageID}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllCustomQuestionsByAccount/{CountryLanguageID}
require 'net/http'

uri = URI('https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllCustomQuestionsByAccount/{CountryLanguageID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$URL = "https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllCustomQuestionsByAccount/{CountryLanguageID}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllCustomQuestionsByAccount/{CountryLanguageID}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllCustomQuestionsByAccount/{CountryLanguageID}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Lookup/v1/QuestionLibrary/AllCustomQuestionsByAccount/{CountryLanguageID}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetAllQuestions successful."
  ],
  "ResultCount": 1,
  "Questions": [
    {
      "__type": "PublicQuestionModel",
      "IsCoreDemographic": false,
      "IsFeasibilityFactor": false,
      "LK_QuestionClassificationID": null,
      "Name": "HHI",
      "QuestionID": 51,
      "QuestionText": "What is your annual household income before taxes?",
      "QuestionType": "Single Punch",
      "SurveyUse": 2,
      "AccountID": 1
    }
  ]
}    

Returns a list of custom questions associated with and created by your account for the specified Country-Language pair.

Arguments

Property Type Required Description
CountryLanguageID int true Unique id associated with the Country-Language pair the question text applies to.

GET Show Question Text

Definition

GET  https://api.samplicio.us/Lookup/v1/QuestionLibrary/QuestionById/{CountryLanguageID}/{QuestionID}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Lookup/v1/QuestionLibrary/QuestionById/{CountryLanguageID}/{QuestionID}
require 'net/http'

uri = URI('https://api.samplicio.us/Lookup/v1/QuestionLibrary/QuestionById/{CountryLanguageID}/{QuestionID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Lookup/v1/QuestionLibrary/QuestionById/{CountryLanguageID}/{QuestionID}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Lookup/v1/QuestionLibrary/QuestionById/{CountryLanguageID}/{QuestionID}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Lookup/v1/QuestionLibrary/QuestionById/{CountryLanguageID}/{QuestionID}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Lookup/v1/QuestionLibrary/QuestionById/{CountryLanguageID}/{QuestionID}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetQuestionById successful."
  ],
  "ResultCount": 1,
  "Question": {
    "IsCoreDemographic": true,
    "IsFeasibilityFactor": true,
    "LK_QuestionClassificationID": 8,
    "Name": "AGE",
    "QuestionID": 42,
    "QuestionText": "What is your age?",
    "QuestionType": "Numeric - Open-end",
    "SurveyUse": 8420
  }
}

Returns the details of a specific standard or custom qualification.

Arguments

Property Type Required Description
CountryLanguageID int true Unique id associated with the Country-Language pair the question text applies to.
QuestionID int true Unique id associated with the question the question text applies to.

GET Show Question Options

Definition

GET  https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestionOptions/{CountryLanguageID}/{QuestionID}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestionOptions/{CountryLanguageID}/{QuestionID}
require 'net/http'

uri = URI('https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestionOptions/{CountryLanguageID}/{QuestionID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response= http.request(request)  
<?php

$URL = "https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestionOptions/{CountryLanguageID}/{QuestionID}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestionOptions/{CountryLanguageID}/{QuestionID}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Lookup/v1/QuestionLibrary/AllQuestionOptions/{CountryLanguageID}/{QuestionID}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Lookup/v1/QuestionLibrary/AllQuestionOptions/{CountryLanguageID}/{QuestionID}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetAllQuestionOptions successful."
  ],
  "ResultCount": 1,
  "QuestionOptions": [
    {
      "OptionText": "Male",
      "ParentItemText": null,
      "Precode": "1",
      "QuestionID": 43
    },
    {
      "OptionText": "Female",
      "ParentItemText": null,
      "Precode": "2",
      "QuestionID": 43
    }
  ]
}

Returns the answer options and associated precodes for a specific QuestionID and Country-Language pair.

Arguments

Property Type Required Description
CountryLanguageID int true Unique id associated with the Country-Language pair the question text applies to.
QuestionId int true Unique id associated with the question the question text applies to.

Beta - Lookup

Dictionary (beta)

These resources support our beta endpoints, including Beta - Demand Integration and Beta - On Time Supply sections. They provide data about the values you can use in the fields of models used in beta endpoints.

We recommend caching the endpoints below as they will rarely change.

Definition

GET  https://api.samplicio.us/demand/v2-beta/{property}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" "https://api.samplicio.us/demand/v2-beta/locales?page_size=3&page_number=23"
require 'net/http'

uri = URI("https://api.samplicio.us/demand/v2-beta/locales?page_size=3&page_number=23")

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = "YOUR_API_KEY_HERE"

response = http.request(request)
<?php
$URL = "https://api.samplicio.us/demand/v2-beta/locales?page_size=3&page_number=23";

$aHTTP['http']['method'] = 'GET';

$aHTTP['http']['header'] = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = "https://api.samplicio.us/demand/v2-beta/locales?page_size=3&page_number=23"

headers = {'Authorization' : 'YOUR_API_KEY_HERE'}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/demand/v2-beta/locales?page_size=3&page_number=23");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
    "method": "GET",
    "hostname": "api.samplicio.us",
    "path": "/demand/v2-beta/locales?page_size=3&page_number=23",
    "headers": {'Authorization': 'YOUR_API_KEY_HERE'}
};

var request = https.request(options, function (response) {
    var chunks = [];

    response.on("data", function (chunk) {
        chunks.push(chunk);
        });

});

request.end();

Example Response

{
    "result": [
        {
            "code": "fre_ma",
            "name": "French - Morocco"
        },
        {
            "code": "eng_lu",
            "name": "English - Luxembourg"
        },
        {
            "code": "ger_lu",
            "name": "German - Luxembourg"
        }
    ],
    "total": 263
}

Dictionaries model

Property Description Query Args
business-units Which business unit of an account a survey belongs to, determines currency used by the survey. page_size, page_number
clients The clients that have been created on your account. page_size, page_number
industries The industries that a survey can be associated with. page_size, page_number
locales A Country-Language pair. page_size, page_number
lockouts Blocks respondents during a certain timeframe based on whether they’ve taken a separate survey in the same industry. page_size, page_number
study-types Indicates the survey’s limits and purpose. page_size, page_number
survey-groups A security grouping to control respondents. page_size, page_number
suppliers A list of suppliers with their ids and codes. page_size, page_number
users All of the users on the account. Use the user’s returned id when using this property. If you are updating your users list often, caching this lookup might not be effective. page_size, page_number, query

Errors (beta)

The error messages for the v2-beta endpoints are designed to be both human and machine-readable. An example of an error reponse is listed below.

{
    "errors": [{
        "code": "v07",
        "detail": {
            "field": "expected_incidence_rate",
            "max": 1,
            "min": 0
        },
        "docs_url": "https://developer.lucidhq.com/#v07",
        "message": "This field isn't within the correct range."
    }]
}

Errors model

Property Data Type Description
code string The associated error code.
detail dict Additional info for understanding the error, such as validation information.
docs_url string The URL in the documentation which describes the given error
message string The message associated with the error.

GET List of Possible Errors (beta)

This endpoint returns the list of all possible errors, including a list of what additional properties will be returned in each error’s detail section.

Definition

GET  https://api.samplicio.us/demand/v2-beta/errors

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" "https://api.samplicio.us/demand/v2-beta/errors"
require 'net/http'

uri = URI("https://api.samplicio.us/demand/v2-beta/errors")

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = "YOUR_API_KEY_HERE"

response = http.request(request)
<?php
$URL = "https://api.samplicio.us/demand/v2-beta/errors";

$aHTTP['http']['method'] = 'GET';

$aHTTP['http']['header'] = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = "https://api.samplicio.us/demand/v2-beta/errors"

headers = {'Authorization' : 'YOUR_API_KEY_HERE'}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/demand/v2-beta/errors");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
    "method": "GET",
    "hostname": "api.samplicio.us",
    "path": "/demand/v2-beta/errors",
    "headers": {'Authorization': 'YOUR_API_KEY_HERE'}
};

var request = https.request(options, function (response) {
    var chunks = [];

    response.on("data", function (chunk) {
        chunks.push(chunk);
        });

});

request.end();

Example Response

{
    "result": [
        {
            "detail": ["field"],
            "error_code": "v01",
            "http_status": 400,
            "message": "This field didn't pass validation."
        }
    ]
}

Possible Errors Model

Property Data Type Description
detail string[] The additional information that will be included in the error’s detail object
error_code string The error’s unique identifier
http_status number The HTTP Status code that this error is attached to
message string The human-readable message that is displayed with the error

Possible Errors

a01

HTTP Status: 500
Message: An undefined error occurred.

This error is a catch-all for any errors that do not belong into any of the below categories (yet). We log these errors and will resolve the issue soon.

Server Errors

These errors generally follow the pattern of 500-level HTTP Errors. We log all server errors. If you run into one of these, we will be investigating them to find the problem. If you continually run into an issue, shoot us an email at integrations@cint.com and we will get you more information.

s01

HTTP Status: 500
Message: An unspecified server error occurred.

This occurs when the API runs into an error we did not expect and was unable to handle it properly.

s02

HTTP Status: 500
Message: A server error occurred.

This occurs when the API runs into an error we expected to never happen.

s03, s04, s05, s07

HTTP Status: 500
Message: An upstream server error occurred.

This occurs when one of our internal services was unable to fulfill the request properly.

s06

HTTP Status: 504
Message: An upstream server timed out.

This occurs when one of our internal services takes too long to respond to a request. If this happens, retry the request a few times after backing off for a few seconds before giving up. Many times, these are simply caused by a hiccup in our system that will resolve itself.

Validation Errors

These errors usually occur when one of your inputs is not valid and follow the pattern of 400-level HTTP errors. Thus, with most of these errors, we will return the problematic field in the error body.

v01

HTTP Status: 400
Message: This field didn't pass validation.
Additional Data: field

This is a generic catch-all for validation errors that do not fall into one of the below error types.

v02

HTTP Status: 400
Message: This field must be a multiple of the denominator.
Additional Data: field, denominator

This occurs when a value passed into a numeric field is not a multiple of the returned denominator. For example, a value (numerator) of 0.875 would not be valid if the denominator is 0.1.

v03

HTTP Status: 404
Message: This endpoint doesn't exist.

This occurs when you made a request to a URL that does not exist. Confirm that you do not have any unwanted trailing slashes and that you are passing in numbers to a URL path fragment that expects it (for example: a survey_id should be a number).

v04

HTTP Status: 404
Message: This object doesn't exist.
Additional Data: type, id

This occurs when you try to request an object that does not exist or you reference an object in the body of a request that does not exist.

v05

HTTP Status: 405
Message: This method isn't allowed on this endpoint.

This error occurs when the endpoint you are hitting exists, but the HTTP method (GET/PATCH/DELETE/etc) you used in the request is not accepted on the endpoint. Check that you are using GET to fetch data, PATCH to update objects, or DELETE to remove objects. See individual endpoint documentation for more details.

v06

HTTP Status: 400
Message: This field isn't the correct type.
Additional Data: field, type

This error occurs when you try to pass in an incorrect JSON type (number/string/boolean/array/etc) for a field. The error’s type property will tell you what type the value needs to be.

v07

HTTP Status: 400
Message: This field isn't within the correct range.
Additional Data: field, min, max

For certain numeric fields, there is a restricted acceptable range for values. This error occurs when you input a value that doesn’t fall into that range. Some fields may not have a min or a max - in this case, those properties in the error will be null.

v08

HTTP Status: 400
Message: This field isn't in the correct format.
Additional Data: field, pattern

This error occurs when an input value does not match against a field’s regular expression. For example, the locale field must follow the format xxx_xx, or language code, underscore, and country code. This also occurs when a date is not a valid RFC3339 datetime.

v09

HTTP Status: 400
Message: Must provide this field in this request.
Additional Data: field

This error occurs when you do not pass in a field that is required on a request.

v10

HTTP Status: 400
Message: This field isn't accepted on this request.
Additional Data: field

This error occurs when you pass in a field that is not accepted on this request.

v11

HTTP Status: 400
Message: This field must be one of these options.
Additional Data: field, options

This error occurs when a field’s value must come from a list of specific values. The valid options will be returned in the error’s options property.

v12

HTTP Status: 400
Message: This field cannot be modified after the survey is launched.
Additional Data: field

Certain fields are locked and not modifiable after the survey launches for the first time. This error occurs when you try to modify one of those fields after the survey goes live. If you need to modify one of these values, please create a new survey and try again.

v13

HTTP Status: 400
Message: This field must be set before the survey goes live.
Additional Data: field

Certain fields must be set before setting a survey live via the status or begin_date parameters. This error occurs when one of those fields is still set to null and you try to set the survey live.

v14

HTTP Status: 400
Message: This string has an invalid length.
Additional Data: field, min_length, max_length

This error occurs when a field’s string value is not an acceptable length. This error’s min_length and/or max_length can be null, meaning there is no minimum length or maximum length, respectively.

v15

HTTP Status: 400
Message: The start_date must fall before the end_date.

This error occurs when you pass in a correctly-formatted start_date and/or end_date, but the start_date doesn’t fall before the end_date.

v16

HTTP Status: 400
Message: Content-Type header must be "application/json" and request body must be valid JSON.

This error occurs when your Content-Type HTTP header does not have the value "application/json" or your request is not valid JSON. Note that we only accept JSON bodies on requests that accept a body.

v19

HTTP Status: 400
Message: These fields cannot be modified while Fielding Assistant is enabled. Additional Data: fields, survey_id

This error occurs when Fielding Assistant is enabled on the survey and a change is requested for a field that Fielding Assistant is automating. Apart from the above message, a list of all fields that cannot be modified will be returned in the response.

For example, if Fielding Assistant is automating the CPI of the survey and the API receives a request to change the CPI of the survey, this error will be returned. This error will never be returned if Fielding Assistant is not enabled on the survey.

Supply Integration

On-time Supply - Webhook Security

Supply Services at Cint employ a number of security measures to protect both ourselves and users. While most of this happens behind the scenes, taking full advantage of these security features require those using On Time Supply features to verify message integrity by verifying the signature included in the header of each outbound request. All callback requests are signed with a Cint generated key that is unique to the supplier. The receiving supplier verifies the signature using a public key that is shared to the supplier via the secured GET request to the OTS resource they are securing. This provides security against the manipulation of the data payload. Additionally, a timestamp will be included, which affords additional security against replay attacks.

Request Signatures

To begin the request signing process, one must make an initial ‘subscribe’ request. In turn, they will receive a response body, which contains an encoded public key and key identifier.

From that point onward, messages from Supply Services will undergo KMS signing procedures and will contain the following X-Lucid-Signature header

Header Name Format
X-Lucid-Signature t:<timestamp>,<schema version>:<signing key identifier>:<signature>
Property Description
timestamp The unix timestamp (UTC) for when the signature was generated. This is used to provide protection against replay exploits
schema version The version of the schema used to build the text segment that gets signed using ECDSA_SHA_256
signing key identifier An identifier for the key that was used to generate the signature. This value should match the first 8 characters of the ID returned on subscription creation.
signature The result of the signing operation encoded using SHA256.

The following example demonstrates what a signature header may look like during a key rotation/deprecation event. We see two message signatures both tagged with schema version v1. The first signature, in this case, is for the deprecated key e21612e, and the second signature is signed with the current key 6ffbb59.

X-Lucid-Signature: t:1492774577,v1:e21612e:MEYCIQDXHipmLwxYl18Kkc8WRy6abCr1NJH4wlh1kcCJQ6LT7gIhALXJxiXqRgZVqXIQPMKsSZLWv7B-YpJjzxxj6qLwVvCm,v1:6ffbb59:MEYCIQCavPcHvdbRKNrUcB8CupWEx0s2QufT8nnYj-CbR0avcgIhANWnKbidVe7f2-5Q-8Ukyz3c1cZ0Y8RiRWIXYrOWl-4k

Signature Verification

Step 1: Extract the timestamp and signatures from the header

Split the header, using the , character as the separator, to get a list of elements. Then split each element, using the : character as the separator, to get a prefix, the secret identifier, and signature elements.

Step 2: Construct the Message Digest for the request

The signature string is created by concatenating the following values together before SHA256 summing the result into the Message Digest.

  • timestamp (as a Unix Timestamp in UTC)
  • character .
  • actual JSON payload of the request body

Step 3: Verify the included signature

You can use your chosen programming language’s ECDSA library to verify that your message_digest matches the signature included when verified with your public key.

Examples of this process will be provided. See: https://aws.amazon.com/blogs/security/how-to-verify-aws-kms-asymmetric-key-signatures-locally-with-openssl/

Further Reading

This design was inspired by Stripe’s Webhook signing strategy. You can read more about it at the following locations:

  • https://stripe.com/docs/webhooks/signatures
  • https://docs.aws.amazon.com/kms/latest/APIReference/API_Sign.html
  • https://aws.amazon.com/blogs/security/how-to-verify-aws-kms-asymmetric-key-signatures-locally-with-openssl/
  • https://aws.amazon.com/blogs/security/how-to-verify-aws-kms-signatures-in-decoupled-architectures-at-scale/

On-time Supply - Opportunities

On-time Supply allows you to subscribe to Cint survey opportunities. New opportunities that meet your subscription criteria will be sent to the callback specified in your subscription, along with changes as opportunities you are subscribed to are updated.

In addition to upgraded workflows, you will see Cint’s modern paths and parameters styling. On-time Supply uses snake_case rather than CamelCase you see in existing Supply API endpoints. You can see a translation of the old styling to the new in our FAQ article.

Recontacts in Opportunities

To receive recontact survey opportunities, configured your subscription criteria to include the recontact study_type either by not filtering by study_type or specifically filtering to include recontact study_type. Where buyers want to recontact your respondents, you will begin to see the recontact_pids field populated with your respondents PIDs information for those recontact surveys.

Qualification and Quotas in Opportunities

To receive qualification and quota data include "include_quotas": true in the body of the POST Create Opportunities request.

The On-time Supply collection can be easily imported into Postman by clicking the button below:

Run in Postman

Access our On-Time Supply FAQ article to find answers relating to common On-Time Supply questions.

Opportunities Model

Property Type Description
survey_id int Unique number associated with the survey.
survey_name string External name of the survey. This name may be exposed to respondents. This value is not unique across surveys. Maximum length of 128.
account_name string Name of the buyer running the survey.
country_language string The Country-Language pair the survey is open to.
industry string Industry associated with the survey’s topic.
study_type string Indicates the survey’s format and purpose (i.e. adhoc, recruit, etc).
bid_length_of_interview float Estimated time for a respondent to complete the survey excluding the Marketplace prescreener in minutes as provided by the buyer.
bid_incidence float Estimated incidence rate of the survey as provided by the buyer.
collects_pii boolean true indicates that the survey will collect PII.
survey_group_ids array Unique ID associated with a survey group, if applicable.
is_live boolean true indicates that the survey is live on the Marketplace.
survey_quota_calc_type string Indicates whether quotas are calculated based on completes or prescreens.
is_only_supplier_in_group boolean true indicates that an allocation is reserved for a single supplier.
cpi float Gross payout per complete. This value is in US dollars and is before any applicable commissions or fees.
total_client_entrants int Number of total client survey entrants across all suppliers.
total_remaining int Number of completes still available to the supplier.
completion_percentage float Percentage of total, needed completes that have been achieved on the survey.
conversion float Percentage of respondents who complete the survey after qualifying.
length_of_interview int Median time for a respondent to complete the survey, excluding the Marketplace prescreener, in minutes. This value will be zero until a complete is achieved.
overall_completes int Number of completes already achieved across all suppliers on the survey.
mobile_conversion float Percentage of respondents on a mobile device who complete the survey after qualifying.
earnings_per_click float The Earning Per Click value of the survey. EPC = (CPI * completes) / system entrants
termination_length_of_interview int Median time for a respondent to be termed, in minutes. This value is calculated after six survey entrants and rounded to the nearest whole number. Until six survey entrants are achieved the value will be zero.
respondent_pids array of strings List of calling suppliers PIDs that are valid for the survey if it is configured as a recontact survey. Field intentionally left blank on non-recontact studies or on recontact studies that the supply has no matching PIDs for.
message_reason string Describes the status of the survey in the supplier’s OTS subscription. See Support Article for additional information.

survey_quotas model

Property Type Description
survey_quota_id int Unique number associated with the quota.
survey_quota_type string Represents the function of the quota. The Total quota represents the maximum number of completes available on the survey and will always be present. Client quotas are any subquotas on the survey. They are independent of the total quota and may be overlapping with one another.
quota_cpi float CPI gross payout set for that quota complete. This value is in US dollars and is before any applicable commissions or fees.
conversion float Percentage of respondents who complete the survey after qualifying for that quota. This value is calculated after one complete and rounded to the nearest whole number.
number_of_respondents int Number of completes available in that quota group.
questions array Contains an array of Question models.

survey_qualifications model

Property Type Description
questions array Contains an array of Questions models.

questions model

Property Type Description
question_id int Unique number associated with the question.
logical_operator string Defines the logical operation applied to the conditions.
precodes array Qualification answer option identifier.

POST Create Opportunities Subscription

Definition

POST  https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}

Example Request

curl -H "Content-Type: application/json" \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -X POST --data '{
  "callback": "https://wwww.callback.com/url",
  "include_quotas": true,
  "payload_max_size_mb":9,
  "payload_max_survey_count":1000,
  "send_interval_seconds":10,
  "opportunities": [{
    "country_language": {"in": ["eng_us", "eng_gb"]},
    "study_type": {"eq": "adhoc"},
    "cpi": {"gte": 1}

  }]
}' \
  https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}

require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Post.new(uri, initheader = {'Content-Type' =>'application/json'})

request.body = {
  callback: "https://wwww.callback.com/url",
  include_quotas: true,
  opportunities: [{
    country_language: {"in": ["eng_us", "eng_gb"]}},
    study_type: {"eq": "adhoc"},
    cpi: {"gte": 1}
    ]}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)

puts response.body
<?php
$curl = curl_init();

$params = '{"callback": "https://wwww.callback.com/url",
"include_quotas": true,
"opportunities": [{
  "country_language": {"in": ["eng_us", "eng_gb"]},
  "study_type": {"eq": "adhoc"},
  "cpi": {"gte": 1}

}]}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

echo $response;

curl_close($curl);

?>
import requests, json

url = 'https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}'

params = {'callback': 'https://wwww.callback.com/url',
'include_quotas': true,
'opportunities': [{
  'country_language': {'in': ['eng_us', 'eng_gb']},
  'study_type': {'eq': 'adhoc'},
  'cpi': {'gte': 1},}]}

data = json.dumps(params)

headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}");

string args = @"{
  ""callback"": ""https://wwww.callback.com/url"",
  ""include_quotas"": true,
  ""opportunities"": [{
    ""country_language"": {""in"": [""eng_us"", ""eng_gb""]},
    ""study_type"": {""eq"": ""adhoc""},
    ""cpi"": {""gte"": 1}
  }]
}";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/supply/opportunities/v1/subscriptions/{supplier_code}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'}
};

var json = { callback: 'https://wwww.callback.com/url',
     include_quotas: true,
     opportunities:
      [ { country_language: { in: [ "eng_us", "eng_gb", "fre_fr" ] },
          study_type: { "eq": "adhoc" },
          cpi: { gte: 1 }, } ] };

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

"OK"

    {
      "survey_id": 12345678,
      "survey_name": "My Great Survey",
      "account_name": "Sample_Account",
      "country_language": "eng_us",
      "industry": "other",
      "study_type": "adhoc",
      "bid_length_of_interview": 5,
      "bid_incidence": 50,
      "collects_pii": false,
      "survey_group_ids": [1258951],
      "is_live": true,
      "survey_quota_calc_type": "completes",
      "is_only_supplier_in_group": true,
      "cpi": 1.35,
      "total_client_entrants": 480,
      "total_remaining": 46,
      "completion_percentage": 0.15824915,
      "conversion": 0.39166668,
      "overall_completes": 188,
      "mobile_conversion": 0.28,
      "earnings_per_click": 0.35,
      "length_of_interview": 3,
      "termination_length_of_interview": 2,
      "respondent_pids": [],
      "message_reason": "new",
      "survey_quotas": [
        {
          "survey_quota_id": 80544313,
          "survey_quota_type": "Total",
          "quota_cpi": 1.5,
          "conversion": 0.39166668,
          "number_of_respondents": 46,
          "questions": null
        },
        {
          "survey_quota_id": 80544314,
          "survey_quota_type": "Client",
          "quota_cpi": 1.5,
          "conversion": 0.4329897,
          "number_of_respondents": 30,
          "questions": [
            {
              "precodes": [
                "25",
                "26",
                "27",
                "28",
                "29"
              ],
              "logical_operator": "OR",
              "question_id": 42
            }
          ]
        },
        {
          "survey_quota_id": 80544315,
          "survey_quota_type": "Client",
          "quota_cpi": 1.5,
          "conversion": 0.39166668,
          "number_of_respondents": 2,
          "questions": [
            {
              "precodes": [
                "2"
              ],
              "logical_operator": "OR",
              "question_id": 43
            }
          ]
          },
        {
          "survey_quota_id": 80544316,
          "survey_quota_type": "Client",
          "quota_cpi": 1.5,
          "conversion": 0.3909091,
          "number_of_respondents": 44,
          "questions": [
            {
              "precodes": [
                "8",
                "9"
              ],
              "logical_operator": "OR",
              "question_id": 61076           
            }
          ]
        }
      ],
      "survey_qualifications": [
        {
          "logical_operator": "OR",
          "precodes": [
            "25",
            "26",
            "27",
            "28",
            "29"           
          ],
          "question_id": 42
        },
        {
          "logical_operator": "OR",
          "precodes": [
            "2"
          ],
          "question_id": 43
        },
        {
          "logical_operator": "OR",
          "precodes": [
            "8",
            "9"
          ],
          "question_id": 61076
        }
      ]
    }

Post a new subscription or replace an existing subscription. This endpoint returns 200 on success. The Opportunities model will be returned to your callback url every 15 seconds* for any new or updated survey opportunity that matches the criteria specified in your subscription. You will receive messages about any surveys that are set live or changed after your subscription has been created. You may have one subscription per Supplier Code. This endpoint will return Webhook Security fields to use to validate OTS callbacks.

*You can adjust how frequently you receive survey data, the size of the payload and the number of surveys in the callback message. Please refer to the Arguments section on how to create these filters.

Arguments

Property Data Type Required Description Limits
callback string true The callback url that survey opportunities, both new and updates, will be sent to. -
include_quotas boolean false true opts you in to receive qualification and quota data.
payload_max_size_mb int false The maximum amount of data sent via callback per call. Measured in MB. If not included, this defaults to 8. 4<x<32
payload_max_survey_count int false The maximum number of surveys sent via callback per call. If not included, this defaults to 1000. 1000<x<10000
send_interval_seconds int false The minimum batch time for survey changes to gather before being sent in a callback. This is in seconds. If not included, this defaults to 15. 5 < x < 30
opportunities array true Array of arguments, specified to filter opportunities delivered to callback. -
country_language #CompareStr true The Country-Language pair the survey is open to. #locales
industry #CompareStr false Industry associated with the survey’s topic. #industries
study_type #CompareStr false Indicates the survey’s format and purpose (i.e. adhoc, recruit, etc). #study-types
bid_length_of_interview #CompareFloat false Estimated time for a respondent to complete the survey excluding the Marketplace prescreener in minutes as provided by the buyer. 0<=
bid_incidence #CompareFloat false Estimated incidence rate of the survey as provided by the buyer. 0-100
collects_pii #CompareBool false true indicates that the survey will collect PII. -
cpi #CompareFloat false Gross payout per complete. This value is before any applicable commissions or fees. 0.0<=
conversion #CompareFloat false Percentage of respondents who complete the survey after qualifying. 0.0-1.0
mobile_conversion #CompareFloat false Percentage of respondents on a mobile device who complete the survey after qualifying. 0.0-1.0
earnings_per_click #CompareFloat false The Earning Per Click value of the survey. EPC = (CPI * completes) / system entrants 0.0<=
length_of_interview #CompareInt false Median time for a respondent to complete the survey, excluding the Marketplace prescreener, in minutes. 0<=
termination_length_of_interview #CompareInt false Median time for a respondent to be termed, in minutes. 0<=

Compare Objects

CompareStr
Object Description
eq “string”
ne “string”
in [“string”, “string”]
nin [“string”, “string”]

CompareInt, CompareFloat
Object Description
eq num
ne num
in [num, num]
nin [num, num]
gte num
lte num

CompareBool
Object Description
eq bool

CompareIntArray
Object Description
in [num, num]
nin [num, num]

DELETE Remove an Opportunity Subscription

Definition

DELETE  https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" -X DELETE https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}
require 'net/http'

uri = URI('https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Delete.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
));

curl_exec($curl);
curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.delete(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

request.Method = "DELETE";

request.GetResponse();
const https = require('https');

var options = {
  "method": "DELETE",
  "hostname": "api.samplicio.us",
  "port": 443,
  "path": "/supply/opportunities/v1/subscriptions/{supplier_code}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options);

request.end();

Example Response

"OK"

Remove an existing subscription. This endpoint returns 200 on success. This call will stop all opportunities from being sent to the callback url in your subscription.

GET Show an Opportunity Subscription

Definition

GET  https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}?surveys=true

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" -X GET https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}?surveys=true
require 'net/http'

uri = URI('https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}?surveys=true')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}?surveys=true",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
));

curl_exec($curl);
curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}?surveys=true'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/supply/opportunities/v1/subscriptions/{supplier_code}?surveys=true");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

request.Method = "GET";

request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "port": 443,
  "path": "/supply/opportunities/v1/subscriptions/{supplier_code}?surveys=true",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options);

request.end();

Example Response

"OK"

  {
      "callback": "https://wwww.callback.com/url",
      "include_quotas": true,
      "opportunities": [
          {
              "cpi": {
                  "gte": 1
              },
              "country_language": {
                  "in": [
                      "eng_us",
                      "eng_gb"
                  ]
              },
              "study_type": {
                  "eq": "adhoc"
              },
          }
      ],
      "name": "{supplier_code}",
      "surveys": [
        {
            "survey_id": 123456,
            "survey_name": "Example Survey",
            "survey_lastSend": "2019-08-26T08:56:53.578330598Z"
        },
        {
            "survey_id": 234567,
            "survey_name": "Another Example Survey",
            "survey_lastSend": "2019-08-27T19:14:12.578167806Z"
        }
      ]
  }

Show an existing subscription. This endpoint returns 200 on success. This call will return the current subscription, if one exists for the supplier. This endpoint will return Webhook Security fields to use to validate OTS callbacks.

Arguments

Property Data Type Required Description Limits
surveys boolean false When true, a list of surveys currently active on the existing subscription will be returned in the response body. -

On-time Supply - Respondent Outcomes

The Outcomes resource contains information about a respondent’s session as they move through the Marketplace. You may have one subscription per Supplier Code. Through optional filtering of your subscription, you can limit messages to specified response codes. Detailed information about Marketplace and Client response statuses can be found on the Cint Support Site: Marketplace Response Codes and Client Response Codes. See our FAQ article for additional example subscriptions.

Respondent Model

Property Type Description
respondent_id string Unique session ID per study per respondent.
parent_session_id string Parent session ID.
panelist_id string A supplier’s unique respondent identifier.
session_id string Secondary panelist ID. Also known as MID.
marketplace_status int Response code associated with the respondent’s Marketplace session.
client_status int Response code associated with the respondent’s client survey attempt.
entry_date datetime Date and time the respondent entered Marketplace.
last_date datetime Date and time the respondent last interacted with the session.
survey_id int Unique number associated with the survey.
cpi float Gross payout per complete. This value is before any applicable commissions or fees.
study_type string The type of study associated with the respondent’s session.

POST Create Outcomes Subscription

Definition

POST  https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}

Example Request

curl -H "Content-Type: application/json" \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -X POST --data '{
  "callback": "https://wwww.callback.com/url",
  "outcomes": [{
    "marketplace_status": {"eq": 3},
    "client_status": {"in": [11, 26, 28]}
  }]
}' \
  https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}

require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Post.new(uri, initheader = {'Content-Type' =>'application/json'})

request.body = {
  callback: "https://wwww.callback.com/url",
  outcomes: [{
    marketplace_status: {"eq": 3},
    client_status: {"in": [11, 26, 28]}
    ]}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)

puts response.body
<?php
$curl = curl_init();

$params = '{"callback": "https://wwww.callback.com/url",
"outcomes": [{
  "marketplace_status": {"eq": 3},
  "client_status": {"in": [11, 26, 28]}
}]}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

echo $response;

curl_close($curl);

?>
import requests, json

url = 'https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}'

params = {'callback': 'https://wwww.callback.com/url',
'outcomes': [{
  'marketplace_status': {'eq': 3},
  'client_status': {'in': [11, 26, 28]},}]}

data = json.dumps(params)

headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}");

string args = @"{
  ""callback"": ""https://wwww.callback.com/url"",
  ""outcomes"": [{
    ""marketplace_status"": {""eq"": 3},
    ""client_status"": {""in"": [11, 26, 28]}
  }]
}";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/supply/respondent-outcomes/v1/subscriptions/{supplier-code}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'}
};

var json = { callback: 'https://wwww.callback.com/url',
     outcomes:
      [ { marketplace_status: { "eq": 3 ] },
          client_status: { "in": [ 11, 26, 28 ] }, } ] };

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

"OK"

    {
        "respondent_id": "XXXXX-XXXX",
        "parent_session_id": "XXXXX-XXXX",
        "panelist_id": "XXXXX-XXXX",
        "session_id": "XXXXX-XXXX",
        "marketplace_status": 3,
        "client_status": 11,
        "entry_date": "2019-09-18T19:29:18.119Z",
        "last_date": "2019-09-18T19:29:18.119Z",
        "survey_id": 100001,
        "cpi": 1.25,
        "study_type": "adhoc" 
    }

Post a new subscription or replace an existing subscription. This endpoint returns 200 on success. The Respondent model will be returned to your callback url every 15 seconds for any status that matches the criteria specified in your subscription. You will receive messages about any new sessions or updates after your subscription has been created. You may have one subscription per Supplier Code. This endpoint will return Webhook Security fields to use to validate OTS callbacks.

Callback & supplier_code are required parameters for this call. There must be at least one argument in the array of outcomes.

Arguments

Property Data Type Required Description Limits
callback string true The callback url that respondent outcomes will be sent to. -
outcomes array true Array of arguments, specified to filter respondent outcomes delivered to callback. -
marketplace_status #CompareInt false Response code associated with the respondent’s Marketplace session. Marketplace Response Codes
client_status #CompareInt false Response code associated with the respondent’s client survey attempt. Client Response Codes

CompareInt, CompareFloat
Object Description
eq num
ne num
in [num, num]
nin [num, num]
gte num
lte num

DELETE Remove an Outcome Subscription

Definition

DELETE  https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" -X DELETE https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}
require 'net/http'

uri = URI('https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Delete.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
));

curl_exec($curl);
curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.delete(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

request.Method = "DELETE";

request.GetResponse();
const https = require('https');

var options = {
  "method": "DELETE",
  "hostname": "api.samplicio.us",
  "port": 443,
  "path": "/supply/respondent-outcomes/v1/subscriptions/{supplier-code}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options);

request.end();

Example Response

"OK"

Remove an existing subscription. This endpoint returns 200 on success. This call will stop all respondent outcomes from being sent to the callback url in your subscription.

GET Show an Outcomes Subscription

Definition

GET  https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" -X GET https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}
require 'net/http'

uri = URI('https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php

 $curl = curl_init();

 curl_setopt_array($curl, array(
   CURLOPT_URL => "https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}",
   CURLOPT_RETURNTRANSFER => true,
   CURLOPT_ENCODING => "",
   CURLOPT_HTTPHEADER => array('Authorization: YOUR_API_KEY_HERE'),
   CURLOPT_MAXREDIRS => 10,
   CURLOPT_TIMEOUT => 30,
   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
   CURLOPT_CUSTOMREQUEST => "GET",
   CURLOPT_POSTFIELDS => "",
));

 curl_exec($curl);
 curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/supply/respondent-outcomes/v1/subscriptions/{supplier-code}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

request.Method = "GET";

request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "port": 443,
  "path": "/supply/respondent-outcomes/v1/subscriptions/{supplier-code}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options);

request.end();

Example Response

"OK"
   {
      "callback": "https://wwww.callback.com/url",
      "outcomes": [
          {
              "marketplace_status": {
                  "eq": 3
              },
              "client_status": {
                  "in": [
                      11,
                      26,
                      28
                  ]
              }
          }
      ],
      "name": "{supplier-code}"
  }

Show an existing subscription. This endpoint returns 200 on success. This call will return the current subscription, if one exists for the supplier. This endpoint will return Webhook Security fields to use to validate OTS callbacks.

Survey Groups

The Survey Groups resource will return survey group details for a particular survey number. This information can be used to track survey groups to avoid sending a respondent to a survey which is in a survey group with a survey they have already been sent to.

The Surveys/AllOfferwall and SupplierAllocations/BySurveyNumber calls return a SurveyGroupExists property which will indicate if the survey is in a survey group. The Surveys/SurveyGroups call can then be made to identify and track survey group details. You will need to continue to check the survey number and do not send the same respondent to any survey in that survey group as long as you are sending respondents to the survey and the survey continues to show "SurveyGroupExists": 0.

Survey Groups Model

Property Type Description
SurveyGroup string Name associated with the survey group. Maximum length of 200.
SurveyGroupID int Unique ID associated with a survey group
SurveyGroupSurveys array List of all survey numbers in the survey group

GET List a Survey’s Groups

Definition

GET  https://api.samplicio.us/Supply/v1/Surveys/SurveyGroups/BySurveyNumber/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/SurveyGroups/BySurveyNumber/{SurveyNumber}/{SupplierCode}
require 'net/http'

uri = URI('https://api.samplicio.us/Supply/v1/Surveys/SurveyGroups/BySurveyNumber/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Supply/v1/Surveys/SurveyGroups/BySurveyNumber/{SurveyNumber}/{SupplierCode}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Supply/v1/Surveys/SurveyGroups/BySurveyNumber/{SurveyNumber}/{SupplierCode}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Supply/v1/Surveys/SurveyGroups/BySurveyNumber/{SurveyNumber}/{SupplierCode}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Supply/v1/Surveys/SurveyGroups/BySurveyNumber/{SurveyNumber}/{SupplierCode}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetSurveyGroups successful."
  ],
  "ResultCount": 2,
  "SurveyGroups": [
    {
      "SurveyGroup": "",
      "SurveyGroupID": 12259,
      "SurveyGroupSurveys": [
          590043,
          600432,
          583920,
          601834,
          598282
      ]
    },
    {
      "SurveyGroup": "",
      "SurveyGroupID": 12274,
      "SurveyGroupSurveys": [
          600432,
          601834,
          601943
      ]
    }
  ]
}

Returns information on the survey group used by the specified survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with a supplier account.

Entry Links

The Entry Links resource enables you to create, update, and retrieve survey entry links, specify supplier link and tracking types as well as create custom survey redirects. The entry links can then be used to send a respondent to a particular survey, and attaching important information in a query string, such as the unique panelist ID (PID), unique session ID (MID) or respondent’s profile data. Our generating API entry links article has more detailed information on how to format your entry links.

Property Type Description
SupplierLinkTypeCode string Defines the type of buyer-supplier engagement and the respondent’s path in Cint Marketplace.
TrackingTypeCode string Defines how the Marketplace should communicate back to the supplier’s system at the end of a session. The options are:
NONE (Default and recommended, physically redirects the respondent back to the supplier system)
PIXEL (pixel tracking)
S2S (server to server postback)
DefaultLink string Tracking code or link used if none of the below apply. (Limit 2999 characters)
SuccessLink string Tracking code or link used after a completion. (Limit 2999 characters)
FailureLink string Tracking code or link used after a termination. (Limit 2999 characters)
OverQuotaLink string Tracking code or link used after an overquota. (Limit 2999 characters)
QualityTerminationLink string Tracking code or link used after a quality (security) termination. (Limit 2999 characters)
LiveLink string Live supplier-specific respondent entry link generated by Cint Marketplace.
TestLink string Test supplier-specific respondent entry link generated by Cint Marketplace.
CPI double Gross payout per complete. This value is in US dollars and is before any applicable commissions or fees.

POST Create a Link

Definition

POST  https://api.samplicio.us/Supply/v1/SupplierLinks/Create/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"SupplierLinkTypeCode": "OWS", "TrackingTypeCode": "NONE"}' https://api.samplicio.us/Supply/v1/SupplierLinks/Create/{SurveyNumber}/{SupplierCode}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Supply/v1/SupplierLinks/Create/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Post.new(uri.path, initheader = {'Content-Type' =>'application/json'})

request.body = {SupplierLinkTypeCode:"OWS",TrackingTypeCode:"NONE"}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

supplierLink = http.request(request)
<?php
$curl = curl_init();

$params = '{"SupplierLinkTypeCode": "OWS","TrackingTypeCode": "NONE"}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Supply/v1/SupplierLinks/Create/{SurveyNumber}/{SupplierCode}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Supply/v1/SupplierLinks/Create/{SurveyNumber}/{SupplierCode}'
params = {'SupplierLinkTypeCode':'OWS','TrackingTypeCode':'NONE'}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Supply/v1/SupplierLinks/Create/{SurveyNumber}/{SupplierCode}");

string args = @"{
                  ""SupplierLinkTypeCode"":""OWS"",
                  ""TrackingTypeCode"":""NONE""
                }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "port": 443,
  "path": "/Supply/v1/SupplierLinks/Create/{SurveyNumber}/{SupplierCode}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
    "SupplierLinkTypeCode":"OWS",
    "TrackingTypeCode":"NONE"
};

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: CreateSupplierLinkFromModel successful."
  ],
  "ResultCount": 1,
  "SupplierLink": {
    "SupplierLinkTypeCode": "OWS",
    "TrackingTypeCode": "NONE",
    "DefaultLink": "https:\/\/www.anon.com\/surveys?v=lucid&fs=1&uid=[%MID%]",
    "SuccessLink": "https:\/\/www.anon.com\/surveys?v=lucid&fs=2&uid=[%MID%]&COST=[%COST%]",
    "FailureLink": "https:\/\/www.anon.com\/surveys?v=lucid&fs=1&uid=[%MID%]",
    "OverQuotaLink": "https:\/\/www.anon.com\/surveys?v=lucid&fs=1&uid=[%MID%]",
    "QualityTerminationLink": "https:\/\/www.anon.com\/surveys?v=lucid&fs=1&uid=[%MID%]",
    "LiveLink": "https:\/\/samplicio.us\/s\/default.aspx?SID=52c975a7-15fb-804d-9bf2-3d5d553aa7af&PID=",
    "TestLink": "https:\/ \/samplicio.us\/s\/default.aspx?SID=a948gef7-3591-42c0-ce51-0e4jdf25582f&FIRID=MSDHONI7&SUMSTAT=1&PID=test",
    "CPI": 100
  }
}

Creates your supplier-specific respondent entry link for a survey. If custom redirects are not included in this payload, your default supplier redirects will be used.

Arguments

Property Type Required Description
SupplierLinkTypeCode string true Defines the type of buyer-supplier engagement and the respondent’s path in Cint Marketplace.
TrackingTypeCode string true Defines how the Marketplace should communicate back to the supplier’s system at the end of a session. The options are:
NONE (Default and recommended, physically redirects the respondent back to the supplier system)
PIXEL (pixel tracking)
S2S (server to server postback)
DefaultLink string false Tracking code or link used if none of the below apply. (Limit 2999 characters)
SuccessLink string false Tracking code or link used after a completion. (Limit 2999 characters)
FailureLink string false Tracking code or link used after a termination. (Limit 2999 characters)
OverQuotaLink string false Tracking code or link used after an overquota. (Limit 2999 characters)
QualityTerminationLink string false Tracking code or link used after a quality (security) termination. (Limit 2999 characters)

Definition

PUT  https://api.samplicio.us/Supply/v1/SupplierLinks/Update/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X PUT  --data '{"SupplierLinkTypeCode": "OWS", "TrackingTypeCode": "NONE", "DefaultLink":"","SuccessLink":"","FailureLink":"","OverQuotaLink":"","QualityTerminationLink":""}' https://api.samplicio.us/Supply/v1/SupplierLinks/Update/{SurveyNumber}/{SupplierCode}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Supply/v1/SupplierLinks/Update/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request['Authorization'] = YOUR_API_KEY_HERE

request.body = {SupplierLinkTypeCode:"OWS",TrackingTypeCode:"NONE",DefaultLink:"",SuccessLink:"",FailureLink:"",OverQuotaLink:"",QualityTerminationLink:""}.to_json

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SupplierLinkTypeCode": "OWS","TrackingTypeCode": "NONE","DefaultLink": "","SuccessLink": "","FailureLink": "","OverQuotaLink": "","QualityTerminationLink": ""}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Supply/v1/SupplierLinks/Update/{SurveyNumber}/{SupplierCode}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Supply/v1/SupplierLinks/Update/{SurveyNumber}/{SupplierCode}'
params = {'SupplierLinkTypeCode':'OWS','TrackingTypeCode':'NONE','DefaultLink':'','SuccessLink':'','FailureLink':'','OverQuotaLink':'','QualityTerminationLink':''}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.put(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Supply/v1/SupplierLinks/Update/{SurveyNumber}/{SupplierCode}");

string args = @"{
                  ""SupplierLinkTypeCode"":""OWS"",
                  ""TrackingTypeCode"":""NONE"",
                  ""DefaultLink"":"""",
                  ""SuccessLink"":"""",
                  ""FailureLink"":"""",
                  ""OverQuotaLink"":"""",
                  ""QualityTerminationLink"":""""
                }";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
        {
            streamWriter.Write(args);
            streamWriter.Flush();
            streamWriter.Close();
        }

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "port": 443,
  "path": "/Supply/v1/SupplierLinks/Update/{SurveyNumber}/{SupplierCode}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
    "SupplierLinkTypeCode":"OWS",
    "TrackingTypeCode":"NONE",
    "DefaultLink":"",
    "SuccessLink":"",
    "FailureLink":"",
    "OverQuotaLink": "",
    "QualityTerminationLink":""
};

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: UpdateSupplierLinkFromModel successful."
  ],
  "ResultCount": 1,
  "SupplierLink": {
    "SupplierLinkTypeCode": "OWS",
    "TrackingTypeCode": "NONE",
    "DefaultLink": "",
    "SuccessLink": "",
    "FailureLink": "",
    "OverQuotaLink": "",
    "QualityTerminationLink": "",
    "LiveLink": "https:\/\/samplicio.us\/s\/default.aspx?SID=52c795a7-15fh-454d-9ap2-3d5d803aa7af&PID=",
    "TestLink": "https:\/\/samplicio.us\/s\/default.aspx?SID=a348dif7- 3491-42v0-be51-0e4fdf25582f&FIRID=MSDHQNI7&SUMSTAT=8&PID=test",
    "CPI": 100
  }
}

Update an existing entry link for a study.

Arguments

Property Type Required Description
SupplierLinkTypeCode string true Defines the type of buyer-supplier engagement and the respondent’s path in Cint Marketplace.
TrackingTypeCode string true Defines how Marketplace should communicate back to the supplier’s system at the end of a session. The options are:
NONE (Default and recommended, physically redirects the respondent back to the supplier system)
PIXEL (pixel tracking)
S2S (server to server postback)
DefaultLink string true Tracking code or link used if none of the below apply. (Limit 2999 characters)
SuccessLink string true Tracking code or link used after a completion. (Limit 2999 characters)
FailureLink string true Tracking code or link used after a termination. (Limit 2999 characters)
OverQuotaLink string true Tracking code or link used after an overquota. (Limit 2999 characters)
QualityTerminationLink string true Tracking code or link used after a quality (security) termination. (Limit 2999 characters)

Definition

GET  https://api.samplicio.us/Supply/v1/SupplierLinks/BySurveyNumber/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/SupplierLinks/BySurveyNumber/{SurveyNumber}/{SupplierCode}
require 'net/http'

uri = URI('https://api.samplicio.us/Supply/v1/SupplierLinks/BySurveyNumber/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Supply/v1/SupplierLinks/BySurveyNumber/{SurveyNumber}/{SupplierCode}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Supply/v1/SupplierLinks/BySurveyNumber/{SurveyNumber}/{SupplierCode}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Supply/v1/SupplierLinks/BySurveyNumber/{SurveyNumber}/{SupplierCode}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Supply/v1/SupplierLinks/BySurveyNumber/{SurveyNumber}/{SupplierCode}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetSupplierLinkBySurveyNumberAndSupplierCode successful."
  ],
  "ResultCount": 1,
  "SupplierLink": {
    "SupplierLinkTypeCode": "OWS",
    "TrackingTypeCode": "NONE",
    "DefaultLink": "https:\/\/www.anon.com\/surveys?v=1&fs=1&uid=[%MID%]",
    "SuccessLink": "https:\/\/www.anon.com\/surveys?v=1&fs=2&uid=[%MID%]&COST=[%COST%]",
    "FailureLink": "https:\/\/www.anon.com\/surveys?v=1&fs=1&uid=[%MID%]",
    "OverQuotaLink": "https:\/\/www.anon.com\/surveys?v=1&fs=1&uid=[%MID%]",
    "QualityTerminationLink": "https:\/\/www.anon.com\/surveys?v=1&fs=1&uid=[%MID%]",
    "LiveLink": "https:\/\/samplicio.us\/s\/default.aspx?SID=52c975a7-15fb-804d-9bd2-3d5d553aa7af&PID=",
    "TestLink": "https:\/ \/samplicio.us\/s\/default.aspx?SID=a948gef7-3591-42c0-ce51-0e4xdf25582f&FIRID=MSDHONI7&SUMSTAT=1&PID=test",
    "CPI": 100
  }
}

Returns link details for a survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with supplier account.

Inventory

The inventory allows Suppliers to see a list of Surveys that they have been allocated to or created an entry link. This endpoint is sparser in content than the Allocations and Offerwall endpoints but because of their reduced payload size per Survey, they have no limits on the number of Surveys that can be contained. This endpoint can be used in place of Allocations/All to return full Survey inventories without capacity limits.

SurveyInventory Model

Property Type Description
SupplyAllocationSurveyIDs List of Ints List of Survey IDs for which the Supplier has allocation.

GET List Allocated Surveys

Definition

GET  https://api.samplicio.us/Supply/v1/Surveys/Inventory/{SupplierCode}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/Inventory/{SupplierCode}
require 'net/http'

uri = URI('https://api.samplicio.us/Supply/v1/Surveys/Inventory/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

allocations = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Supply/v1/Surveys/Inventory/{SupplierCode}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>

import requests

url = 'https://api.samplicio.us/Supply/v1/Surveys/Inventory/{SupplierCode}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Supply/v1/Surveys/Inventory/{SupplierCode}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Supply/v1/Surveys/Inventory/{SupplierCode}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "SupplyAllocationSurveyIDs": [
    1, 2, 5, 7, 2323, 543
  ]
}

Returns a list of all live survey opportunities for which you have an allocation or entry link.

Demand Integration

Surveys

The Surveys resource allows the buyer to create new surveys, update existing surveys, and retrieve survey details in Marketplace.

Survey Model

Property Type Description
AccountID int Unique account identifier.
SurveyStatusCode string Code associated with the current status of the survey. See List Global Definitions for a map of survey status codes.
SurveyPriority int An Audience-only variable to track the survey’s priority.
SurveyNumber int Unique number associated with the survey.
SurveyName string External name of the survey. This name may be exposed to respondents. This value is not unique across surveys. Maximum length of 128.
CountryLanguageID int Unique id associated with a Country-Language pair.
IndustryID int Industry associated with the survey’s topic.
StudyTypeID int Indicates the survey’s format and purpose (i.e. adhoc, recruit, etc).
ClientCPI double Revenue per complete used to calculate internal margin or savings.
QuotaCPI double Gross payout per complete. This value is before any applicable commissions or fees. Minimum value is 0.01 for live surveys.
ClientSurveyLiveURL string Link to client survey. Limit of URL length is 3000 characters. Must conform to RFC3987. See Guide for more detail.
TestRedirectURL string Link to client survey for testing purposes. All studies should include a working test link. Limit of URL length is 3000 characters.
IsActive boolean Indicates if a survey is active or inactive in Cint Marketplace database. We recommend keeping all surveys in an active status.
Quota int Total number of completes needed.
FulcrumExchangeAllocation double Percentage of total completes allocated only to Cint Marketplace. Must be between 0 and 100%.
FulcrumExchangeHedgeAccess boolean true gives the Marketplace access to any unallocated completes.
IsVerifyCallBack boolean true enables Verify CallBack security which requires the correct [%RSFN%] variable to be included on the “complete” client callback for verification.
UniquePID boolean true enables PID deduplication on a survey preventing a respondent with the same PID from entering more than once. Recommended on all surveys.
UniqueIPAddress boolean true enables IP deduplication on a survey preventing a respondent with the same IP address from entering more than once. Recommended on all surveys.
IsRelevantID boolean Non-Functional: Cint automatically protects against invalid respondent traffic.
IsDedupe boolean Non-Functional: Cint automatically protects against invalid respondent traffic.
IsGeoIP boolean Non-Functional: Cint automatically protects against invalid respondent traffic.
IsFraudProfile boolean Non-Functional: Cint automatically protects against invalid respondent traffic.
FraudProfileThreshold int Non-Functional: Cint automatically protects against invalid respondent traffic.
IsTrueSample boolean Non-Functional: Cint automatically protects against invalid respondent traffic.
QuotaCalculationTypeID int Sets the quota calculation method. Either 1 for ”Completes” (quotas determined by completes) or 2=”Prescreens” (quotas determined when leaving Cint Marketplace).
SurveyPlatformID int Sets the external platform ID. This should be hardcoded to 1 which represents “none”.
BidLengthOfInterview int Estimated time for a respondent to complete the survey excluding the Marketplace prescreener in minutes as provided by the buyer.
BusinessUnitID int Sets the account business unit.
SampleTypeID int Sets the type of sample the survey is open to (i.e. consumer, business-to-business, etc). See Sample Types
SurveySID string Unique hash value (GUID) associated with the survey.
BidIncidence int Estimated incidence rate for the survey.
CollectsPII boolean true indicates that the survey will collect PII.

POST Create a Survey

Definition

POST  https://api.samplicio.us/Demand/v1/Surveys/Create

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"SurveyStatusCode": "01","SurveyPriority": 11,"SurveyName": "Example API Survey","CountryLanguageID": 9,"IndustryID": 30,"StudyTypeID": 1,"ClientCPI": 1,"QuotaCPI": 2,"ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]","TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]","IsActive": true,"Quota": 1000,"FulcrumExchangeAllocation": 0,"FulcrumExchangeHedgeAccess": true,"IsVerifyCallBack": true,"UniquePID": true,"UniqueIPAddress": true,"IsRelevantID": false,"IsDedupe": false,"IsGeoIP": false,"IsFraudProfile": false,"FraudProfileThreshold": 0,"IsTrueSample": false,"QuotaCalculationTypeID": 1,"SurveyPlatformID": 1,"BidLengthOfInterview": 10,"BusinessUnitID": 9,"SampleTypeID": 100,"BidIncidence": 20,"CollectsPII": null}' https://api.samplicio.us/Demand/v1/Surveys/Create
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/Surveys/Create')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {
    "SurveyStatusCode"=> "01",
    "SurveyPriority"=> 11,
    "SurveyName"=> "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID"=> 30,
    "StudyTypeID"=> 1,
    "ClientCPI"=> 1,
    "QuotaCPI"=> 2,
    "ClientSurveyLiveURL"=> "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL"=> "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive"=> true,
    "Quota"=> 1000,
    "FulcrumExchangeAllocation"=> 0,
    "FulcrumExchangeHedgeAccess"=> true,
    "IsVerifyCallBack"=> true,
    "UniquePID"=> true,
    "UniqueIPAddress"=> true,
    "IsRelevantID"=> false,
    "IsDedupe"=> false,
    "IsGeoIP"=> false,
    "IsFraudProfile"=> false,
    "FraudProfileThreshold"=> 0,
    "IsTrueSample"=> false,
    "QuotaCalculationTypeID"=> 1,
    "SurveyPlatformID"=> 1,
    "BidLengthOfInterview"=> 10,
    "BusinessUnitID"=> 9,
    "SampleTypeID"=> 100,
    "BidIncidence"=> 20,
    "CollectsPII"=> nil
 }.to_json

 request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{
    "SurveyStatusCode": "01",
    "SurveyPriority": 11,
    "SurveyName": "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID": 30,
    "StudyTypeID": 1,
    "ClientCPI": 1,
    "QuotaCPI": 2,
    "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive": true,
    "Quota": 1000,
    "FulcrumExchangeAllocation": 0,
    "FulcrumExchangeHedgeAccess": true,
    "IsVerifyCallBack": true,
    "UniquePID": true,
    "UniqueIPAddress": true,
    "IsRelevantID": false,
    "IsDedupe": false,
    "IsGeoIP": false,
    "IsFraudProfile": false,
    "FraudProfileThreshold": 0,
    "IsTrueSample": false,
    "QuotaCalculationTypeID": 1,
    "SurveyPlatformID": 1,
    "BidLengthOfInterview": 10,
    "BusinessUnitID": 9,
    "SampleTypeID": 100,
    "BidIncidence": 20,
    "CollectsPII": null
 }';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/Surveys/Create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/Surveys/Create'
params = {
    "SurveyStatusCode": "01",
    "SurveyPriority": 11,
    "SurveyName": "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID": 30,
    "StudyTypeID": 1,
    "ClientCPI": 1,
    "QuotaCPI": 2,
    "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive": True,
    "Quota": 1000,
    "FulcrumExchangeAllocation": 0,
    "FulcrumExchangeHedgeAccess": True,
    "IsVerifyCallBack": True,
    "UniquePID": True,
    "UniqueIPAddress": True,
    "IsRelevantID": False,
    "IsDedupe": False,
    "IsGeoIP": False,
    "IsFraudProfile": False,
    "FraudProfileThreshold": 0,
    "IsTrueSample": False,
    "QuotaCalculationTypeID": 1,
    "SurveyPlatformID": 1,
    "BidLengthOfInterview": 10,
    "BusinessUnitID": 9,
    "SampleTypeID": 100,
    "BidIncidence": 20,
    "CollectsPII": None
 }
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/Surveys/Create");

string args = @"{
                    ""SurveyStatusCode"": ""01"",
                    ""SurveyPriority"": 11,
                    ""SurveyName"": ""Example API Survey"",
                    ""CountryLanguageID"": 9,
                    ""IndustryID"": 30,
                    ""StudyTypeID"": 1,
                    ""ClientCPI"": 1,
                    ""QuotaCPI"": 2,
                    ""ClientSurveyLiveURL"": ""https://www.surveyURL.com?rid=[%RID%]"",
                    ""TestRedirectURL"": ""https://www.surveyURL.com?rid=[%RID%]"",
                    ""IsActive"": true,
                    ""Quota"": 1000,
                    ""FulcrumExchangeAllocation"": 0,
                    ""FulcrumExchangeHedgeAccess"": true,
                    ""IsVerifyCallBack"": true,
                    ""UniquePID"": true,
                    ""UniqueIPAddress"": true,
                    ""IsRelevantID"": false,
                    ""IsDedupe"": false,
                    ""IsGeoIP"": false,
                    ""IsFraudProfile"": false,
                    ""FraudProfileThreshold"": 0,
                    ""IsTrueSample"": false,
                    ""QuotaCalculationTypeID"": 1,
                    ""SurveyPlatformID"": 1,
                    ""BidLengthOfInterview"": 10,
                    ""BusinessUnitID"": 9,
                    ""SampleTypeID"": 100,
                    ""BidIncidence"": 20,
                    ""CollectsPII"": null
                }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/Surveys/Create",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
    "SurveyStatusCode": "01",
    "SurveyPriority": 11,
    "SurveyName": "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID": 30,
    "StudyTypeID": 1,
    "ClientCPI": 1,
    "QuotaCPI": 2,
    "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive": true,
    "Quota": 1000,
    "FulcrumExchangeAllocation": 0,
    "FulcrumExchangeHedgeAccess": true,
    "IsVerifyCallBack": true,
    "UniquePID": true,
    "UniqueIPAddress": true,
    "IsRelevantID": false,
    "IsDedupe": false,
    "IsGeoIP": false,
    "IsFraudProfile": false,
    "FraudProfileThreshold": 0,
    "IsTrueSample": false,
    "QuotaCalculationTypeID": 1,
    "SurveyPlatformID": 1,
    "BidLengthOfInterview": 10,
    "BusinessUnitID": 9,
    "SampleTypeID": 100,
    "BidIncidence": 20,
    "CollectsPII": null
 };

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: CreateSurveyFromModel successful."
  ],
  "ResultCount": 1,
  "Survey": {
    "AccountID": 1,
    "SurveyStatusCode": "01",
    "SurveyPriority": 11,
    "SurveyNumber": 12345,
    "SurveyName": "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID": 30,
    "StudyTypeID": 1,
    "ClientCPI": 1,
    "QuotaCPI": 2,
    "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive": true,
    "Quota": 1000,
    "FulcrumExchangeAllocation": 0,
    "FulcrumExchangeHedgeAccess": true,
    "IsVerifyCallBack": true,
    "UniquePID": true,
    "UniqueIPAddress": true,
    "IsRelevantID": false,
    "IsDedupe": false,
    "IsGeoIP": false,
    "IsFraudProfile": false,
    "FraudProfileThreshold": 0,
    "IsTrueSample": false,
    "QuotaCalculationTypeID": 1,
    "SurveyPlatformID": 1,
    "BidLengthOfInterview": 10,
    "BusinessUnitID": 9,
    "SampleTypeID": 100,
    "SurveySID": "E75CDFE2-7221-4FAC-8561-78EE1B1D6ECF",
    "BidIncidence": 20,
    "CollectsPII": null
  }
}

Creates a Marketplace survey.

Arguments

Property Type Required Description
AccountID int false Unique account identifier.
SurveyStatusCode string true Code associated with the current status of the survey. See List Global Definitions for a map of survey status codes.
SurveyPriority int false Survey priority from 1-11 (1 being the highest). Priority only applies to routed sample.
SurveyName string true External name of the survey. This name may be exposed to respondents. This value is not unique across surveys. Maximum 128 characters.
CountryLanguageID int true Unique id associated with a Country-Language pair.
IndustryID int false Industry associated with the survey’s topic.
StudyTypeID int false Indicates the survey’s format and purpose (i.e. adhoc, recruit, etc).
ClientCPI double false Revenue per complete used to calculate internal margin or savings.
QuotaCPI double false Gross payout per complete. This value is before any applicable commissions or fees. Minimum value is 0.01 for live surveys.
ClientSurveyLiveURL string true Link to client survey. Limit of URL length is 3000 characters. Must conform to RFC3987. See Guide for more detail.
TestRedirectURL string false Link to client survey for testing purposes. All studies should include a working test link. Limit of URL length is 3000 characters.
IsActive boolean false Indicates if a survey is active or inactive in Cint Marketplace. We recommend keeping any surveys that have prescreens or completes in active status.
Quota int false Total number of completes needed.
FulcrumExchangeAllocation double false Percentage of total completes allocated only to Cint Marketplace. Must be between 0 and 100%.
FulcrumExchangeHedgeAccess boolean false true gives the Marketplace access to any unallocated completes.
IsVerifyCallBack boolean false true enables Verify CallBack security which requires the correct [%RSFN%] variable to be included on the “complete” client callback for verification.
UniquePID boolean false true enables PID deduplication on a survey preventing a respondent with the same PID from entering more than once. Recommended on all surveys.
UniqueIPAddress boolean false true enables IP deduplication on a survey preventing a respondent with the same IP address from entering more than once. Recommended on all surveys.
IsRelevantID boolean false Non-Functional: Cint automatically protects against invalid respondent traffic.
IsDedupe boolean false Non-Functional: Cint automatically protects against invalid respondent traffic.
IsGeoIP boolean false Non-Functional: Cint automatically protects against invalid respondent traffic.
IsFraudProfile boolean false Non-Functional: Cint automatically protects against invalid respondent traffic.
FraudProfileThreshold int false Non-Functional: Cint automatically protects against invalid respondent traffic.
IsTrueSample boolean false Non-Functional: Cint automatically protects against invalid respondent traffic.
QuotaCalculationTypeID int false Sets the quota calculation method. Either 1 for ”Completes” (quotas determined by completes) or 2=”Prescreens” (quotas determined when leaving Cint Marketplace).
SurveyPlatformID int false Sets the external platform ID. This should be hardcoded to 1 which represents “none”.
BidLengthOfInterview int false Estimated time for a respondent to complete the survey excluding the Marketplace prescreener in minutes as provided by the buyer.
BusinessUnitID int false Sets the account business unit.
SampleTypeID int false Sets the type of sample the survey is open to (i.e. consumer, business-to-business, etc). See Sample Types.
BidIncidence int false Estimated incidence rate for the survey.
CollectsPII boolean false true indicates that the survey will collect PII.

PUT Update a Survey

Definition

PUT  https://api.samplicio.us/Demand/v1/Surveys/Update/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X PUT --data '{"AccountID": 1,"SurveyStatusCode": "01","SurveyPriority": 11,"SurveyNumber": 12345,"SurveyName": "Example API Survey","CountryLanguageID": 9,"IndustryID": 30,"StudyTypeID": 1,"ClientCPI": 1,"QuotaCPI": 2,"ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]","TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]","IsActive": true,"Quota": 100,"FulcrumExchangeAllocation": 0,"FulcrumExchangeHedgeAccess": true,"IsVerifyCallBack": true,"UniquePID": true,"UniqueIPAddress": true,"IsRelevantID": false,"IsDedupe": false,"IsGeoIP": false,"IsFraudProfile": false,"FraudProfileThreshold": 0,"IsTrueSample": false,"QuotaCalculationTypeID": 1,"SurveyPlatformID": 1,"BidLengthOfInterview": 10,"BusinessUnitID": 9,"SampleTypeID": 100,"CollectsPII": null}' https://api.samplicio.us/Demand/v1/Surveys/Update/{SurveyNumber}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/Surveys/Update/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {
    AccountID: 1,
    SurveyStatusCode: "01",
    SurveyPriority: 11,
    SurveyNumber: 12345,
    SurveyName: "Example API Survey",
    CountryLanguageID: 9,
    IndustryID: 30,
    StudyTypeID: 1,
    ClientCPI: 1,
    QuotaCPI: 2,
    ClientSurveyLiveURL: "https://www.surveyURL.com?rid=[%RID%]",
    TestRedirectURL: "https://www.surveyURL.com?rid=[%RID%]",
    IsActive: true,
    Quota: 100,
    FulcrumExchangeAllocation: 0,
    FulcrumExchangeHedgeAccess: true,
    IsVerifyCallBack: true,
    UniquePID: true,
    UniqueIPAddress: true,
    IsRelevantID: false,
    IsDedupe: false,
    IsGeoIP: false,
    IsFraudProfile: false,
    FraudProfileThreshold: 0,
    IsTrueSample: false,
    QuotaCalculationTypeID: 1,
    SurveyPlatformID: 1,
    BidLengthOfInterview: 10,
    BusinessUnitID: 9,
    SampleTypeID: 100,
    BidIncidence: 20,
    CollectsPII: nil
 }.to_json

 request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{
    "AccountID": 1,
    "SurveyStatusCode": "01",
    "SurveyPriority": 11,
    "SurveyNumber": 12345,
    "SurveyName": "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID": 30,
    "StudyTypeID": 1,
    "ClientCPI": 1,
    "QuotaCPI": 2,
    "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive": true,
    "Quota": 100,
    "FulcrumExchangeAllocation": 0,
    "FulcrumExchangeHedgeAccess": true,
    "IsVerifyCallBack": true,
    "UniquePID": true,
    "UniqueIPAddress": true,
    "IsRelevantID": false,
    "IsDedupe": false,
    "IsGeoIP": false,
    "IsFraudProfile": false,
    "FraudProfileThreshold": 0,
    "IsTrueSample": false,
    "QuotaCalculationTypeID": 1,
    "SurveyPlatformID": 1,
    "BidLengthOfInterview": 10,
    "BusinessUnitID": 9,
    "SampleTypeID": 100,
    "BidIncidence": 20,
    "CollectsPII": null
 }';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/Surveys/Update/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/Surveys/Update/{SurveyNumber}'
params = {
    "AccountID": 1,
    "SurveyStatusCode": "01",
    "SurveyPriority": 11,
    "SurveyNumber": 12345,
    "SurveyName": "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID": 30,
    "StudyTypeID": 1,
    "ClientCPI": 1,
    "QuotaCPI": 2,
    "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive": True,
    "Quota": 100,
    "FulcrumExchangeAllocation": 0,
    "FulcrumExchangeHedgeAccess": True,
    "IsVerifyCallBack": True,
    "UniquePID": True,
    "UniqueIPAddress": True,
    "IsRelevantID": False,
    "IsDedupe": False,
    "IsGeoIP": False,
    "IsFraudProfile": False,
    "FraudProfileThreshold": 0,
    "IsTrueSample": False,
    "QuotaCalculationTypeID": 1,
    "SurveyPlatformID": 1,
    "BidLengthOfInterview": 10,
    "BusinessUnitID": 9,
    "SampleTypeID": 100,
    "BidIncidence": 20,
    "CollectsPII": None
 }
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.put(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/Surveys/Update/{SurveyNumber}");

string args = @"{
                    ""AccountID"": 1,
                    ""SurveyStatusCode"": ""01"",
                    ""SurveyPriority"": 11,
                    ""SurveyNumber"": 12345,
                    ""SurveyName"": ""Example API Survey"",
                    ""CountryLanguageID"": 9,
                    ""IndustryID"": 30,
                    ""StudyTypeID"": 1,
                    ""ClientCPI"": 1,
                    ""QuotaCPI"": 2,
                    ""ClientSurveyLiveURL"": ""https://www.surveyURL.com?rid=[%RID%]"",
                    ""TestRedirectURL"": ""https://www.surveyURL.com?rid=[%RID%]"",
                    ""IsActive"": true,
                    ""Quota"": 100,
                    ""FulcrumExchangeAllocation"": 0,
                    ""FulcrumExchangeHedgeAccess"": true,
                    ""IsVerifyCallBack"": true,
                    ""UniquePID"": true,
                    ""UniqueIPAddress"": true,
                    ""IsRelevantID"": false,
                    ""IsDedupe"": false,
                    ""IsGeoIP"": false,
                    ""IsFraudProfile"": false,
                    ""FraudProfileThreshold"": 0,
                    ""IsTrueSample"": false,
                    ""QuotaCalculationTypeID"": 1,
                    ""SurveyPlatformID"": 1,
                    ""BidLengthOfInterview"": 10,
                    ""BusinessUnitID"": 9,
                    ""SampleTypeID"": 100,
                    ""BidIncidence"": 20,
                    ""CollectsPII"": null
                }";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/Surveys/Update",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
    "AccountID": 1,
    "SurveyStatusCode": "01",
    "SurveyPriority": 11,
    "SurveyNumber": 12345,
    "SurveyName": "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID": 30,
    "StudyTypeID": 1,
    "ClientCPI": 1,
    "QuotaCPI": 2,
    "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive": true,
    "Quota": 100,
    "FulcrumExchangeAllocation": 0,
    "FulcrumExchangeHedgeAccess": true,
    "IsVerifyCallBack": true,
    "UniquePID": true,
    "UniqueIPAddress": true,
    "IsRelevantID": false,
    "IsDedupe": false,
    "IsGeoIP": false,
    "IsFraudProfile": false,
    "FraudProfileThreshold": 0,
    "IsTrueSample": false,
    "QuotaCalculationTypeID": 1,
    "SurveyPlatformID": 1,
    "BidLengthOfInterview": 10,
    "BusinessUnitID": 9,
    "SampleTypeID": 100,
    "BidIncidence": 20,
    "CollectsPII": null
 };

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: UpdateSurveyFromModel successful."
  ],
  "ResultCount": 1,
  "Survey": {
    "AccountID": 1,
    "SurveyStatusCode": "01",
    "SurveyPriority": 11,
    "SurveyNumber": 12345,
    "SurveyName": "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID": 30,
    "StudyTypeID": 1,
    "ClientCPI": 1,
    "QuotaCPI": 2,
    "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive": true,
    "Quota": 100,
    "FulcrumExchangeAllocation": 0,
    "FulcrumExchangeHedgeAccess": true,
    "IsVerifyCallBack": true,
    "UniquePID": true,
    "UniqueIPAddress": true,
    "IsRelevantID": false,
    "IsDedupe": false,
    "IsGeoIP": false,
    "IsFraudProfile": false,
    "FraudProfileThreshold": 0,
    "IsTrueSample": false,
    "QuotaCalculationTypeID": 1,
    "SurveyPlatformID": 1,
    "BidLengthOfInterview": 10,
    "BusinessUnitID": 9,
    "SampleTypeID": 100,
    "SurveySID": "E75CDFE2-7221-4FAC-8561-78EE1B1D6ECF",
    "BidIncidence": 20,
    "CollectsPII": null
  }
}

Update an existing Marketplace survey.

Arguments

Property Type Required Description
AccountID int true Unique account identifier.
SurveyStatusCode string true Code associated with the current status of the survey. See List Global Definitions for a map of survey status codes.
SurveyPriority int true Survey priority from 1-11 (1 being the highest). Priority only applies to routed sample.
SurveyName string true External name of the survey. This name may be exposed to respondents. This value is not unique across surveys.
SurveyNumber int true Unique number associated with the survey.
CountryLanguageID int true Unique id associated with a Country-Language pair.
IndustryID int true Industry associated with the survey’s topic.
StudyTypeID int true Indicates the survey’s format and purpose (i.e. adhoc, recruit, etc).
ClientCPI double true Revenue per complete used to calculate internal margin or savings.
QuotaCPI double true Gross payout per complete. This value is before any applicable commissions or fees.
ClientSurveyLiveURL string true Link to client survey. Limit of URL length is 3000 characters. Must conform to RFC3987. See Guide for more detail.
TestRedirectURL string true Link to client survey for testing purposes. All studies should include a working test link. Limit of URL length is 3000 characters.
IsActive boolean true Indicates if a survey is active or inactive in Marketplace database.
Quota int true Total number of completes needed.
FulcrumExchangeAllocation double true Percentage of total completes allocated only to Cint Marketplace. Must be between 0 and 100%.
FulcrumExchangeHedgeAccess boolean true true gives the Marketplace access to any unallocated completes.
IsVerifyCallBack boolean true true enables Verify CallBack security which requires the correct [%RSFN%] variable to be included on the “complete” client callback for verification.
UniquePID boolean true true enables PID deduplication on a survey preventing a respondent with the same PID from entering more than once. Recommended on all surveys.
UniqueIPAddress boolean true true enables IP deduplication on a survey preventing a respondent with the same IP address from entering more than once. Recommended on all surveys.
IsRelevantID boolean true Non-Functional: Cint automatically protects against invalid respondent traffic.
IsDedupe boolean true Non-Functional: Cint automatically protects against invalid respondent traffic.
IsGeoIP boolean true Non-Functional: Cint automatically protects against invalid respondent traffic.
IsFraudProfile boolean true Non-Functional: Cint automatically protects against invalid respondent traffic.
FraudProfileThreshold int true Non-Functional: Cint automatically protects against invalid respondent traffic.
IsTrueSample boolean false Non-Functional: Cint automatically protects against invalid respondent traffic.
QuotaCalculationTypeID int true Sets the quota calculation method. Either 1 for ”Completes” (quotas counted using completes) or 2=”Prescreens” (quotas counted when leaving Marketplace for the survey).
SurveyPlatformID int true Sets the external platform ID. This should be hardcoded to 1 which represents “none”.
BidLengthOfInterview int true Estimated time for a respondent to complete the survey excluding the Marketplace prescreener in minutes as provided by the buyer.
BusinessUnitID int true Sets the account business unit.
SampleTypeID int false Sets the type of sample the survey is open to (i.e. consumer, business-to-business, etc). See Sample Types.
BidIncidence int false Estimated incidence rate for the survey.
CollectsPII boolean false true indicates that the survey will collect PII.

GET Show a Survey

Definition

GET  https://api.samplicio.us/Demand/v1/Surveys/BySurveyNumber/{SurveyNumber}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/Surveys/BySurveyNumber/{SurveyNumber}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/Surveys/BySurveyNumber/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$URL = "https://api.samplicio.us/Demand/v1/Surveys/BySurveyNumber/{SurveyNumber}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/Surveys/BySurveyNumber/{SurveyNumber}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/Surveys/BySurveyNumber/{SurveyNumber}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/Surveys/BySurveyNumber/{SurveyNumber}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetSurveyBySurveyNumber successful."
  ],
  "ResultCount": 1,
  "Survey": {
    "AccountID": 1,
    "SurveyStatusCode": "01",
    "SurveyPriority": 11,
    "SurveyNumber": 12345,
    "SurveyName": "Example API Survey",
    "CountryLanguageID": 9,
    "IndustryID": 30,
    "StudyTypeID": 1,
    "ClientCPI": 1,
    "QuotaCPI": 2,
    "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
    "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
    "IsActive": true,
    "Quota": 100,
    "FulcrumExchangeAllocation": 0,
    "FulcrumExchangeHedgeAccess": true,
    "IsVerifyCallBack": true,
    "UniquePID": true,
    "UniqueIPAddress": true,
    "IsRelevantID": true,
    "IsDedupe": true,
    "IsGeoIP": true,
    "IsFraudProfile": true,
    "FraudProfileThreshold": 11,
    "IsTrueSample": false,
    "QuotaCalculationTypeID": 1,
    "SurveyPlatformID": 1,
    "BidLengthOfInterview": 10,
    "BusinessUnitID": 9,
    "SampleTypeID": 100,
    "SurveySID": "E75CDFE2-7221-4FAC-8561-78EE1B1D6ECF",
    "BidIncidence": 20,
    "CollectsPII": null
  }
}

Returns the details of a specific Marketplace survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.

GET List Surveys By Status

Definition

GET  https://api.samplicio.us/Demand/v1/Surveys/BySurveyStatus/{SurveyStatus}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/Surveys/BySurveyStatus/{SurveyStatus}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/Surveys/BySurveyStatus/{SurveyStatus}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$URL = "https://api.samplicio.us/Demand/v1/Surveys/BySurveyStatus/{SurveyStatus}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/Surveys/BySurveyStatus/{SurveyStatus}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/Surveys/BySurveyStatus/{SurveyStatus}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "https://api.samplicio.us/Demand/v1/Surveys/BySurveyStatus/{SurveyStatus}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetSurveysBySurveyStatus successful."
  ],
  "ResultCount": 1,
  "Surveys": [
    {
      "AccountID": 1,
      "SurveyStatusCode": "01",
      "SurveyPriority": 11,
      "SurveyNumber": 12345,
      "SurveyName": "Example API Survey",
      "CountryLanguageID": 9,
      "IndustryID": 30,
      "StudyTypeID": 1,
      "ClientCPI": 1,
      "QuotaCPI": 2,
      "ClientSurveyLiveURL": "https://www.surveyURL.com?rid=[%RID%]",
      "TestRedirectURL": "https://www.surveyURL.com?rid=[%RID%]",
      "IsActive": true,
      "Quota": 100,
      "FulcrumExchangeAllocation": 0,
      "FulcrumExchangeHedgeAccess": true,
      "IsVerifyCallBack": true,
      "UniquePID": true,
      "UniqueIPAddress": true,
      "IsRelevantID": true,
      "IsDedupe": true,
      "IsGeoIP": false,
      "IsFraudProfile": false,
      "FraudProfileThreshold": 0,
      "IsTrueSample": false,
      "QuotaCalculationTypeID": 1,
      "SurveyPlatformID": 1,
      "BidLengthOfInterview": 10,
      "BusinessUnitID": 9,
      "SampleTypeID": 100,
      "SurveySID": "E75CDFE2-7221-4FAC-8561-78EE1B1D6ECF",
      "BidIncidence": 20,
      "CollectsPII": null
    }
  ]
}

Returns an index of all surveys by status such as Pending, Live, and Completed. This supports up to 100,000 items. In order to access more, please use our newest offering of v2-beta.

Arguments

Property Type Required Description
SurveyStatus int true Code associated with the current status of the survey. See List Global Definitions for a map, of survey status codes.

POST Reconcile a Survey

Definition

POST https://api.samplicio.us/Demand/v1/Surveys/Reconcile/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"ResponseIDs" : ["9AF8B134-9E9F-E611-813Z-121EAE80731D", "1ADX57D4-9A9F-E711-813E-121DAC84731P"]}' https://api.samplicio.us/Demand/v1/Surveys/Reconcile/123456
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/Surveys/Reconcile/123456')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {ResponseIDs: [
    "9AF8B134-9E9F-E611-813Z-121EAE80731D",
    "1ADX57D4-9A9F-E711-813E-121DAC84731P"
  ]
 }.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"ResponseIDs": [
    "9AF8B134-9E9F-E611-813Z-121EAE80731D",
    "1ADX57D4-9A9F-E711-813E-121DAC84731P"
  ]
 }';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/Surveys/Reconcile/123456",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/Surveys/Reconcile/123456'
params = {"ResponseIDs": [
    "9AF8B134-9E9F-E611-813Z-121EAE80731D",
    "1ADX57D4-9A9F-E711-813E-121DAC84731P"
  ]
 }

data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/Surveys/Reconcile/123456");

string args = @"{
                  ""ResponseIDs"" : [
                    9AF8B134-9E9F-E611-813Z-121EAE80731D,
                    1ADX57D4-9A9F-E711-813E-121DAC84731P
                  ]
                }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "port": 443,
  "path": "/Demand/v1/Surveys/Reconcile/123456",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {"ResponseIDs": [
    "9AF8B134-9E9F-E611-813Z-121EAE80731D",
    "1ADX57D4-9A9F-E711-813E-121DAC84731P"
  ]
 };

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
    "AccountCode": "AA",
    "AccountType": 2,
    "ApiAccount": "Anon",
    "ApiAccountStatus": 1,
    "ApiMessages": [
        "API Message: Response initialized.",
        "API Message: Reconciliation in-progress"
    ],
    "ApiResult": 0,
    "ApiResultCode": 0,
    "ResultCount": 0,
    "reconciliation": {
        "ResponseIDs": [
          "9AF8B134-9E9F-E611-813Z-121EAE80731D",
          "1ADX57D4-9A9F-E711-813E-121DAC84731P"
        ]
    }
}

Reconciles the list of respondents in this call with the list of completes in Marketplace. Any RID not included will be removed from Marketplace completes, and any valid RID included but not already registered as a complete on Marketplace will be changed to a complete. Reconciliation will not take place immediately, and can take some time to take effect. This call can be done multiple times, with the latest call overriding the previous reconciliations.

Please note that a survey must be in Complete Status in order to Reconcile. (SurveyStatusCode: 04)

Arguments

Property Type Required Description
ResponseIDs array true A list of up to 14,000 RIDs that should be completes. Any RIDs omitted from this list will be changed to a terminate.

Qualifications

The Qualifications resource allows the buyer to create new qualifications on an existing survey, update existing qualifications, and retrieve survey qualifications. These qualifications make up the Marketplace Prescreener and define the overall survey targeting criteria for suppliers.

Qualifications Model

Property Type Description
Qualifications array Contains an array of elements described below.
Name string Name of the qualification. Maximum length of 3000. Visible as the “Description” field in the UI.
QuestionID int Unique number associated with the question.
LogicalOperator string Defines the logical operation applied to the conditions (OR, AND, or NOT).
NumberOfRequiredConditions int Indicates the number of conditions that must be selected by the respondent to proceed.
IsActive boolean false if the qualification has effectively been deleted.
PreCodes array of strings Qualification answer option identifiers.
MaxPunch int Defines the maximum number of options that can be selected by user. Should be set as n+1 for n is number of allowed responses.

POST Create a Qualification

Definition

POST  https://api.samplicio.us/Demand/v1/SurveyQualifications/Create/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"Name": "STANDARD_RELATIONSHIP","QuestionID": 632,"LogicalOperator": "OR","NumberOfRequiredConditions": 1,"IsActive": true,"PreCodes": ["1"], "Order": 7,"MaxPunch": 2}' https://api.samplicio.us/Demand/v1/SurveyQualifications/Create/{SurveyNumber}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyQualifications/Create/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {
    Name: "STANDARD_RELATIONSHIP",
    QuestionID: 632,
    LogicalOperator: "OR",
    NumberOfRequiredConditions: 1,
    IsActive: true,
    PreCodes: [
        "1"
    ],
    Order: 7,
    MaxPunch: 2
}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{
    "Name": "STANDARD_RELATIONSHIP",
    "QuestionID": 632,
    "LogicalOperator": "OR",
    "NumberOfRequiredConditions": 1,
    "IsActive": true,
    "PreCodes": [
        "1"
    ],
    "Order": 7,
    "MaxPunch": 2
}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SurveyQualifications/Create/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/SurveyQualifications/Create/{SurveyNumber}'
params = {
    "Name": "STANDARD_RELATIONSHIP",
    "QuestionID": 632,
    "LogicalOperator": "OR",
    "NumberOfRequiredConditions": 1,
    "IsActive": True,
    "PreCodes": [
        "1"
    ],
    "Order": 7,
    "MaxPunch": 2
}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyQualifications/Create/{SurveyNumber}");

string args = @"{
                  ""Name"": ""STANDARD_RELATIONSHIP"",
                  ""QuestionID"": 632,
                  ""LogicalOperator"": ""OR"",
                  ""NumberOfRequiredConditions"": 1,
                  ""IsActive"": true,
                  ""PreCodes"": [""1""],
                  ""Order"": 7,
                  ""MaxPunch"": 2
                }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "port": 443,
  "path": "/Demand/v1/SurveyQualifications/Create/{SurveyNumber}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
    }
};

var json = {
    "Name": "STANDARD_RELATIONSHIP",
    "QuestionID": 632,
    "LogicalOperator": "OR",
    "NumberOfRequiredConditions": 1,
    "IsActive": true,
    "PreCodes": [
        "1"
    ],
    "Order": 7,
    "MaxPunch": 2
};

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: CreateSurveyQualificationFromModel successful."
  ],
  "ResultCount": 7,
  "Qualifications": [
    {
      "Name": "AGE",
      "QuestionID": 42,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 1,
      "PreCodes": [
        "18",
        "19",
        "20",
        "21",
        "22",
        "23",
        "24",
        "25"
      ],
        "MaxPunch": 2
    },
    {
      "Name": "GENDER",
      "QuestionID": 43,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 0,
      "IsActive": true,
      "Order": 3,
      "PreCodes": [
        "1",
        "2"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "ZIP",
      "QuestionID": 45,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 0,
      "IsActive": true,
      "Order": 2,
      "PreCodes": [],
      "MaxPunch": 2
    },
    {
      "Name": "HISPANIC",
      "QuestionID": 47,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 4,
      "PreCodes": [
        "1",
        "10",
        "11",
        "12",
        "13",
        "14",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "ETHNICITY",
      "QuestionID": 113,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 5,
      "PreCodes": [
        "1",
        "2",
        "3"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "STANDARD_RELATIONSHIP",
      "QuestionID": 632,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 7,
      "PreCodes": [
        "1"
      ],
      "MaxPunch": 2,
    },
    {
      "Name": "STANDARD_HHI",
      "QuestionID": 61076,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 0,
      "IsActive": true,
      "Order": 6,
      "PreCodes": [
        "1",
        "10",
        "11",
        "12",
        "13",
        "14",
        "15",
        "16",
        "17",
        "18",
        "19",
        "2",
        "20",
        "21",
        "22",
        "23",
        "24",
        "25",
        "26",
        "27",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9"
      ],
      "MaxPunch": 2
    }
  ]
}

Creates qualification and conditions for an existing Marketplace survey.

Arguments

Property Type Description
SurveyNumber int Unique number associated with the survey.
Name string Name of the qualification. Maximum 32 characters.
QuestionID int Unique number associated with the question.
LogicalOperator string Defines the logical operation applied to the conditions.
NumberOfRequiredConditions int Indicates the number of conditions that must be selected by the respondent to proceed.
IsActive boolean Indicates if the qualification is active or inactive. Inactive effectively is the same as deleted.
PreCodes array of strings Qualification answer option identifiers.
Order int Determines qualification order in the prescreener.
MaxPunch int Defines the maximum number of options that can be selected by user. Should be set as n+1 for n is number of allowed responses.

PUT Update a Qualification

Definition

PUT  https://api.samplicio.us/Demand/v1/SurveyQualifications/Update/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X PUT --data '{"Name": "STANDARD_RELATIONSHIP","QuestionID": 632,"LogicalOperator": "OR",NumberOfRequiredConditions": 1,"IsActive": true,"PreCodes": ["2"],"Order": 7,"MaxPunch": 2}' https://api.samplicio.us/Demand/v1/SurveyQualifications/Update/{SurveyNumber}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyQualifications/Update/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {
    Name: "STANDARD_RELATIONSHIP",
    QuestionID: 632,
    LogicalOperator: "OR",
    NumberOfRequiredConditions: 1,
    IsActive: true,
    PreCodes: [
        "2"
    ],
    Order: 7,
    MaxPunch: 2
}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{
    "Name": "STANDARD_RELATIONSHIP",
    "QuestionID": 632,
    "LogicalOperator": "OR",
    "NumberOfRequiredConditions": 1,
    "IsActive": true,
    "PreCodes": [
        "2"
    ],
    "Order": 7,
    "MaxPunch": 2
}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SurveyQualifications/Update/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/SurveyQualifications/Update/{SurveyNumber}'
params = {
    "Name": "STANDARD_RELATIONSHIP",
    "QuestionID": 632,
    "LogicalOperator": "OR",
    "NumberOfRequiredConditions": 1,
    "IsActive": True,
    "PreCodes": [
        "2"
    ],
    "Order": 7,
    "MaxPunch": 2
}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.put(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyQualifications/Update/{SurveyNumber}");

string args = @"{
                    ""Name"": ""STANDARD_RELATIONSHIP"",
                    ""QuestionID"": 632,
                    ""LogicalOperator"": ""OR"",
                    ""NumberOfRequiredConditions"": 1,
                    ""IsActive"": ~~true~~,
                    ""PreCodes"": [""2""],
                    ""Order"": 7,
                    ""MaxPunch"": 2
                }";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyQualifications/Update/{SurveyNumber}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
    }
};

var json = {
    "Name": "STANDARD_RELATIONSHIP",
    "QuestionID": 632,
    "LogicalOperator": "OR",
    "NumberOfRequiredConditions": 1,
    "IsActive": true,
    "PreCodes": [
        "2"
    ],
    "Order": 7,
    "MaxPunch": 2
};

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: UpdateSurveyQualificationFromModel successful."
  ],
  "ResultCount": 7,
  "Qualifications": [
    {
      "Name": "AGE",
      "QuestionID": 42,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 1,
      "PreCodes": [
        "18",
        "19",
        "20",
        "21",
        "22",
        "23",
        "24",
        "25"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "GENDER",
      "QuestionID": 43,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 0,
      "IsActive": true,
      "Order": 3,
      "PreCodes": [
        "1",
        "2"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "ZIP",
      "QuestionID": 45,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 0,
      "IsActive": true,
      "Order": 2,
      "PreCodes": [],
      "MaxPunch": 2
    },
    {
      "Name": "HISPANIC",
      "QuestionID": 47,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 4,
      "PreCodes": [
        "1",
        "10",
        "11",
        "12",
        "13",
        "14",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "ETHNICITY",
      "QuestionID": 113,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 5,
      "PreCodes": [
        "1",
        "2",
        "3"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "STANDARD_RELATIONSHIP",
      "QuestionID": 632,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 7,
      "PreCodes": [
        "2"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "STANDARD_HHI",
      "QuestionID": 61076,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 0,
      "IsActive": true,
      "Order": 6,
      "PreCodes": [
        "1",
        "10",
        "11",
        "12",
        "13",
        "14",
        "15",
        "16",
        "17",
        "18",
        "19",
        "2",
        "20",
        "21",
        "22",
        "23",
        "24",
        "25",
        "26",
        "27",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9"
      ],
      "MaxPunch": 2
    }
  ]
}

Updates existing qualifications for a Marketplace survey.

Arguments

Property Type Description
SurveyNumber int Unique number associated with the survey.
Name string Name of the qualification. Maximum 32 characters.
QuestionID int Unique number associated with the question.
LogicalOperator string Defines the logical operation applied to the conditions.
NumberOfRequiredConditions int Indicates the number of conditions that must be selected by the respondent to proceed.
IsActive boolean Indicates if the qualification is active or inactive. Inactive effectively is the same as deleted.
PreCodes array of strings Qualification answer option identifiers.
Order int Determines qualification order in the prescreener
MaxPunch int Defines the maximum number of options that can be selected by user. Should be set as n+1 for n is number of allowed responses.

GET List Qualifications

Definition

GET  https://api.samplicio.us/Demand/v1/SurveyQualifications/BySurveyNumber/{SurveyNumber}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/SurveyQualifications/BySurveyNumber/{SurveyNumber}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyQualifications/BySurveyNumber/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Demand/v1/SurveyQualifications/BySurveyNumber/{SurveyNumber}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SurveyQualifications/BySurveyNumber/{SurveyNumber}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyQualifications/BySurveyNumber/{SurveyNumber}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyQualifications/BySurveyNumber/{SurveyNumber}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetSurveyQualificationsBySurveyNumber successful."
  ],
  "ResultCount": 6,
  "Qualifications": [
    {
      "Name": "AGE",
      "QuestionID": 42,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 1,
      "PreCodes": [
        "18",
        "19",
        "20",
        "21",
        "22",
        "23",
        "24",
        "25"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "GENDER",
      "QuestionID": 43,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 0,
      "IsActive": true,
      "Order": 3,
      "PreCodes": [
        "1",
        "2"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "ZIP",
      "QuestionID": 45,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 0,
      "IsActive": true,
      "Order": 2,
      "PreCodes": [],
      "MaxPunch": 2
    },
    {
      "Name": "HISPANIC",
      "QuestionID": 47,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 4,
      "PreCodes": [
        "1",
        "10",
        "11",
        "12",
        "13",
        "14",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "ETHNICITY",
      "QuestionID": 113,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 1,
      "IsActive": true,
      "Order": 5,
      "PreCodes": [
        "1",
        "2",
        "3"
      ],
      "MaxPunch": 2
    },
    {
      "Name": "STANDARD_HHI",
      "QuestionID": 61076,
      "LogicalOperator": "OR",
      "NumberOfRequiredConditions": 0,
      "IsActive": true,
      "Order": 6,
      "PreCodes": [
        "1",
        "10",
        "11",
        "12",
        "13",
        "14",
        "15",
        "16",
        "17",
        "18",
        "19",
        "2",
        "20",
        "21",
        "22",
        "23",
        "24",
        "25",
        "26",
        "27",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9"
      ],
      "MaxPunch": 2
    }
  ]
}

Returns a list of all qualifications associated with a survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.

Quotas

Quotas are used to specify how many respondents of a desired demographic type are allowed to either complete or enter the survey (depending if the survey is set to run on prescreens or run on completes). Quotas must be built from an existing qualification, so the question ID and all associated conditons must already be present as a qualification.

There is a limit of 1,000 Quotas per survey, which can be checked by using the “ResultCount” parameter on the List Quotas call. This is a combination of one Total Quota and up to 999 subquotas. The Total Quota is set using the “Quota” parameter in the Surveys model.

Quotas Model

Property Type Description
SurveyQuotaID int Unique ID associated with the quota.
Name string Name associated with the quota. Maximum length of 64.
FieldTarget int Completes Goal (formerly called Field Target in the UI) associated with the quota. Only visible to the buyer.
Quota int Quota number for the specified quota.
Prescreens int Number of prescreens achieved. A prescreen is a respondent who enters the client survey.
Completes int Number of completes achieved.
IsActive boolean Indicates if the quotas is active or inactive. Should the quota be enforced on this project?
Conditions array Contains an array of Conditions models described below

Conditions Model

Note that each quota may only contain up to 100,000 precodes spread across all its conditions.

Property Type Description
QuestionID int QuestionID(s) that the quota is based upon
PreCodes array of strings Qualification answer option precodes defined by the API Standard

POST Create a Quota

Definition

POST https://api.samplicio.us/Demand/v1/SurveyQuotas/Create/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"Name": "Quota Name", "Quota": 50, "IsActive":true, "Conditions":[{"QuestionID":42, "PreCodes": ["18","19","20","21","22"] }]}' https://api.samplicio.us/Demand/v1/SurveyQuotas/Create/{SurveyNumber}
require 'net/http'
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyQuotas/Create/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {Name: "Quota Name", Quota: 50, IsActive:true, Conditions:[{QuestionID:42, PreCodes: ["18","19","20","21","22"] }]}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"Name": "Quota Name", "Quota": 50, "IsActive":true, "Conditions":[{"QuestionID":42, "PreCodes": ["18","19","20","21","22"] }]}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SurveyQuotas/Create/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Demand/v1/SurveyQuotas/Create/{SurveyNumber}'
params = {'Name': 'Quota Name', 'Quota': 50, 'IsActive': True, 'Conditions':[{'QuestionID':42, 'PreCodes': ['18','19','20','21','22'] }]}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyQuotas/Create/{SurveyNumber}");

string args = @"{
                ""Name"": ""Quota Name"",
                 ""Quota"": 50,
                 ""IsActive"": true,
                 ""Conditions"":[{
                                  ""QuestionID"":42,
                                  ""PreCodes"": [""18"",""19"",""20"",""21"",""22""]
                                }]
              }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyQuotas/Create/{SurveyNumber}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'}
};

var json = {
  "Name": "Quota Name",
  "Quota": 50,
  "IsActive": true,
  "Conditions":
  [
    {
      "QuestionID": 42,
      "PreCodes": [
        "18",
        "19",
        "20",
        "21",
        "22",
      ]
    }
  ]
};


var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: CreateSurveyQuotaFromModel successful."
  ],
  "ResultCount": 2,
  "Quotas": [
    {
      "SurveyQuotaID": 0001100,
      "Name": "Total",
      "SurveyQuotaType": "Total",
      "FieldTarget": 100,
      "Quota": 100,
      "Prescreens": 0,
      "Completes": 0,
      "IsActive": true,
      "Conditions": null
    },
    {
      "SurveyQuotaID": 1000110,
      "Name": "Quota Name",
      "SurveyQuotaType": "Client",
      "FieldTarget": 50,
      "Quota": 50,
      "Prescreens": 0,
      "Completes": 0,
      "IsActive": true,
      "Conditions": [
        {
          "QuestionID": 42,
          "PreCodes": [
            "18",
            "19",
            "20",
            "21",
            "22",
          ]
        },

      ]
    }
  ]
}

Creates Quota based on specified questionIDs.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
Name string true Name associated with the quota. Maximum 64 characters.
FieldTarget int true Completes Goal (formerly called Field Target in the UI) associated with the quota. Only visible to the buyer.
Quota int true Quota number for the specified quota.
IsActive boolean true Should the quota be enforced on this project?
SurveyQuotaType string false Indicates quota type (Client or Total).
Conditions array true Indicates conditions associated with quota (by questionID and precodes).

PUT Update a Quota

Definition

PUT  https://api.samplicio.us/Demand/v1/SurveyQuotas/Update/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X PUT  --data '{"SurveyQuotaID": 1000110,"Name": "Quota Name", "FieldTarget":1000, "Quota": 50, "IsActive":true, "Conditions":[{"QuestionID":42, "PreCodes": ["18","19","20","21","22"] }]}'  https://api.samplicio.us/Demand/v1/SurveyQuotas/Update/{SurveyNumber}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyQuotas/Update/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {SurveyQuotaID: 1000110, Name: "Quota Name", FieldTarget:1000, Quota: 50, IsActive:true, Conditions:[{QuestionID:42, PreCodes: [18, 19, 20, 21, 22] }]}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SurveyQuotaID": 1000110, "Name": "Quota Name", "FieldTarget":1000, "Quota": 50, "IsActive":true, "Conditions":[{"QuestionID":42, "PreCodes": ["18","19","20","21","22"] }]}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SurveyQuotas/Update/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Demand/v1/SurveyQuotas/Update/{SurveyNumber}'
params = {'SurveyQuotaID': 1000110, 'Name': "Quota Name", 'FieldTarget':1000, 'Quota': 50, 'IsActive': True, 'Conditions':[{'QuestionID':42, 'PreCodes': ['18','19','20','21','22'] }]}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

updateQuotas = requests.put(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyQuotas/Update/{SurveyNumber}");

string args = @"{
                ""SurveyQuotaID"": 1000110,
                 ""Name"": ""Quota Name"",
                 ""FieldTarget"":1000,
                 ""Quota"": 50,
                 ""IsActive"": true,
                 ""Conditions"":[{
                                  ""QuestionID"":42,
                                  ""PreCodes"": [""18"",""19"",""20"",""21"",""22""]
                                }]
               }";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyQuotas/Update/{SurveyNumber}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
  "SurveyQuotaID": 0001100,
  "Name": "Quota Name",
  "FieldTarget": 50,
  "Quota": 50,
  "IsActive": true,
  "Conditions": [
    {
      "QuestionID": 42,
      "PreCodes": [
        "18",
        "19"
      ]
    },
  ]
};

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: CreateSurveyQuotaFromModel successful."
  ],
  "ResultCount": 2,
  "Quotas": [
    {
      "SurveyQuotaID": 0001100,
      "Name": "Total",
      "SurveyQuotaType": "Total",
      "FieldTarget": 100,
      "Quota": 100,
      "Prescreens": 0,
      "Completes": 0,
      "IsActive": true,
      "Conditions": null
    },
    {
      "SurveyQuotaID": 1000110,
      "Name": "Quota Name",
      "SurveyQuotaType": "Client",
      "FieldTarget": 50,
      "Quota": 50,
      "Prescreens": 0,
      "Completes": 0,
      "IsActive": true,
      "Conditions": [
        {
          "QuestionID": 42,
          "PreCodes": [
            "18",
            "19",
            "20",
            "21",
            "22",
          ]
        },
      ]
    }
  ]
}

Updates a quota’s size, conditions, and other parameters.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
Name string true Name associated with the quota. Maximum length of 64.
SurveyQuotaID int true Unique ID associated with the quota.
FieldTarget int true Completes Goal (formerly called Field Target in the UI) associated with the quota. Only visible to the buyer.
Quota int true Quota number for the specified quota.
IsActive boolean true Should the quota be enforced on this project?
SurveyQuotaType string false Indicates quota type (Client or Total).
Conditions array true Indicates conditions associated with quota (by questionID and precodes).

GET List Quotas

Definition

GET  https://api.samplicio.us/Demand/v1/SurveyQuotas/BySurveyNumber/{SurveyNumber}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/SurveyQuotas/BySurveyNumber/{SurveyNumber}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyQuotas/BySurveyNumber/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Demand/v1/SurveyQuotas/BySurveyNumber/{SurveyNumber}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SurveyQuotas/BySurveyNumber/{SurveyNumber}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyQuotas/BySurveyNumber/{SurveyNumber}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyQuotas/BySurveyNumber/{SurveyNumber}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetSurveyQuotasBySurveyNumber successful."
  ],
 "ResultCount": 2,
  "Quotas": [
    {
      "SurveyQuotaID": 0001000,
      "Name": "Total",
      "SurveyQuotaType": "Total",
      "FieldTarget": 100,
      "Quota": 100,
      "Prescreens": 0,
      "Completes": 0,
      "IsActive": true,
      "Conditions": null
    },
    {
      "SurveyQuotaID": 0101010,
      "Name": "Age Quota",
      "SurveyQuotaType": "Client",
      "FieldTarget": 40,
      "Quota": 40,
      "Prescreens": 0,
      "Completes": 0,
      "IsActive": true,
      "Conditions": [
        {
          "QuestionID": 42,
          "PreCodes": [
            "18",
            "19",
            "20",
            "24",
            "25"
          ]
        }
      ]
    }

Returns the list of quotas associated with the specified survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.

Marketplace Allocation Templates

A Marketplace Allocation Template allows a buyer to quickly add a commonly used supply blend. The Marketplace Allocation Templates resource returns all Marketplace Allocation Templates associated with an existing account as well as apply an existing Marketplace Allocation Template to a survey. An Marketplace Allocation Template must first be created in the Marketplace UI.

Marketplace Allocation Templates Model

Property Type Description
ID int ID associated with the Marketplace Allocation Template.
AccountID int Unique account identifier.
Name string Marketplace Allocation Template Name. Maximum length of 255.
ExchangeAllocationPercentage double Percentage of total completes allocated to the Cint Marketplace, expressed as a decimal from 0 to 1.
ExchangeIsHedgeAccess boolean true gives the Cint Marketplace access to any unallocated completes. true is recommended when using Cint Marketplace.
IsGlobalTemplate boolean Should always return false indicating the template is only available to the buyers account.

Supplier Groups Model

Property Type Description
ID int ID associated with the Marketplace Allocation Template.
Name string Marketplace Allocation Template Name. Maximum length of 255.
SupplierGroupDisplayTypeID int Indicates if the group is the “blocked” group or not. 1 = unblocked. 2 = blocked.
Completes int Number of completes gained by the group.
Screens int Number of prescreens gained by the group.
AllocationPercentage double Percentage of total completes allocated only to the Marketplace group, expressed as a decimal from 0 to 1.
IsHedgeAccess boolean true gives the Marketplace group access to any unallocated completes.
CPI int Will return null as CPI can’t be set via an Marketplace Allocation Template.
Suppliers array Contains array of elements described below.

Suppliers Model

Property Type Description
SupplierID int ID associated with the supplier account.
Completes int Number of completes gained by the supplier.
Screens string Number of prescreens gained by the supplier.

GET List Marketplace Allocation Templates

Definition

GET  https://api.samplicio.us/Demand/v1/ExchangeTemplates/GetAll

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/ExchangeTemplates/GetAll
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/ExchangeTemplates/GetAll')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Demand/v1/ExchangeTemplates/GetAll";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/ExchangeTemplates/GetAll'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/ExchangeTemplates/GetAll");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/ExchangeTemplates/GetAll",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetAllExchangeTemplates successful."
  ],
  "ResultCount": 2,
  "ExchangeTemplates": [
  {
      "ID": 1,
      "AccountID": 1,
      "Name": "ExchangeTemplate1",
      "ExchangeAllocationPercentage": 0,
      "ExchangeIsHedgeAccess": true,
      "IsGlobalTemplate": true
    },
    {
      "ID": 2,
      "AccountID": 1,
      "Name": "ExchangeTemplate2",
      "ExchangeAllocationPercentage": 0.4,
      "ExchangeIsHedgeAccess": true,
      "IsGlobalTemplate": false
    }
  ]
}

Returns all Marketplace Templates associated with an existing account.

POST Apply a Marketplace Template

Definition

POST  https://api.samplicio.us/Demand/v1/ExchangeTemplates/ApplyToSurvey/{SurveyNumber}/{ExchangeTemplateID}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST https://api.samplicio.us/Demand/v1/ExchangeTemplates/ApplyToSurvey/{SurveyNumber}/{ExchangeTemplateID}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/ExchangeTemplates/ApplyToSurvey/{SurveyNumber}/{ExchangeTemplateID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/ExchangeTemplates/ApplyToSurvey/{SurveyNumber}/{ExchangeTemplateID}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/ExchangeTemplates/ApplyToSurvey/{SurveyNumber}/{ExchangeTemplateID}'
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/ExchangeTemplates/ApplyToSurvey/{SurveyNumber}/{ExchangeTemplateID}");

request.Method = "POST";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/ExchangeTemplates/ApplyToSurvey/{SurveyNumber}/{ExchangeTemplateID}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: ApplyExchangeTemplateToSurvey successful."
  ],
  "ResultCount": 1,
  "SupplierGroups": [
    {
      "ID": 1234,
      "Name": "Group 1",
      "SupplierGroupDisplayTypeID": 1,
      "Completes": 0,
      "Screens": 0,
      "AllocationPercentage": 0,
      "IsHedgeAccess": false,
      "CPI": null,
      "Suppliers": [
        {
          "SupplierID": 1,
          "Completes": 0,
          "Screens": 0
        },
        {
          "SupplierID": 2,
          "Completes": 0,
          "Screens": 0
        },
        {
          "SupplierID": 3,
          "Completes": 0,
          "Screens": 0
        },
        {
          "SupplierID": 4,
          "Completes": 0,
          "Screens": 0
        }
      ]
    }
  ]
}

Applies the specified Marketplace Allocation Template to an existing survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
ID int true ID associated with the Marketplace Allocation Template.

Supplier Groups

Supplier Groups allow buyers to allocate completes to a specific group of suppliers. Supplier Groups contain a hedge property, which allows suppliers from Supplier Groups to also have access to unallocated completes.

POST Create a Group

Definition

POST  https://api.samplicio.us/Demand/v1/SupplierGroups/CreateWithSuppliers/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"SurveyNumber": 101100,"Name":"Top Supplier Group", "AllocationPercentage": 0.10,"IsHedgeAccess": true, "Suppliers": [{"SupplierCode":"0001"}]}' https://api.samplicio.us/Demand/v1/SupplierGroups/CreateWithSuppliers/{SurveyNumber}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierGroups/CreateWithSuppliers/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Post.new(FullUriPath, initheader = {'Content-Type' => 'application/json'})

request.body = {SurveyNumber: 101100, Name:"Top Supplier Group", AllocationPercentage: 0.10, IsHedgeAccess: true, "Suppliers": [{"SupplierCode":"0001"}]}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$curl = curl_init();

$params = '{"SurveyNumber": 101100, "Name":"Top Supplier Group", "AllocationPercentage": 0.10, "IsHedgeAccess": true, "Suppliers": [{"SupplierCode":"0001"}]}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierGroups/CreateWithSuppliers/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SupplierGroups/CreateWithSuppliers/{SurveyNumber}'
params = {'SurveyNumber': 101100, 'Name':'Top Supplier Group', 'AllocationPercentage': 0.10, 'IsHedgeAccess': True, 'Suppliers': [{'SupplierCode':'1010'}]}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}
response = requests.post(url, data=data, headers=headers)

using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierGroups/CreateWithSuppliers/{SurveyNumber}");

string args = @"{
                 ""SurveyNumber"": 101100,
                 ""Name"":""Top Supplier Group"",
                 ""AllocationPercentage"": 0.10,
                 ""IsHedgeAccess"": true,
                 ""Suppliers"": [{
                                  ""SupplierCode"":""1010""
                                }]
                }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();

const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierGroups/CreateWithSuppliers/{SurveyNumber}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {"SurveyNumber": 101100,
  "Name":"Top Supplier Group",
  "AllocationPercentage": 0.10,
  "IsHedgeAccess": true,
  "Suppliers": [
    {
    "SupplierCode":"1010"
    }
  ]
}

var params = JSON.stringify(json);

var request = https.request(options, function (createGroup) {
  var chunks = [];

  createGroup.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: CreateSupplierGroupFromModel successful."
  ],
  "ResultCount": 1,
  "SupplierGroup": {
    "ID": 201967,
    "Name": "Top Supplier Group",
    "Completes": 0,
    "Screens": 0,
    "AllocationPercentage": 0.1,
    "CPI": null,
    "IsHedgeAccess": true,
    "Suppliers": [
      {
        "SupplierCode": "1010",
        "Completes": 0,
        "Screens": 0
      }
    ]
  }
}

Creates a group with specific suppliers and allocation for that group.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
Name string true Supplier Group name. Maximum 64 characters.
AllocationPercentage double true Group reserved allocation, expressed as a decimal percentage from 0 to 1.
IsHedgeAccess boolean true Access to unallocated completes on Cint Marketplace.
Suppliers array true An array of all supplier codes (strings).
CPI double false The payout per complete for the group (defaults to survey QCPI).

POST Create an Empty Group

Definition

POST  https://api.samplicio.us/Demand/v1/SupplierGroups/Create/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"SurveyNumber": 101100,"Name":"Top Supplier Group", "AllocationPercentage": 0.10,"IsHedgeAccess": true}' https://api.samplicio.us/Demand/v1/SupplierGroups/Create/{SurveyNumber}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierGroups/Create/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {SurveyNumber: 101100, Name:"Top Supplier Group", AllocationPercentage: 0.10, IsHedgeAccess: true}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SurveyNumber": 101100,"Name":"Top Supplier Group", "AllocationPercentage": 0.10,"IsHedgeAccess": true}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierGroups/Create/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Demand/v1/SupplierGroups/Create/{SurveyNumber}'
params = {'SurveyNumber': 101100,'Name':'Top Supplier Group', 'AllocationPercentage': 0.10,'IsHedgeAccess': True}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)

using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierGroups/Create/{SurveyNumber}");

string args = @"{
                 ""SurveyNumber"": 101100,
                 ""Name"":""Top Supplier Group"",
                 ""AllocationPercentage"": 0.10,
                 ""IsHedgeAccess"": true
                }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierGroups/Create/{SurveyNumber}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {"SurveyNumber": 101100,
  "Name":"Top Supplier Group",
  "AllocationPercentage": 0.10,
  "IsHedgeAccess": true,
  }

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: CreateSupplierGroupFromModel successful."
  ],
  "ResultCount": 1,
  "SupplierGroup": {
    "ID": 000110,
    "Name": "Top Supplier Group",
    "Completes": 0,
    "Screens": 0,
    "AllocationPercentage": 0,
    "CPI": null,
    "IsHedgeAccess": true,
    "Suppliers": []
  }
}

Creates an empty supplier group with a specific allocation and name.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
Name string true Supplier Group name. Maximum 64 characters.
AllocationPercentage double true Group reserved allocation, expressed as a decimal percentage from 0 to 1.
IsHedgeAccess boolean false Access to unallocated completes on Cint Marketplace.
CPI double false The payout per complete for the group (defaults to survey QCPI).

PUT Update a Group

Definition

PUT  https://api.samplicio.us/Demand/v1/SupplierGroups/Update/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X PUT --data '{"ID": 1234, "SurveyNumber": 001100,"Name":"Top Supplier Group", "AllocationPercentage": 0.10,"IsHedgeAccess": true}' https://api.samplicio.us/Demand/v1/SupplierGroups/Update/{SurveyNumber}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierGroups/Update/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {ID: 1234, SurveyNumber: 101100, Name:"Top Supplier Group",AllocationPercentage: 0.10, IsHedgeAccess: true}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"ID": 1234,"SurveyNumber": 101100,"Name":"Top Supplier Group", "AllocationPercentage": 0.10,"IsHedgeAccess": true}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierGroups/Update/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Demand/v1/SupplierGroups/Update/{SurveyNumber}'
params = {'ID': 1234,'SurveyNumber': 101100,'Name':'Top Supplier Group', 'AllocationPercentage': 0.10,'IsHedgeAccess': True}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.put(url, data=data, headers=headers)

using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierGroups/Update/{SurveyNumber}");

string args = @"{
                 ""ID"": 1234,
                 ""SurveyNumber"": 101100,
                 ""Name"":""Top Supplier Group"",
                 ""AllocationPercentage"": 0.10,
                 ""IsHedgeAccess"": true
                }";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierGroups/Create/{SurveyNumber}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {"ID": 1234,
  "SurveyNumber": 101100,
  "Name":"Top Supplier Group",
  "AllocationPercentage": 0.10,
  "IsHedgeAccess": true,
  }

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: UpdateSupplierGroupFromModel successful."
  ],
  "ResultCount": 1,
  "SupplierGroup": {
    "ID": 000001,
    "Name": "Top Supplier Group",
    "Completes": 0,
    "Screens": 0,
    "AllocationPercentage": 0.15,
    "CPI": null,
    "IsHedgeAccess": true,
    "Suppliers": []
  }
}

Updates a supplier group with the specified values.

Arguments

Property Type Required Description
ID int true Unique ID associated with the group.
SurveyNumber int true Unique number associated with the survey.
Name string true Supplier Group name. Maximum 64 characters.
AllocationPercentage double true Group reserved allocation, expressed as a decimal percentage from 0 to 1.
IsHedgeAccess boolean true Access to unallocated completes on Cint Marketplace.
CPI double false The payout per complete for the group (defaults to survey QCPI).

DELETE Delete a Group

Definition

DELETE  https://api.samplicio.us/Demand/v1/SupplierGroups/Delete/{SurveyNumber}/{SupplierGroupID}

Example Request

curl  -H "Authorization: YOUR_API_KEY_HERE" -X DELETE https://api.samplicio.us/Demand/v1/SupplierGroups/Delete/{SurveyNumber}/{SupplierGroupID}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierGroups/Delete/{SurveyNumber}/{SupplierGroupID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Delete.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierGroups/Delete/{SurveyNumber}/{SupplierGroupID}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
));

curl_exec($curl);
curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SupplierGroups/Delete/{SurveyNumber}/{SupplierGroupID}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.delete(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierGroups/Delete/{SurveyNumber}/{SupplierGroupID}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

request.Method = "DELETE";

request.GetResponse();
const https = require('https');

var options = {
  "method": "DELETE",
  "hostname": "api.samplicio.us",
  "port": 443,
  "path": "/Demand/v1/SupplierGroups/Delete/{SurveyNumber}/{SupplierGroupID}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options);

request.end();

Deletes the specified supplier group.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierGroupID int true Unique ID for Supplier Group.

POST Add to a Group

Definition

POST  https://api.samplicio.us/Demand/v1/SupplierGroups/AddSuppliersToGroup/{SurveyNumber}/{SupplierGroupID}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"SupplierCode":"0010"}' https://api.samplicio.us/Demand/v1/SupplierGroups/AddSuppliersToGroup/{SurveyNumber}/{SupplierGroupID}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierGroups/AddSuppliersToGroup/{SurveyNumber}/{SupplierGroupID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {SupplierCode: 1010}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SupplierCode": 1010}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierGroups/AddSuppliersToGroup/{SurveyNumber}/{SupplierGroupID}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Demand/v1/SupplierGroups/AddSuppliersToGroup/{SurveyNumber}/{SupplierGroupID}'
params = {'SupplierCode': 1010}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)

using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierGroups/AddSuppliersToGroup/{SurveyNumber}/{SupplierGroupID}");

string args = @"{""SupplierCode"": 1010}";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierGroups/AddSuppliersToGroup/{SurveyNumber}/{SupplierGroupID}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {"SupplierCode": 1010}

var params = JSON.stringify(json);

var request = https.request(options, function (createGroupEmpty) {
  var chunks = [];

  createGroupEmpty.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: AddSupplierGroupSuppliersToSupplierGroup successful."
  ],
  "ResultCount": 1,
  "SupplierGroup": {
    "ID": 201967,
    "Name": "Top Supplier Group",
    "Completes": 0,
    "Screens": 0,
    "AllocationPercentage": 0.1,
    "CPI": null,
    "IsHedgeAccess": true,
    "Suppliers": [
      {
        "SupplierCode": "1010",
        "Completes": 0,
        "Screens": 0
      },
     ]
  }
}

Adds suppliers to the specified supplier group.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierGroupID int true Unique ID for Supplier Group.

GET Show a Group

Definition

GET  https://api.samplicio.us/Demand/v1/SupplierGroups/BySurveyNumber/{SurveyNumber}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/SupplierGroups/BySurveyNumber/{SurveyNumber}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierGroups/BySurveyNumber/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Demand/v1/SupplierGroups/BySurveyNumber/{SurveyNumber}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SupplierGroups/BySurveyNumber/{SurveyNumber}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierGroups/BySurveyNumber/{SurveyNumber}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierGroups/BySurveyNumber/{SurveyNumber}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetAllWithSuppliersBySurveyNumber successful."
  ],
  "ResultCount": 2,
  "SupplierGroups": [
    {
      "ID": 001100,
      "Name": "Top Supplier Group",
      "Completes": 0,
      "Screens": 0,
      "AllocationPercentage": 0.1,
      "CPI": null,
      "IsHedgeAccess": true,
      "Suppliers": [
        {
          "SupplierCode": "1010",
          "Completes": 0,
          "Screens": 0
        }
      ]
    },
    {
      "ID": 001001,
      "Name": "The Gremlins",
      "Completes": 0,
      "Screens": 0,
      "AllocationPercentage": 0.15,
      "CPI": null,
      "IsHedgeAccess": true,
      "Suppliers": [
      {
          "SupplierCode": "1010",
          "Completes": 0,
          "Screens": 0
        }
      ]
    }
  ]
}

Returns the supplier groups for the survey specified.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.

PUT Remove from a Group

Definition

PUT  https://api.samplicio.us/Demand/v1/SupplierGroups/RemoveSuppliersFromGroup/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X PUT  --data '{"SupplierCode": "1010"}' https://api.samplicio.us/Demand/v1/SupplierGroups/RemoveSuppliersFromGroup/{SurveyNumber}

require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierGroups/RemoveSuppliersFromGroup/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {SupplierCode: '1010'}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)



<?php

$curl = curl_init();

$params = '{"SupplierLinkTypeCode": "OWS","TrackingTypeCode": "NONE","DefaultLink": "","SuccessLink": "","FailureLink": "","OverQuotaLink": "","QualityTerminationLink": ""}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierGroups/RemoveSuppliersFromGroup/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/SupplierGroups/RemoveSuppliersFromGroup/{SurveyNumber}'
params = {'SupplierCode': '1010'}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.put(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierGroups/RemoveSuppliersFromGroup/{SurveyNumber}");

string args = @"{""SupplierCode"": 1010}";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
        {
            streamWriter.Write(args);
            streamWriter.Flush();
            streamWriter.Close();
        }

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierGroups/RemoveSuppliersFromGroup/{SurveyNumber}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
    "SupplierCode": "1010",
};

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response


{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: RemoveSupplierGroupSuppliersFromSupplierGroups successful."
  ],
  "ResultCount": 0,
  "SupplierGroup": {
    "ID": null,
    "Name": null,
    "Completes": null,
    "Screens": null,
    "AllocationPercentage": null,
    "CPI": null,
    "IsHedgeAccess": null,
    "Suppliers": null
  }
}

Removes specified suppliers from their supplier group.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierGroupID int true Unique ID for Supplier Group.

Non-Marketplace Allocations

Non-Marketplace Allocations allow you to add a specific supplier to your survey. These allocations are separate from the Cint Marketplace and are sometimes referred to as Services. This resource allows you to create, update, delete, and retrieve a supplier allocation. You can also specify a TCPI (targeted CPI) and allocate a desired number of completes to each supplier.

Supplier Allocations Model

Property Type Description
SupplierCode int Unique code associated with a supplier account.
AllocationPercentage double Percentage of total completes allocated to supplier, expressed as a decimal from 0 to 1.
TCPI double Gross payout per targeted complete.
HedgeAccess boolean Enables or disables hedge access for the supplier.
BlockRouterTraffic boolean Enables or disables router traffic for the supplier.
SupplierSurveyID string Survey supplier ID (SSID).
Prescreens int Number of prescreens achieved by the supplier. A prescreen is a respondent who enters the client survey.
Completes int Number of completes achieved by the supplier.
AllocationRemaining int Number of completes allocated only to the supplier.
HedgeRemaining int Number of unallocated completes available to any suppliers with access to hedge.
TotalRemaining int Total number of completes available to the supplier (aggregate of allocation and hedge remaining
Target array Contains an array of elements described below

Target Model

Property Type Description
SupplierLinkTypeCode string Defines the type of buyer-supplier engagement and the respondent’s path in Cint Marketplace. See List Global Definitions for a map of supplier link types.
TrackingTypeCode string Defines how Marketplace should communicate back to the supplier’s system at the end of a session. The options are:
NONE (Default and recommended, physically redirects the respondent back to the supplier system)
PIXEL (pixel tracking)
S2S (server to server postback)
DefaultLink string Tracking code or link used if none of the below apply. This will typically be the same as the FailureLink
SuccessLink string Tracking code or link used after a completion.
FailureLink string Tracking code or link used after a termination.
OverQuotaLink string Tracking code or link used after an overquota.
QualityTerminationLink string Tracking code or link used after a quality (security) termination.
LiveLink string Live supplier-specific respondent entry link generated by Cint Marketplace.
TestLink string Test supplier-specific respondent entry link generated by Cint Marketplace.

GET Show Allocations

Definition

GET  https://api.samplicio.us/Demand/v1/SupplierAllocations/BySurveyNumber/{SurveyNumber}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/SupplierAllocations/BySurveyNumber/{SurveyNumber}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierAllocations/BySurveyNumber/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Demand/v1/SupplierAllocations/BySurveyNumber/{SurveyNumber}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SupplierAllocations/BySurveyNumber/{SurveyNumber}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierAllocations/BySurveyNumber/{SurveyNumber}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierAllocations/BySurveyNumber/{SurveyNumber}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 1,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetAllSupplierAllocationsBySurveyNumber successful."
  ],
  "ResultCount": 1,
  "SupplierAllocations": [
    {
      "SupplierCode": "1010",
      "AllocationPercentage": 0,
      "TCPI": 11,
      "HedgeAccess": true,
      "BlockRouterTraffic": false,
      "SupplierSurveyID": null,
      "Prescreens": 183,
      "Completes": 4,
      "AllocationRemaining": 0,
      "HedgeRemaining": 695,
      "TotalRemaining": 695,
      "Target": null
    }
  ]
}

Returns the supplier allocations for the survey specified.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.

POST Create an Allocation

Definition

POST  https://api.samplicio.us/Demand/v1/SupplierAllocations/Create/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"SupplierCode": "1010", "AllocationPercentage": 0.1, "TCPI": 2, "HedgeAccess": true, "BlockRouterTraffic": false,}' https://api.samplicio.us/Demand/v1/SupplierAllocations/Create/{SurveyNumber}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierAllocations/Create/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {SupplierCode: "1010", AllocationPercentage: 0.1, TCPI: 2, HedgeAccess: true, BlockRouterTraffic: false}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SupplierCode": "1010", "AllocationPercentage": 0.1, "TCPI": 2, "HedgeAccess": true, "BlockRouterTraffic": false}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierAllocations/Create/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/SupplierAllocations/Create/{SurveyNumber}'
params = {'SupplierCode': '1010', 'AllocationPercentage': 0.1, 'TCPI': 2, 'HedgeAccess': True, 'BlockRouterTraffic': False}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierAllocations/Create/{SurveyNumber}");

string args = @"{
                   ""SupplierCode"": ""1010"",
                   ""AllocationPercentage"": 0.1,
                   ""TCPI"": 2,
                   ""HedgeAccess"": true,
                   ""BlockRouterTraffic"": false
                 }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierAllocations/Create/{SurveyNumber}/{SupplierCode}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
  "SupplierCode": "1010",
    "AllocationPercentage": 0.1,
    "TCPI": 2,
    "HedgeAccess": true,
    "BlockRouterTraffic": false
};

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
    "ApiResult": 0,
    "ApiResultCode": 0,
    "ApiAccount": "Anon",
    "AccountType": 1,
    "ApiAccountStatus": 1,
    "AccountCode": "AA",
    "ApiMessages": [
        "API Message: Response initialized.",
        "API Message: CreateSupplierAllocationFromModel successful."
    ],
    "ResultCount": 1,
    "SupplierAllocation": {
        "SupplierCode": "1010",
        "AllocationPercentage": 0.1,
        "TCPI": 2,
        "HedgeAccess": true,
        "BlockRouterTraffic": false,
        "SupplierSurveyID": null,
        "Prescreens": null,
        "Completes": null,
        "AllocationRemaining": null,
        "HedgeRemaining": null,
        "TotalRemaining": null,
        "Target": null
    }
}

Creates supplier allocations for an existing Marketplace survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with a supplier account.
AllocationPercentage double false Percentage of total completes allocated to supplier, expressed as a decimal from 0 to 1.
TCPI double true Over-the-counter cost per supplier complete.
HedgeAccess boolean false Indicates if hedge access is enabled for the supplier.
BlockRouterTraffic string false Indicates if router traffic is enabled for the supplier.

PUT Update an Allocation

Definition

PUT  https://api.samplicio.us/Demand/v1/SupplierAllocations/Update/{SurveyNumber}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X PUT --data '{"SupplierCode": "1010", "AllocationPercentage": 0.1, "TCPI": 2, "HedgeAccess": true, "BlockRouterTraffic": false,}' https://api.samplicio.us/Demand/v1/SupplierAllocations/Update/{SurveyNumber}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierAllocations/Update/{SurveyNumber}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {SupplierCode: "1010", AllocationPercentage: 0.1, TCPI: 2, HedgeAccess: true, BlockRouterTraffic: false}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SupplierCode": "1010", "AllocationPercentage": 0.1, "TCPI": 2, "HedgeAccess": true, "BlockRouterTraffic": false}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierAllocations/Update/{SurveyNumber}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/SupplierAllocations/Update/{SurveyNumber}'
params = {'SupplierCode': '1010', 'AllocationPercentage': 0.1, 'TCPI': 2, 'HedgeAccess': True, 'BlockRouterTraffic': False}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

supplierLink = requests.put(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierAllocations/Update/{SurveyNumber}");

string args = @"{
                   ""SupplierCode"": ""1010"",
                   ""AllocationPercentage"": 0.1,
                   ""TCPI"": 2,
                   ""HedgeAccess"": true,
                   ""BlockRouterTraffic"": false
                 }";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierAllocations/Update/{SurveyNumber}/{SupplierCode}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
  "SupplierCode": "1010",
    "AllocationPercentage": 0.1,
    "TCPI": 2,
    "HedgeAccess": true,
    "BlockRouterTraffic": false
};

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 1,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: UpdateSupplierAllocationFromModel successful."
  ],
  "ResultCount": 1,
  "SupplierAllocation": {
    "SupplierCode": "1010",
    "AllocationPercentage": 0.1,
    "TCPI": 2,
    "HedgeAccess": true,
    "BlockRouterTraffic": false,
    "SupplierSurveyID": null,
    "Prescreens": 0,
    "Completes": 0,
    "AllocationRemaining": 1,
    "HedgeRemaining": 2,
    "TotalRemaining": 3,
    "Target": null
  }
}

Creates supplier allocations for an existing Marketplace survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with a supplier account.
AllocationPercentage double false Percentage of total completes allocated to supplier, expressed as a decimal from 0 to 1.
TCPI double true Over-the-counter cost per supplier complete.
HedgeAccess boolean false Indicates if hedge access is enabled for the supplier.
BlockRouterTraffic string false Indicates if router traffic is enabled for the supplier.

DELETE Delete an Allocation

Definition

DELETE  https://api.samplicio.us/Demand/v1/SupplierAllocations/Delete/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" -X DELETE https://api.samplicio.us/Demand/v1/SupplierAllocations/Delete/{SurveyNumber}/{SupplierCode}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierAllocations/Delete/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Delete.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

http.request(request)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierAllocations/Delete/{SurveyNumber}/{SupplierCode}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
    CURLOPT_HTTPHEADER => array('Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
));

curl_exec($curl);
curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SupplierAllocations/Delete/{SurveyNumber}/{SupplierCode}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.delete(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierAllocations/Delete/{SurveyNumber}/{SupplierCode}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

request.Method = "DELETE";

request.GetResponse();
const https = require('https');

var options = {
  "method": "DELETE",
  "hostname": "stg-api.samplicio.us",
  "path": "/Demand/v1/SupplierAllocations/Delete/{SurveyNumber}/{SupplierCode}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options);

request.end();

Deletes a supplier allocation for an existing Marketplace survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with a supplier account.

Non-Marketplace Entry Links

The Non-Marketplace Entry Link resource allows the buyer to create, update, and delete supplier links (targets) on non-marketplace allocations.

Supplier Allocation Model

Property Type Description
SupplierCode string Unique code associated with a supplier account.
AllocationPercentage double Percentage of total completes allocated to supplier, expressed as a decimal from 0 to 1.
TCPI double Over-the-counter cost per supplier complete.
HedgeAccess string Indicates if hedge access is enabled for the supplier (true, false).
BlockRouterTraffic string Indicates if router traffic is enabled for the supplier (true, false).
SupplierSurveyID int 36 digit hex GUID that identifies a supplier.
Prescreens int Number of prescreens achieved by the supplier. A prescreen is a respondent who enters the client survey.
Completes int Number of completes achieved by the supplier.
AllocationRemaining int Number of completes allocated only to the supplier.
HedgeRemaining int Number of unallocated completes available to any suppliers with access to hedge.
TotalRemaining int Total number of completes available to the supplier (aggregate of allocation and hedge remaining properties).
Target array Contains array of elements described below.

Target Model

Property Type Description
SupplierLinkTypeCode string Defines the type of buyer-supplier engagement and the respondent’s path in Cint Marketplace.
TrackingTypeCode string Defines how Cint Marketplace should communicate back to the supplier’s system at the end of a session.
NONE (Default and recommended, physically redirects the respondent back to the supplier system)
PIXEL (pixel tracking)
S2S (server to server postback)
DefaultLink string Tracking code or link used if none of the below apply.
SuccessLink string Tracking code or link used after a completion.
FailureLink string Tracking code or link used after a termination.
OverQuotaLink string Tracking code or link used after an overquota.
QualityTerminationLink string Tracking code or link used after a quality (security) termination.
LiveLink string Live supplier-specific respondent entry link generated by Cint Marketplace.
TestLink string Test supplier-specific respondent entry link generated by Cint Marketplace.

POST Create a Link

Definition

POST  https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Create/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"SupplierLinkTypeCode": "TS", "TrackingTypeCode": "NONE"}' https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Create/{SurveyNumber}/{SupplierCode}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Create/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {SupplierLinkTypeCode:"TS",TrackingTypeCode:"NONE"}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SupplierLinkTypeCode": "TS","TrackingTypeCode": "NONE"}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Create/{SurveyNumber}/{SupplierCode}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Create/{SurveyNumber}/{SupplierCode}'
params = {'SupplierLinkTypeCode':'TS','TrackingTypeCode':'NONE'}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Create/{SurveyNumber}/{SupplierCode}");

string args = @"{
                  ""SupplierLinkTypeCode"":""TS"",
                  ""TrackingTypeCode"":""NONE""
                }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierAllocations/Targets/Create/{SurveyNumber}/{SupplierCode}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
    "SupplierLinkTypeCode":"TS",
    "TrackingTypeCode":"NONE"
};

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });
});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: CreateSupplierAllocationTargetFromModel successful."
  ],
  "ResultCount": 1,
  "SupplierAllocation": {
    "SupplierCode": "1010",
    "AllocationPercentage": 0,
    "TCPI": 5,
    "HedgeAccess": true,
    "BlockRouterTraffic": false,
    "SupplierSurveyID": "",
    "Prescreens": 0,
    "Completes": 0,
    "AllocationRemaining": 0,
    "HedgeRemaining": 15,
    "TotalRemaining": 15,
    "Target": {
      "SupplierLinkTypeCode": "TS",
      "TrackingTypeCode": "NONE",
      "DefaultLink": "https:\/\/www.anon.com\/surveys?v=1&fs=1&uid=[%MID%]",
      "SuccessLink": "https:\/\/www.anon.com\/surveys?v=1&fs=2&uid=[%MID%]&COST=[%COST%]",
      "FailureLink": "https:\/\/www.anon.com\/surveys?v=1&fs=1&uid=[%MID%]",
      "OverQuotaLink": "https:\/\/www.anon.com\/surveys?v=1&fs=1&uid=[%MID%]",
      "QualityTerminationLink": "https:\/\/www.anon.com\/surveys?v=1&fs=1&uid=[%MID%]",
      "LiveLink": "https:\/\/samplicio.us\/s\/default.aspx?SID=52c975a7-15fb-804d-9bd2-3d5d553aa7af&PID=",
      "TestLink": "https:\/ \/samplicio.us\/s\/default.aspx?SID=a948gef7-3591-42c0-ce51-0e4xdf25582f&FIRID=MSDHONI7&SUMSTAT=1&PID=test"
    }
  }
}

Creates target links for suppliers with an allocation for a Marketplace survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with a supplier account.
SupplierLinkTypeCode int true Defines the type of buyer-supplier engagement and the respondent’s path in Cint Marketplace.
TrackingTypeCode int true Defines how Marketplace should communicate back to the supplier’s system at the end of a session. The options are:
NONE (Default and recommended, physically redirects the respondent back to the supplier system)
PIXEL (pixel tracking)
S2S (server to server postback)

Definition

PUT  https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Update/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X PUT  --data '{"SupplierLinkTypeCode": "TS", "TrackingTypeCode": "NONE", "DefaultLink":"","SuccessLink":"","FailureLink":"","OverQuotaLink":"","QualityTerminationLink":""}' https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Update/{SurveyNumber}/{SupplierCode}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Update/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {SupplierLinkTypeCode:"TS",TrackingTypeCode:"NONE",DefaultLink:"",SuccessLink:"",FailureLink:"",OverQuotaLink:"",QualityTerminationLink:""}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SupplierLinkTypeCode": "TS","TrackingTypeCode": "NONE","DefaultLink": "","SuccessLink": "","FailureLink": "","OverQuotaLink": "","QualityTerminationLink": ""}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Update/{SurveyNumber}/{SupplierCode}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Update/{SurveyNumber}/{SupplierCode}'
params = {'SupplierLinkTypeCode':'TS','TrackingTypeCode':'NONE','DefaultLink':'','SuccessLink':'','FailureLink':'','OverQuotaLink':'','QualityTerminationLink':''}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.put(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Update/{SurveyNumber}/{SupplierCode}");

string args = @"{
                  ""SupplierLinkTypeCode"":""TS"",
                  ""TrackingTypeCode"":""NONE"",
                  ""DefaultLink"":"""",
                  ""SuccessLink"":"""",
                  ""FailureLink"":"""",
                  ""OverQuotaLink"":"""",
                  ""QualityTerminationLink"":""""
                }";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
        {
            streamWriter.Write(args);
            streamWriter.Flush();
            streamWriter.Close();
        }

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierAllocations/Targets/Update/{SurveyNumber}/{SupplierCode}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
    "SupplierLinkTypeCode":"TS",
    "TrackingTypeCode":"NONE",
    "DefaultLink":"",
    "SuccessLink":"",
    "FailureLink":"",
    "OverQuotaLink": "",
    "QualityTerminationLink":""
};

var params = JSON.stringify(json);

var request = https.request(options, function (updatedSupplierLink) {
  var chunks = [];

  updatedSupplierLink.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Updates existing supplier target links.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with a supplier account.
SupplierLinkTypeCode string true Defines the type of buyer-supplier engagement and the respondent’s path in Cint Marketplace.
TrackingTypeCode int true Defines how Marketplace should communicate back to the supplier’s system at the end of a session. The options are:
NONE (Default and recommended, physically redirects the respondent back to the supplier system)
PIXEL (pixel tracking)
S2S (server to server postback)
DefaultLink string true Tracking code or link used if none of the below apply.
SuccessLink string true Tracking code or link used after a completion.
FailureLink string true Tracking code or link used after a termination.
OverQuotaLink string true Tracking code or link used after an overquota.
QualityTerminationLink string true Tracking code or link used after a quality (security) termination.

Definition

DELETE  https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Delete/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" -X DELETE https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Delete/{SurveyNumber}/{SupplierCode}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Delete/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Delete.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

http.request(request)
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Delete/{SurveyNumber}/{SupplierCode}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
));

curl_exec($curl);
curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Delete/{SurveyNumber}/{SupplierCode}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.delete(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SupplierAllocations/Targets/Delete/{SurveyNumber}/{SupplierCode}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

request.Method = "DELETE";

request.GetResponse();
const https = require('https');

var options = {
  "method": "DELETE",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SupplierAllocations/Targets/Delete/{SurveyNumber}/{SupplierCode}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options);

request.end();

Deletes target links for a supplier allocated to a Marketplace survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with a supplier account.

Recontact

Recontacts allow buyers to collect a follow-up impression on a respondent they have already interacted with or already have knowledge of.

SurveyQualifiedRespondents Model

Property Type Description
IsActive boolean Indicates whether a respondent qualifies for the recontact.
PID string A supplier’s unique respondent identifier.

GET List Qualified Respondents

Definition

GET  https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/BySurveyNumberSupplierCode/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/BySurveyNumberSupplierCode/{SurveyNumber}/{SupplierCode}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/BySurveyNumberSupplierCode/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/BySurveyNumberSupplierCode/{SurveyNumber}/{SupplierCode}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/BySurveyNumberSupplierCode/{SurveyNumber}/{SupplierCode}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/BySurveyNumberSupplierCode/{SurveyNumber}/{SupplierCode}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyQualifiedRespondents/BySurveyNumberSupplierCode/{SurveyNumber}/{SupplierCode}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 1,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: SurveyQualifiedRespondentsBySurveyNumberSupplierCode successful."
  ],
  "ResultCount": 2,
  "SurveyQualifiedRespondents": [
    {
      "PID": "1110111",
      "IsActive": true
    },
    {
      "PID": "1110110",
      "IsActive": true
    },
  ]
}

Returns a list of qualified respondents for a specified recontact study and supplier by PID.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with a supplier account.

PUT Update Qualified Respondents

Definition

PUT  https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/Update/{SurveyNumber}/{SupplierCode}

Example Request

curl -H "Content-Type: application/json"  -H "Authorization: YOUR_API_KEY_HERE" -X PUT  --data '{"SurveyQualifiedRespondents":[{"IsActive": true,"PID": "0001110"},]}' https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/Update/{SurveyNumber}/{SupplierCode}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/Update/{SurveyNumber}/{SupplierCode}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {
                  SurveyQualifiedRespondents:
                  [
                    {
                      IsActive: true,
                      PID: '0001110'
                    },
                  ]
                }.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{
              "SurveyQualifiedRespondents":
              [
                {
                  "IsActive": true,
                  "PID": "0001110"
                },
              ]
            }';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/Update/{SurveyNumber}/{SupplierCode}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/Update/{SurveyNumber}/{SupplierCode}'
params = {
            'SurveyQualifiedRespondents':
            [
              {
                'IsActive': True,
                'PID': '0001110'
              },
            ]
          }

data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.put(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyQualifiedRespondents/Update/{SurveyNumber}/{SupplierCode}");

string args = @"{
                  ""SurveyQualifiedRespondents"":
                  [
                    {
                       ""IsActive"": true,
                       ""PID"": ""0001110""
                    },
                  ]
                }";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyQualifiedRespondents/Update/{SurveyNumber}/{SupplierCode}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
              "SurveyQualifiedRespondents":
              [
                {
                  "IsActive": true,
                  "PID": "0001110"
                },
              ]
            };

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: UpdateSurveyQualifiedRespondentsBySurveyNumberSupplierCode successful."
  ],
  "ResultCount": 1,
  "SurveyQualifiedRespondents": [
    {
      "PID": "1234",
      "IsActive": true
    },
  ]
}

Updates the list of PIDs that qualify for a recontact survey.

Arguments

Property Type Required Description
SurveyNumber int true Unique number associated with the survey.
SupplierCode string true Unique code associated with a supplier account.
IsActive boolean true Should the respondent still qualify?
PID string true Persistent panelist identifier used by the supplier.

Reports

Reports allows the buyer to generate a cost summary report for a set of their surveys. For more information, please visit our Support Site.

Response Model

Property Data Type Description
end_date datetime Latest date of data included. (RFC-3339 Format)
generated_on datetime Date the summary was generated on. (RFC-3339 Format)
po_number string Purchaser order number.
start_date datetime Earliest date of data included. (RFC-3339 Format)
summary object Summary model JSON object that includes totals for all survey IDs specified in request.
surveys array Array of Surveys model JSON objects for each survey specified in the request

Summary Model

Property Data Type Description
buyer_commissions float Total commissions amount from the Surveys
buyer_fees float Total fees amount from the Surveys
buyside_commission_adjustments float Total commissions adjusted from the Surveys
buyside_fee_adjustments float Total fees adjusted from the Surveys
completes int Total complete counts from the Surveys
currency string Currency the report is being calculated in
other_costs float Total other costs from the Surveys
sample_cost float Total sample CPI costs from the Surveys
sample_cost_adjustments float Total sample CPI costs adjusted from the Surveys
total_cost float Total cost of all sample, fees, commissions, others and any adjustments for all surveys.

Surveys Model

Property Data Type Description
buyer_commissions float Commission amount from the survey
buyer_fees float Fee amount from the survey
buyside_commission_adjustments float Commission adjusted from the survey
buyside_fee_adjustments float Fee adjusted from the survey
completes int Complete count from the survey
currency string Currency the survey is being calculated in
other_costs float Other costs from the survey
sample_cost float Sample CPI costs from the survey
sample_cost_adjustments float Sample CPI costs adjusted from the survey
survey_id int Survey id
total_cost float Cost of all sample, fees, commissions, others and any adjustments for the survey.

POST Create a financial cost summary report JSON object

Definition

POST  https://api.samplicio.us/v1/reports/surveys/financesummary.json

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"survey_ids": ["1","2","3"],"po_number": "ABCD1234","start_date": "2020-09-01","end_date": "2020-10-01"}' https://api.samplicio.us/v1/reports/surveys/financesummary.json
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/v1/reports/surveys/financesummary.json')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {
    "survey_ids"=> ["1","2","3"],
    "po_number"=> "ABCD1234",
    "start_date"=> "2020-09-01",
    "end_date"=> "2020-10-01"
 }.to_json

 request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{
    "survey_ids": ["1","2","3"],
    "po_number": "ABCD1234",
    "start_date": "2020-09-01",
    "end_date": "2020-10-01"
 }';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/v1/reports/surveys/financesummary.json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/v1/reports/surveys/financesummary.json'
params = {
    "survey_ids": ["1","2","3"],
    "po_number": 11,
    "start_date": "2020-09-01",
    "end_date": "2020-10-01"
 }
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/v1/reports/surveys/financesummary.json");

string args = @"{
                    ""survey_ids"": [""1"",""2"",""3""],
                    ""po_number"": ABCD1234,
                    ""start_Date"": ""2020-09-01"",
                    ""end_date"": ""2020-10-01""
                }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/v1/reports/surveys/financesummary.json",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
    "survey_ids": "01",
    "po_number": "ABCD1234,
    "start_date": "2020-09-01",
    "end_date": "2020-10-01"
 };

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
    "end_date": "2020-10-01T23:59:59-06:00",
    "generated_on": "2020-10-22T10:03:00-06:00",
    "po_number": "ABCD1234",
    "start_date": "2020-09-01T00:00:00-06:00",
    "summary": {
        "buyer_commissions": "0.00",
        "buyer_fees": "0.00",
        "buyside_commission_adjustments": "0.00",
        "buyside_fee_adjustments": "0.00",
        "completes": 0,
        "currency": "USD",
        "other_costs": "0.00",
        "sample_cost": "0.00",
        "sample_cost_adjustments": "0.00",
        "total_cost": "0.00"
    },
    "surveys": [
        {
            "buyer_commissions": "0.00",
            "buyer_fees": "0.00",
            "buyside_commission_adjustments": "0.00",
            "buyside_fee_adjustments": "0.00",
            "completes": 0,
            "currency": "USD",
            "other_costs": "0.00",
            "sample_cost": "0.00",
            "sample_cost_adjustments": "0.00",
            "survey_id": 7673902,
            "total_cost": "0.00"
        }
    ]
}

Generates a cost summary report in JSON format.

Arguments

Property Type Required Description
survey_ids array true A comma-separated list of survey IDs to include in the cost summary report. Maximum 200 IDs.
po_number string false Purchaser order number. A label or name to attach to the generated report limited to 64 characters.
start_date string false Earliest date to generate summary for. (RFC-3339 Format, Limited to the YYYY-MM-DD)
end_date string false Latest date to generate summary for. (RFC-3339 Format, Limited to the YYYY-MM-DD)

POST Create a financial cost summary report PDF

Definition

POST  https://api.samplicio.us/v1/reports/surveys/financesummary.pdf

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"survey_ids": ["1","2","3"],"po_number": "ABCD1234","start_date": "2020-09-01","end_date": "2020-10-01"}' https://api.samplicio.us/v1/reports/surveys/financesummary.pdf
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/v1/reports/surveys/financesummary.pdf')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {
    "survey_ids"=> ["1","2","3"],
    "po_number"=> "ABCD1234",
    "start_date"=> "2020-09-01",
    "end_date"=> "2020-10-01"
 }.to_json

 request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{
    "survey_ids": ["1","2","3"],
    "po_number": "ABCD1234",
    "start_date": "2020-09-01",
    "end_date": "2020-10-01"
 }';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/v1/reports/surveys/financesummary.pdf",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/v1/reports/surveys/financesummary.pdf'
params = {
    "survey_ids": ["1","2","3"],
    "po_number": 11,
    "start_date": "2020-09-01",
    "end_date": "2020-10-01"
 }
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)
using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/v1/reports/surveys/financesummary.pdf");

string args = @"{
                    ""survey_ids"": [""1"",""2"",""3""],
                    ""po_number"": ABCD1234,
                    ""start_Date"": ""2020-09-01"",
                    ""end_date"": ""2020-10-01""
                }";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/v1/reports/surveys/financesummary.pdf",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
    "survey_ids": "01",
    "po_number": "ABCD1234,
    "start_date": "2020-09-01",
    "end_date": "2020-10-01"
 };

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

"application/pdf"

Generates a cost summary report in PDF format.

Arguments

Property Type Required Description
survey_ids array true A comma-separated list of survey IDs to include in the cost summary report. Maximum 200 IDs.
po_number string false Purchaser order number. A label or name to attach to the generated report limited to 64 characters.
start_date string false Earliest date to generate summary for. (RFC-3339 Format, Limited to the YYYY-MM-DD)
end_date string false Latest date to generate summary for. (RFC-3339 Format, Limited to the YYYY-MM-DD)

Survey Groups

Survey Groups Model

The Surveys Groups resource allows the buyer to list existing survey groups, see details of a survey group, create survey groups, add and remove surveys from a survey group.

Property Type Description
ID int Unique survey group identifier.
Name string Name of the survey group. This value is not unique across surveys. Maximum length of 200.
SurveyCount int Number of surveys in the survey group.

Survey Group Model

The Survey Group allows the buyer to view surveys in a survey group.

Property Type Description
SurveyIds array Unique IDs associated with the survey.

GET List Survey Groups

Definition

GET  https://api.samplicio.us/Demand/v1/SurveyGroups/

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/SurveyGroups/
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyGroups/')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php

$URL = "https://api.samplicio.us/Demand/v1/SurveyGroups/";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);

?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SurveyGroups/'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)

using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyGroups/");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyGroups",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetSurveyGroups successful."
  ],
  "ResultCount": 2,
  "SurveyGroups": [
    {
      "ID": 10001,
      "Name": "Local Group",
      "SurveyCount": 38
    },
    {
      "ID": 10101,
      "Name": "Neighbor Group",
      "SurveyCount": 12
    }
  ]
}

Returns the survey groups, their IDs, and number of surveys within each. This endpoint must end in a trailing slash or it will redirect you to http due to a bug in an underlying framework.

GET Show a Survey Group

Definition

GET  https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}
require 'net/http'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)  
<?php
$URL = "https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}";

$aHTTP['http']['method']  = 'GET';

$aHTTP['http']['header']  = "Authorization: YOUR_API_KEY_HERE";

$context = stream_context_create($aHTTP);

$response = file_get_contents($URL, false, $context);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}'

headers = {'Authorization' : YOUR_API_KEY_HERE}

response = requests.get(url, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}");

request.Headers.Add("Authorization", YOUR_API_KEY_HERE);

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "GET",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyGroups/{SurveyGroupID}",
  "headers": {'Authorization': YOUR_API_KEY_HERE}
};

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetSurveyGroupBySurveyGroupID successful."
  ],
  "ResultCount": 2,
  "SurveyIDs": [
    123456,
    654321
  ]
}

Returns the survey IDs for the survey group specified.

POST Create a Survey Group

Definition

POST  https://api.samplicio.us/Demand/v1/SurveyGroups/

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"Name": "Group 1"}' https://api.samplicio.us/Demand/v1/SurveyGroups/
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyGroups/')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Post.new(FullUriPath, initheader = {'Content-Type' => 'application/json'})

request.body = {Name:"Group 1"}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

<?php
$curl = curl_init();

$params = '{"Name":"Group 1"}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SurveyGroups/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SurveyGroups/'
params = {'Name':'Group 1'}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}
response = requests.post(url, data=data, headers=headers)

using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyGroups/");

string args = @"{""Name"":""Group 1""}";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");


using(StreamWriter streamWriter = new StreamWriter(request.
RequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();

const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "Demand/v1/SurveyGroups/",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {
  "Name":"Group 1"
}

var params = JSON.stringify(json);

var request = https.request(options, function (createGroup) {
  var chunks = [];

  createGroup.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: InsertSurveyGroup successful."
  ],
  "ResultCount": 0,
  "SurveyGroup": {
    "ID": 18096,
    "SID": "AA11AA22-A111-CCDD-5F66-123456D11",
    "Name": "Group 1",
    "Description": "",
    "LK_RecordStatusID": true,
    "LK_SurveyGroupTypeID": 1
  }
}

Creates an empty survey group.

Arguments

Property Type Required Description
Name string true Survey Group name. Maximum 200 characters.

POST Add to Survey Group

Definition

POST  https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"SurveyIDs": ["101101"]}' https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {SurveyIDs: ["101101"]}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SurveyIDs": ["101101"]}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}'
params = {'SurveyIDs': 101101}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data=data, headers=headers)

using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}");

string args = @"{""SurveyIDs"": ["101101"]}";

request.Method = "POST";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "POST",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyGroups/{SurveyGroupID}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {"SurveyIDs": ["101101"]
  }

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: InsertSurveyGroupSurveys successful."
  ],
  "ResultCount": 1,
  "SurveyIDs": [
    101101
  ]
}

Adds a survey to the specified survey group.

Arguments

Property Type Required Description
SurveyIDs array true Unique ID associated with the survey.

PUT Update a Group

Definition

PUT  https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X PUT --data '{"SurveyIDs":["001100"]}' https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Put.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {"SurveyIDs":["001100"]}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{"SurveyIDs":["001100"]}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>
import requests, json

url = 'https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}'
params = {'SurveyIDs':['001100']}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.put(url, data=data, headers=headers)

using System.IO;
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}");

string args = @"{"SurveyIDs":["001100"]}";

request.Method = "PUT";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

WebResponse response = request.GetResponse();
const https = require('https');

var options = {
  "method": "PUT",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyGroups/{SurveyGroupID}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {"SurveyIDs":["001100"]}

var params = JSON.stringify(json);

var request = https.request(options, function (response) {
  var chunks = [];

  response.on("data", function (chunk) {
    chunks.push(chunk);
  });

});

request.write(params);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: GetSurveyGroupBySurveyGroupID successful."
  ],
  "ResultCount": 1,
  "SurveyIDs": [
    001100
  ]
}

Updates a survey group with the specified surveys.

Arguments

Property Type Required Description
SurveyIDs array true Unique ID associated with the survey.

DELETE Remove from a Survey Group

Definition

DELETE  https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}

Example Request

curl -H "Authorization: YOUR_API_KEY_HERE" -X DELETE --data '{"SurveyIDs": ["101101"]}' https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

request = Net::HTTP::Delete.new(uri.request_uri)

request.body = {SurveyIDs: 101101}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php

$curl = curl_init();

$params = '{"SurveyIDs": ["101101"]}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => "",
));

curl_exec($curl);
curl_close($curl);
?>
import requests

url = 'https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}'
params = {'SurveyIDs': 101101}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.delete(url, data=data, headers=headers)
using System.Net;

WebRequest request = WebRequest.Create("https://api.samplicio.us/Demand/v1/SurveyGroups/{SurveyGroupID}");

string args = @"{""SurveyIDs"": [101101]}";

request.Method = "DELETE";
request.ContentType = "application/json";
request.Headers.Add("Authorization", "YOUR_API_KEY_HERE");

using(StreamWriter streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(args);
streamWriter.Flush();
streamWriter.Close();
}

request.GetResponse();
const https = require('https');

var options = {
  "method": "DELETE",
  "hostname": "api.samplicio.us",
  "path": "/Demand/v1/SurveyGroups/{SurveyGroupID}",
  "headers": {'Content-Type': 'application/json',
  'Authorization': 'YOUR_API_KEY_HERE'
  }
};

var json = {"SurveyIDs": ["101101"]
  }

var params = JSON.stringify(json);

var request = https.request(options);

request.end();

Example Response

{
  "ApiResult": 0,
  "ApiResultCode": 0,
  "ApiAccount": "Anon",
  "AccountType": 2,
  "ApiAccountStatus": 1,
  "AccountCode": "AA",
  "ApiMessages": [
    "API Message: Response initialized.",
    "API Message: DeleteSurveyGroupSurveys successful."
  ],
  "ResultCount": 0,
  "SurveyIDs": []
}

Deletes the surveyID from the specified survey group.

Arguments

Property Type Required Description
SurveyIDs array true Unique ID associated with the survey.

Beta - Demand Integration

Reach v1

The Reach estimator tool allows you to specify a target and returns the expected number of completes for that target. There are two supported versions of the API. Whilst they provide very similar results the changes made in v2 were designed to allow greater accuracy in predictions and its usage is recommended.

POST Target Estimate (v1)

Definition

POST https://api.samplicio.us/demand/v2-beta/reach/audience-estimate

Example Request

curl -H "Content-Type: application/json" -H "Authorization: YOUR_API_KEY_HERE" -X POST --data '{"qualifications": [{"question_id": 42, "condition": "18" },{"question_id": 42, "condition": "19" },{"question_id": 42, "condition": "20" },{"question_id": 42, "condition": "21" },{"question_id": 42, "condition": "22" },{"question_id": 42, "condition": "23" },{"question_id": 42, "condition": "24" },{"question_id": 42, "condition": "25" },{"question_id": 43, "condition": "2" }],"completes": 500,"days": 7,"length_of_interview": 10,"incidence_rate": 0.5,"price_ceiling": 1.5, "locale": "eng_us"}' https://api.samplicio.us/demand/v2-beta/reach/audience-estimate
require 'net/http'
require 'json'

uri = URI('https://api.samplicio.us/demand/v2-beta/reach/audience-estimate')

http = Net::HTTP.new(uri.host, uri.port)

http.use_ssl = true

fullUriPath = uri.path + '?' + uri.query

request = Net::HTTP::Post.new(fullUriPath, initheader = {'Content-Type' =>'application/json'})

request.body = {
    "qualifications"=> [
        {
            "question_id"=> 42,
            "condition"=> "18"
        },
        {
            "question_id"=> 42,
            "condition"=> "19"
        },
        {
            "question_id"=> 42,
            "condition"=> "20"
        },
        {
            "question_id"=> 42,
            "condition"=> "21"
        },
        {
            "question_id"=> 42,
            "condition"=> "22"
        },
        {
            "question_id"=> 42,
            "condition"=> "23"
        },
        {
            "question_id"=> 42,
            "condition"=> "24"
        },
        {
            "question_id"=> 42,
            "condition"=> "25"
        },
        {
            "question_id"=> 43,
            "condition"=> "2"
        }
    ],
    "completes"=> 500,
    "days"=> 7,
    "length_of_interview"=> 10,
    "incidence_rate"=> 0.5,
    "price_ceiling"=> 1.5,
    "locale"=> "eng_us"
}.to_json

request['Authorization'] = YOUR_API_KEY_HERE

response = http.request(request)
<?php
$curl = curl_init();

$params = '{
    "qualifications": [
        {
            "question_id": 42,
            "condition": "18"
        },
        {
            "question_id": 42,
            "condition": "19"
        },
        {
            "question_id": 42,
            "condition": "20"
        },
        {
            "question_id": 42,
            "condition": "21"
        },
        {
            "question_id": 42,
            "condition": "22"
        },
        {
            "question_id": 42,
            "condition": "23"
        },
        {
            "question_id": 42,
            "condition": "24"
        },
        {
            "question_id": 42,
            "condition": "25"
        },
        {
            "question_id": 43,
            "condition": "2"
        }
    ],
    "completes": 500,
    "days": 7,
    "length_of_interview": 10,
    "incidence_rate": 0.5,
    "price_ceiling": 1.5,
    "locale": "eng_us"
}';

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.samplicio.us/demand/v2-beta/reach/audience-estimate",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_HTTPHEADER => array('Content-Type: application/json', 'Authorization: YOUR_API_KEY_HERE'),
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => $params,
));

$response = curl_exec($curl);

curl_close($curl);
?>

import requests, json

url = 'https://api.samplicio.us/demand/v2-beta/reach/audience-estimate'
params = {
    "qualifications": [
        {
            "question_id": 42,
            "condition": "18"
        },
        {
            "question_id": 42,
            "condition": "19"
        },
        {
            "question_id": 42,
            "condition": "20"
        },
        {
            "question_id": 42,
            "condition": "21"
        },
        {
            "question_id": 42,
            "condition": "22"
        },
        {
            "question_id": 42,
            "condition": "23"
        },
        {
            "question_id": 42,
            "condition": "24"
        },
        {
            "question_id": 42,
            "condition": "25"
        },
        {
            "question_id": 43,
            "condition": "2"
        }
    ],
    "completes": 500,
    "days": 7,
    "length_of_interview": 10,
    "incidence_rate": 0.5,
    "price_ceiling": 1.5,
    "locale": "eng_us"
}
data = json.dumps(params)
headers = {'Content-type': 'application/json', 'Authorization' : 'YOUR_API_KEY_HERE', 'Accept': 'text/plain'}

response = requests.post(url, data