Introduction
Lucid brings efficiency and automation to online sampling with Lucid Marketplace, the world’s most powerful, open, and customizable online sampling platform.
The Marketplace and Monetization 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 Lucid’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@luc.id. Please navigate to the Monetization Integration Guide or the Marketplace Integration Guide to see how to get started.
Please note: Sandbox keys are only available for the Marketplace Integration, and not for the Monetization Integration.
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 Lucid 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 Lucid 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
The entire Lucid Marketplace API collection can be easily imported into Postman, by clicking the button below:
Postman is a free application that allows you to execute test calls in an intuitive interface.
HTTP Status Codes
Lucid 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 Lucid’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 Lucid 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.
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 Lucid 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 - Marketplace 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 language-country 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 |
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@luc.id 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.
Monetization Integration
On-time Supply - Opportunities
On-time Supply allows you to subscribe to Lucid 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 Lucid’s modern paths and parameters styling. On-time Supply uses snake_case rather than CamelCase you see in existing Monetization API endpoints. You can see a translation of the old styling to the new in our FAQ article.
The On-time Supply collection can be easily imported into Postman by clicking the button below:
The Opportunities resource contains information about a survey opportunity posted by a buyer. More detailed information about who qualifies for the survey is contained in the existing Qualifications and Quotas resources.
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. |
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. |
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",
"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",
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",
"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',
'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"",
""opportunities"": [{
""country_language"": {""in"": [""eng_us"", ""eng_gb""]},
""study_type"": {""eq"": ""ihut""},
""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',
opportunities:
[ { country_language: { in: [ 'eng_us", "eng_gb', 'fre_fr' ] },
study_type: { "eq": "ihut" },
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": 1234567,
"survey_name": "fun_survey",
"account_name": "Anon",
"country_language": "eng_us",
"industry": "auto",
"study_type": "adhoc",
"bid_length_of_interview": 2,
"bid_incidence": 10,
"collects_pii": false,
"survey_group_ids": [12345, 12346, 12347],
"is_live": true,
"survey_quota_calc_type": "completes",
"is_only_supplier_in_group": false,
"cpi": 2,
"total_client_entrants": 30,
"total_remaining": 15,
"completion_percentage": 0.5,
"conversion": 0.326,
"length_of_interview": 2,
"overall_completes": 15,
"termination_length_of_interview": 0
}
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.
After creating an entry link you can list allocated surveys or show an allocated survey to access these opportunities. Callback, country_language & supplier_code are required parameters for this call.
Arguments
Property | Data Type | Required | Description | Limits |
---|---|---|---|---|
callback | string | true | The callback url that survey opportunities, both new and updates, will be sent to. | - |
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. |
- |
survey_group_ids | #CompareIntArray | false | Unique ID associated with a survey group, if applicable. | - |
is_only_supplier_in_group | #CompareBool | false | true indicates that an allocation is reserved for a single supplier. |
- |
cpi | #CompareFloat | false | Gross payout per complete. This value is before any applicable commissions or fees. | 0.0<= |
conversion | #CompareFloat | Percentage of respondents who complete the survey after qualifying. | 0.0-1.0 | |
length_of_interview | #CompareInt | Median time for a respondent to complete the survey, excluding the Marketplace prescreener, in minutes. | 0<= | |
termination_length_of_interview | #CompareInt | 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",
"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.
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 Lucid 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. |
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
}
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.
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.
Surveys
The Survey resource contains basic information about a survey opportunity posted by a sample buyer. More detailed information about who qualifies for the survey is contained in the Qualifications and Quotas resources. These properties may return Null
: BidIncidence, BidLengthOfInterview, IndustryID, and StudyTypeID.
Surveys Model
Property | Type | Description |
---|---|---|
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. |
SurveyNumber | int | Unique number associated with the survey. |
SurveySID | string | Unique hash value (GUID) associated with the survey. |
AccountName | string | Name of the buyer running the survey. Maximum length of 64. |
CountryLanguageID | int | Unique id associated with the country-language pair the survey is open to. |
LengthOfInterview | int | Median time for a respondent to complete the survey excluding the Marketplace prescreener in minutes. This value is calculated after six completes and rounded to the nearest whole number. Until six completes are achieved the value will be zero. |
BidIncidence | double | Estimated incidence rate of the survey as provided by the buyer. |
Conversion | int | Percentage of respondents who complete the survey after qualifying. This value is calculated after one complete and rounded to the nearest whole number. |
CPI | double | Gross payout per complete. This value is in US dollars and is before any applicable commissions or fees. |
FieldEndDate | datetime | Target date for survey closure. This property usually does not indicate a hard closure time, although buyers may opt to automatically close the study. “FieldEndDate”: “\/Date(1388293200000-0600)\/”. Where 1388293200000 is a unix timestamp (in milliseconds) denoting 12/29/2013 05:00:00, where -0600 is the time difference from UTC |
IndustryID | int | Industry associated with the survey’s topic. |
StudyTypeID | int | Indicates the survey’s format and purpose (i.e. adhoc, recruit, etc). |
OverallCompletes | int | Number of completes already achieved. |
TotalRemaining | int | Number of completes still available. |
CompletionPercentage | int | Percentage of the survey that has filled in terms of completes. |
SurveyGroup | string | Deprecated: Will return null . Instead use the SurveyGroupExists property. |
SurveyGroupID | int | Deprecated: Will return null . If SurveyGroupExists is true , then list the survey’s groups. |
SurveyGroupExists | int | Indicates whether there is a survey group(s) associated with the survey. (0=false , 1=true ) |
BidLengthOfInterview | int | Estimated time for a respondent to complete the survey excluding the Marketplace prescreener in minutes as provided by the buyer. |
TerminationLengthOfInterview | 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. |
IsTrueSample | string | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
SurveyMobileConversion | int | Percentage of mobile respondents who complete the survey after qualifying. This value is calculated after one mobile complete and rounded to the nearest whole number. |
SurveyQuotaCalcTypeID | int | Indicates whether quotas are calculated based on completes or prescreens (1=Completes, 2=Prescreens). |
SampleTypeID | int | The type of sample the survey is open to (i.e. consumer, business-to-business, etc). The value will be returned as null if not specified by the buyer. |
CollectsPII | boolean | true indicates that the survey will collect PII. |
IsOnlySupplierInGroup | boolean | true indicates that an allocation is reserved for a single supplier |
GET List Filtered Marketplace Surveys
Definition
GET https://api.samplicio.us/Supply/v1/Surveys/AllOfferwall?CountryLanguageID={CountryLanguageID}&SupplierCode={SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/AllOfferwall?CountryLanguageID=11,74&SupplierCode=1234&CollectsPII=1&CPIGTE=2&CPILTE=15&IndustryID=20,25,30
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/Surveys/AllOfferwall?CountryLanguageID=11,74&SupplierCode=1234&CollectsPII=1&CPIGTE=2&CPILTE=15&IndustryID=20,25,30')
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/AllOfferwall?CountryLanguageID=11,74&SupplierCode=1234&CollectsPII=1&CPIGTE=2&CPILTE=15&IndustryID=20,25,30";
$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/AllOfferwall?CountryLanguageID=11,74&SupplierCode=1234&CollectsPII=1&CPIGTE=2&CPILTE=15&IndustryID=20,25,30'
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/AllOfferwall?CountryLanguageID=11,74&SupplierCode=1234&CollectsPII=1&CPIGTE=2&CPILTE=15&IndustryID=20,25,30");
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/AllOfferwall?CountryLanguageID=11,74&SupplierCode=1234&CollectsPII=1&CPIGTE=2&CPILTE=15&IndustryID=20,25,30",
"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: GetAllOfferwallSurveys successful."
],
"ResultCount": 1,
"Surveys": [
{
"SurveyName": "Asthma Sufferers",
"SurveyNumber": 457751,
"SurveySID": "26CB55E2-74CC-4E19-88E3-7F2F8D4DE74D",
"AccountName": "Sample Company",
"CountryLanguageID": 11,
"LengthOfInterview": 12,
"BidIncidence": 30,
"Conversion": 1,
"CPI": 5.5,
"FieldEndDate": "\/Date(1541000567000-0600)\/",
"IndustryID": 30,
"StudyTypeID": 1,
"OverallCompletes": 5,
"TotalRemaining": 995,
"CompletionPercentage": 0,
"SurveyGroup": null,
"SurveyGroupID": null,
"SurveyGroupExists": 1,
"BidLengthOfInterview": 10,
"TerminationLengthOfInterview": 6,
"SurveyQuotaCalcTypeID": 1,
"IsTrueSample": false,
"SurveyMobileConversion": 0,
"SampleTypeID": null,
"CollectsPII": true,
"IsOnlySupplierInGroup": false
}
]
}
Returns a list, using query parameter filters, of all live survey opportunities available through the Marketplace for which you do not have an allocation or entry link. After creating an entry link you can list allocated surveys or show an allocated survey to access these opportunities. CountryLanguageID & SupplierCode are required parameters for this call.
Arguments
Property | Type | Required | Description | Limits |
---|---|---|---|---|
CountryLanguageID | int | true | Unique id associated with the country-language pair the survey is open to. | csv |
SupplierCode | string | true | Single Unique code associated with a supplier account. | - |
BidIncidenceGTE | float | false | Minimum estimated incidence rate for the survey. | 0-100 |
BidIncidenceLTE | float | false | Maximum estimated incidence rate for the survey. | 0-100 |
BidLengthOfInterviewGTE | int | false | Minimum estimated time for a respondent to complete the survey excluding the Marketplace prescreener in minutes as provided by the buyer. | 0<= |
BidLengthOfInterviewLTE | int | false | Maximum estimated time for a respondent to complete the survey excluding the Marketplace prescreener in minutes as provided by the buyer. | 0<= |
CollectsPII | bool | false | 1 indicates that the survey will collect PII. |
- |
ConversionGTE | int | false | Minimum percentage of respondents who complete the survey after qualifying. This value is calculated after one complete and rounded to the nearest whole number. | 0-100 |
CPIGTE | float | false | Minimum gross payout per complete. This value is in US dollars and is before any applicable commissions or fees. | 0<= |
CPILTE | float | false | Maximum gross payout per complete. This value is in US dollars and is before any applicable commissions or fees. | 0<= |
IndustryID | int | false | Industry associated with the survey’s topic. | csv |
IsOnlySupplierInGroup | bool | false | 1 indicates that an allocation is reserved for a single supplier |
- |
LengthOfInterviewLTE | int | false | Maximum median time for a respondent to complete the survey excluding the Marketplace prescreener in minutes. This value is calculated after six completes and rounded to the nearest whole number. Until six completes are achieved the value will be zero. | 0<= |
OverallCompletesGTE | int | false | Minimum number of completes already achieved. | 0<= |
SampleTypeID | int | false | The type of sample the survey is open to (i.e. consumer, business-to-business, etc). The value will be returned as null if not specified by the buyer. |
csv |
StudyTypeID | int | false | Indicates the survey’s format and purpose (i.e. adhoc, recruit, etc). | csv |
SurveyGroupExists | bool | false | 1 indicates there is a survey group(s) associated with the survey |
- |
SurveyMobileConversionGTE | int | false | Minimum percentage of mobile respondents who complete the survey after qualifying. This value is calculated after one mobile complete and rounded to the nearest whole number. | 0-100 |
SurveyName | string | false | External name of the survey. This name may be exposed to respondents. This value is not unique across surveys | Less than or equal to 128 characters. |
SurveyNumber | int | false | Unique number associated with the survey. | csv |
SurveyQuotaCalcTypeID | int | false | Indicates whether quotas are calculated based on completes or prescreens. | 1=Completes, 2=Prescreens |
SurveySID | string | false | Unique hash value (GUID) associated with the survey. | - |
TerminationLengthOfInterviewLTE | int | false | Maximum 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. | 0<= |
GET List Marketplace Surveys
Definition
GET https://api.samplicio.us/Supply/v1/Surveys/AllOfferwall/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/AllOfferwall/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/Surveys/AllOfferwall/{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/AllOfferwall/{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/AllOfferwall/{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/AllOfferwall/{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/AllOfferwall/{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: GetAllOfferwallSurveys successful."
],
"ResultCount": 1,
"Surveys": [
{
"SurveyName": "Asthma Sufferers",
"SurveyNumber": 457751,
"SurveySID": "26CB55E2-74CC-4E19-88E3-7F2F8D4DE74D",
"AccountName": "Sample Company",
"CountryLanguageID": 9,
"LengthOfInterview": 12,
"BidIncidence": 30,
"Conversion": 1,
"CPI": 1.5,
"FieldEndDate": "\/Date(1388293200000-0600)\/",
"IndustryID": 30,
"StudyTypeID": 1,
"OverallCompletes": 5,
"TotalRemaining": 995,
"CompletionPercentage": 0,
"SurveyGroup": null,
"SurveyGroupID": null,
"SurveyGroupExists": 1,
"BidLengthOfInterview": 10,
"TerminationLengthOfInterview": 6,
"SurveyQuotaCalcTypeID": 1,
"IsTrueSample": false,
"SurveyMobileConversion": 0,
"SampleTypeID": null,
"CollectsPII": null,
"IsOnlySupplierInGroup": false
}
]
}
Returns a list of all live survey opportunities available through the Marketplace for which you do not have an allocation or entry link. After creating an entry link you can list allocated surveys or show an allocated survey to access these opportunities.
Arguments
Property | Type | Required | Description |
---|---|---|---|
SupplierCode | string | true | Unique code associated with a supplier account. |
GET List Marketplace Surveys By Country Language
Definition
GET https://api.samplicio.us/Supply/v1/Surveys/AllOfferwall/ByCountryLanguage/{CountryLanguageID}/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/AllOfferwall/ByCountryLanguage/{CountryLanguageID}/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/Surveys/AllOfferwall/ByCountryLanguage/{CountryLanguageID}/{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/AllOfferwall/ByCountryLanguage/{CountryLanguageID}/{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/AllOfferwall/ByCountryLanguage/{CountryLanguageID}/{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/AllOfferwall/ByCountryLanguage/{CountryLanguageID}/{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/AllOfferwall/ByCountryLanguage/{CountryLanguageID}/{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: GetAllOfferwallSurveysByCountryLanguage successful."
],
"ResultCount": 1,
"Surveys": [
{
"SurveyName": "Asthma Sufferers",
"SurveyNumber": 457751,
"SurveySID": "26CB55E2-74CC-4E19-88E3-7F2F8D4DE74D",
"AccountName": "Sample Company",
"CountryLanguageID": 9,
"LengthOfInterview": 12,
"BidIncidence": 30,
"Conversion": 1,
"CPI": 1.5,
"FieldEndDate": "\/Date(1388293200000-0600)\/",
"IndustryID": 30,
"StudyTypeID": 1,
"OverallCompletes": 5,
"TotalRemaining": 995,
"CompletionPercentage": 0,
"SurveyGroup": null,
"SurveyGroupID": null,
"SurveyGroupExists": 1,
"BidLengthOfInterview": 10,
"TerminationLengthOfInterview": 6,
"SurveyQuotaCalcTypeID": 1,
"IsTrueSample": false,
"SurveyMobileConversion": 0,
"SampleTypeID": null,
"CollectsPII": null
}
]
}
Returns a list of all live survey opportunities available through the Marketplace for which you do not have an allocation or entry link, filtered by country language. After creating an entry link you can list allocated surveys or show an allocated survey to access these opportunities.
Arguments
Property | Type | Required | Description |
---|---|---|---|
CountryLanguageID | int | true | Country Language ID to filter with |
SupplierCode | string | true | Unique code associated with a supplier account. |
Allocations
Allocations allow buyers to allocate portions of studies to specific suppliers. This resource returns the allocation you have been given for a study based on your supplier code. These properties may return Null
: BidIncidence, BidLengthOfInterview, IndustryID, SampleTypeID and StudyTypeID.
SupplierAllocationSurveys Model
Property | Type | Description |
---|---|---|
SurveyName | string | External name of the survey. This name may be exposed to respondents. This value is not unique across surveys. |
SurveyNumber | int | Unique number associated with the survey. |
SurveySID | string | Unique hash value (GUID) assoicated with the survey. |
AccountName | string | Name of the buyer running the survey. |
CountryLanguageID | int | Unique id associated with the country-language pair the survey is open to. |
LengthOfInterview | int | Median time (in minutues) for a respondent to complete the survey, excluding the Marketplace prescreener. This value is calculated after six completes and rounded to the nearest whole number. Until six completes are achieved the value will be zero. |
BidIncidence | double | Estimated incidence rate of the survey as provided by the buyer. |
Conversion | int | Percentage of respondents who complete the survey after qualifying. This value is calculated after one complete and rounded to the nearest whole number. |
FieldBeginDate | datetime | Target date for survey start. This property usually does not indicate a hard start time, although buyers may opt to automatically open the study. Ex: “FieldBeginDate”: “\/Date(1388293200000-0600)\/” where 1388293200000 is a unix timestamp (in milliseconds) denoting 12/29/2013 05:00:00, where -0600 is the time difference from UTC |
FieldEndDate | datetime | Target date for survey closure. This property usually does not indicate a hard closure time, although buyers may opt to automatically close the study. Ex: “FieldEndDate”: “\/Date(1388293200000-0600)\/” where 1388293200000 is a unix timestamp (in milliseconds) denoting 12/29/2013 05:00:00, where -0600 is the time difference from UTC |
IndustryID | int | Industry associated with the survey’s topic. |
StudyTypeID | int | Indicates the survey’s format and purpose (i.e. adhoc, recruit, etc). |
Priority | int | Survey priority (1 being the highest). Priority only applies to routed sample. |
SurveyGroup | string | Deprecated: Will return null . Instead use the SurveyGroupExists property. |
SurveyGroupExists | int | Indicates whether there is a survey group(s) associated with the survey. (0=false , 1=true ) |
BidLengthOfInterview | int | Estimated time (in minutes) for a respondent to complete the survey, as provided by the buyer, excluding the Marketplace prescreener. |
TerminationLengthOfInterview | int | Median time (in minutes) for a respondent to be termed. 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. |
IsTrueSample | string | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
SurveyMobileConversion | int | Percentage of mobile respondents who complete the survey after qualifying. This value is calculated after one mobile complete and rounded to the nearest whole number. |
SurveyQuotaCalcTypeID | int | Indicates whether quotas are calculated based on completes or prescreens (1=Completes, 2=Prescreens). |
SampleTypeID | int | The type of sample the survey is open to (i.e. consumer, business-to-business, etc). The value will be returned as null if not specified by the buyer. |
CollectsPII | boolean | true indicates that the survey will collect PII. |
SupplierAllocationSurvey Model
Property | Type | Description |
---|---|---|
SurveyName | string | External name of the survey. This name may be exposed to respondents. This value is not unique across surveys. |
SurveyNumber | int | Unique number associated with the survey. |
SurveySID | string | Unique hash value (GUID) assoicated with the survey. |
AccountName | string | Name of the buyer running the survey. |
CountryLanguageID | int | Unique id associated with the country-language pair the survey is open to. |
LengthOfInterview | int | Median time for a respondent to complete the survey excluding the Marketplace prescreener in minutes. This value is calculated after 6 completes and rounded to the nearest whole number. Until six completes are achieved the value will be zero. |
BidIncidence | double | Estimated incidence rate of the survey as provided by the buyer. |
Conversion | int | Percentage of respondents who complete the survey after qualifying. This value is calculated after one complete and rounded to the nearest whole number. |
FieldBeginDate | datetime | Target date for survey start. This property usually does not indicate a hard start time, although buyers may opt to automatically open the study. Ex: “FieldBeginDate”: “\/Date(1388293200000-0600)\/” where 1388293200000 is a unix timestamp (in milliseconds) denoting 12/29/2013 05:00:00, where -0600 is the time difference from UTC |
FieldEndDate | datetime | Target date for survey closure. This property usually does not indicate a hard closure time, although buyers may opt to automatically close the study. Ex: “FieldEndDate”: “\/Date(1388293200000-0600)\/” where 1388293200000 is a unix timestamp (in milliseconds) denoting 12/29/2013 05:00:00, where -0600 is the time difference from UTC |
IndustryID | int | Industry associated with the survey’s topic. |
StudyTypeID | int | Indicates the survey’s format and purpose (i.e. adhoc, recruit, etc). |
Priority | int | Survey priority (1 being the highest). Priority only applies to routed sample. |
SupplierAllocations | array | Contains an array of SupplierAllocations elements described below. |
OfferwallTotalRemaining | int | Deprecated: Use the AllocationRemaining and HedgeRemaining properties return in each respective model. |
OfferwallAllocations | array | Contains an array of OfferwallAllocations elements described below. |
SurveyGroup | string | Deprecated: Will return null . Instead use the SurveyGroupExists property. |
SurveyGroupID | int | Deprecated: Will return null . If SurveyGroupExists is true, then list the survey’s groups. |
SurveyGroupExists | int | Indicates whether there is a survey group(s) associated with the survey. (0=false , 1=true ) |
BidLengthOfInterview | int | Estimated time (in minutes) for a respondent to complete the survey, as provided by the buyer, excluding the Marketplace prescreener. |
TerminationLengthOfInterview | int | Median time (in minutes) for a respondent to be termed. 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. |
IsTrueSample | string | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
SurveyMobileConversion | int | Percentage of mobile respondents who complete the survey after qualifying. This value is calculated after one mobile complete and rounded to the nearest whole number. |
SurveyQuotaCalcTypeID | int | Indicates whether quotas are calculated based on completes or prescreens (1=Completes, 2=Prescreens). |
SampleTypeID | int | The type of sample the survey is open to (i.e. consumer, business-to-business, etc). The value will be returned as null if not specified by the buyer. |
CollectsPII | boolean | true indicates that the survey will collect PII. |
IsOnlySupplierInGroup | boolean | true indicates that an allocation is reserved for a single supplier |
SupplierAllocations Model
Property | Type | Description |
---|---|---|
SupplierCode | int | Unique code associated with a supplier account. |
SupplierName | string | Name of the supplier. |
IsBlockRouted | boolean | Indicates if the survey accepts routed sample. |
AchievedCompletes | int | Number of completes that have been already achieved by the supplier in this survey. |
AllocationRemaining | int | Number of completes remaining as part of the allocation. |
HedgeRemaining | int | Number of unallocated completes available to any suppliers with access to hedge. |
TargetModel | object | Contains an object of the TargetModel elements described below. |
OfferwallAllocations Model
Property | Type | Description |
---|---|---|
SupplierCode | int | Unique code associated with a supplier account. |
SupplierName | string | Name of the supplier. |
OfferwallCompletes | int | Number of completes that have been already achieved by the Suppliers included in the same Marketplace group as the allocation. |
AllocationRemaining | int | Number of completes remaining as part of the allocation. |
HedgeRemaining | int | Number of unallocated completes available to any suppliers with access to hedge. |
TargetModel | object | Contains an object of the TargetModel elements described below. |
TargetModel Model
Property | Type | Description |
---|---|---|
SupplierLinkType | int | Defines the type of buyer-supplier engagement and the respondent’s path in Lucid Marketplace. See List Global Definitions for a map of supplier link types. |
LiveSupplierLink | string | Live supplier-specific respondent entry link generated by Lucid Marketplace. |
SupplierLinkSID | string | Unique hash value (GUID) associated with a LiveSupplierLink. |
TargetCCPI | double | Gross payout per targeted complete. The value is in US dollars. |
GET List Allocated Surveys
Definition
GET https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/All/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/All/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/All/{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/SupplierAllocations/All/{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/SupplierAllocations/All/{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/SupplierAllocations/All/{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/SupplierAllocations/All/{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: GetSupplierAllocationsAll successful."
],
"ResultCount": 1,
"SupplierAllocationSurveys": [
{
"SurveyName": "IT Developers Survey",
"SurveyNumber": 143479,
"SurveySID": "4C2B4533-0EA1-364A-212B-345B38C6AF57",
"AccountName": "Sample Company",
"CountryLanguageID": 9,
"LengthOfInterview": 2,
"BidIncidence": 8,
"Conversion": 1,
"FieldBeginDate": "/Date(1429160400000-0500)/",
"FieldEndDate": "/Date(1429848000000-0500)/",
"IndustryID": 3,
"StudyTypeID": 1,
"Priority": 2,
"SurveyGroup": null,
"SurveyGroupID": null,
"SurveyGroupExists": 0,
"BidLengthOfInterview": 15,
"TerminationLengthOfInterview": 5,
"SurveyQuotaCalcTypeID": 1,
"IsTrueSample": false,
"SurveyMobileConversion": 0,
"SampleTypeID": null,
"CollectsPII": null
}
]
}
Returns a list of all live survey opportunities for which you have an allocation or entry link.
Arguments
Property | Type | Required | Description |
---|---|---|---|
SupplierCode | string | true | Unique code associated with a supplier account. |
GET Show an Allocated Survey
Definition
GET https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/BySurveyNumber/{SurveyNumber}/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/BySurveyNumber/{SurveyNumber}/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/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/SupplierAllocations/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/SupplierAllocations/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/SupplierAllocations/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/SupplierAllocations/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: GetSupplierAllocationsBySurveyNumber successful."
],
"ResultCount": 1,
"SupplierAllocationSurvey": {
"SurveyName": "Pet Owner Survey",
"SurveyNumber": 17381,
"SurveySID": "03B4B292-0EA1-212B-02C1-345B38C6AF57",
"AccountName": "Sample Company",
"CountryLanguageID": 9,
"LengthOfInterview": 16,
"BidIncidence": 20,
"Conversion": 13,
"FieldBeginDate": "/Date(1400562000000-0500)/",
"FieldEndDate": "/Date(1401854400000-0500)/",
"IndustryID": 18,
"StudyTypeID": 1,
"Priority": 1,
"SupplierAllocations": [],
"OfferwallTotalRemaining": 47,
"OfferwallAllocations": [
{
"SupplierCode": "0050",
"SupplierName": "Monetization Company",
"OfferwallCompletes": 403,
"AllocationRemaining": 47,
"HedgeRemaining": 0,
"TargetModel": {
"SupplierLinkType": 18,
"LiveSupplierLink": "https://samplicio.us/s/default.aspx?SID=da94c7f8-0dcf-4fcc-80d4-6e2beafc3ff4&PID=",
"SupplierLinkSID": "da94c7f8-0dcf-4fcc-80d4-6e2beafc3ff4",
"TargetCCPI": 3
}
}
],
"SurveyGroup": null,
"SurveyGroupID": null,
"SurveyGroupExists": 1,
"BidLengthOfInterview": 15,
"TerminationLengthOfInterview": 3,
"SurveyQuotaCalcTypeID": 1,
"IsTrueSample": false,
"SurveyMobileConversion": 0,
"SampleTypeID": null,
"CollectsPII": null,
"IsOnlySupplierInGroup": false
}
}
Returns any allocation(s) given to you for a particular survey.
Arguments
Property | Type | Required | Description |
---|---|---|---|
SupplierCode | string | false | Unique code associated with a supplier account. |
SurveyNumber | int | true | Unique number associated with the survey. |
GET List Allocated Surveys by Date
Definition
GET https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/ByDate/{Date}/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/ByDate/{Date}/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/ByDate/{Date}/{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/SupplierAllocations/ByDate/{Date}/{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/SupplierAllocations/ByDate/{Date}/{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/SupplierAllocations/ByDate/{Date}/{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/SupplierAllocations/ByDate/{Date}/{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: GetSupplierAllocationsByDate successful."
],
"ResultCount": 1,
"SupplierAllocationSurveys": [
{
"SurveyName": "IT Developers Survey",
"SurveyNumber": 143479,
"SurveySID": "4C2B4533-0EA1-364A-212B-345B38C6AF57",
"AccountName": "Sample Company",
"CountryLanguageID": 9,
"LengthOfInterview": 2,
"BidIncidence": 8,
"Conversion": 1,
"FieldBeginDate": "/Date(1431666000000-0500)/",
"FieldEndDate": "/Date(1432353600000-0500)/",
"IndustryID": 30,
"StudyTypeID": 1,
"Priority": 2,
"SurveyGroup": null,
"SurveyGroupID": null,
"SurveyGroupExists": 0,
"BidLengthOfInterview": 15,
"TerminationLengthOfInterview": 5,
"SurveyQuotaCalcTypeID": 1,
"IsTrueSample": false,
"SurveyMobileConversion": 0,
"SampleTypeID": null,
"CollectsPII": null
}
]
}
Returns a list of all live survey opportunities for which you have an allocation or entry link and the TotalQuota has changed since a specified date.
Arguments
Property | Type | Required | Description |
---|---|---|---|
Date | string | true | Must follow the format YYYY-MM-DD |
SupplierCode | string | true | Unique code associated with a supplier account. |
GET List Allocated Surveys By CountryLanguage
Definition
GET https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/{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/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/{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/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/{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/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/{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/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/{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: GetSupplierAllocationsByCountryLanguage successful."
],
"ResultCount": 1,
"SupplierAllocationSurveys": [
{
"SurveyName": "IT Developers Survey",
"SurveyNumber": 143479,
"SurveySID": "4C2B4533-0EA1-364A-212B-345B38C6AF57",
"AccountName": "Sample Company",
"CountryLanguageID": 9,
"LengthOfInterview": 2,
"BidIncidence": 8,
"Conversion": 1,
"FieldBeginDate": "/Date(1431666000000-0500)/",
"FieldEndDate": "/Date(1432353600000-0500)/",
"IndustryID": 30,
"StudyTypeID": 1,
"Priority": 2,
"SurveyGroup": null,
"SurveyGroupID": null,
"SurveyGroupExists": 0,
"BidLengthOfInterview": 15,
"TerminationLengthOfInterview": 5,
"SurveyQuotaCalcTypeID": 1,
"IsTrueSample": false,
"SurveyMobileConversion": 0,
"SampleTypeID": null,
"CollectsPII": null
}
]
}
Returns a list of all live survey opportunities for which you have an allocation or entry link in the selected Country Language.
Arguments
Property | Type | Required | Description |
---|---|---|---|
CountryLanguageID | int | true | Country Language ID to filter with |
SupplierCode | string | true | Unique code associated with a supplier account. |
GET List Allocated Surveys By CountryLanguage and Date
Definition
GET https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/ByDate/{Date}/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/ByDate/{Date}/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/Surveys/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/ByDate/{Date}/{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/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/ByDate/{Date}/{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/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/ByDate/{Date}/{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/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/ByDate/{Date}/{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/SupplierAllocations/ByCountryLanguage/{CountryLanguageID}/ByDate/{Date}/{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: GetSupplierAllocationsByCountryLanguageAndDate successful."
],
"ResultCount": 1,
"SupplierAllocationSurveys": [
{
"SurveyName": "IT Developers Survey",
"SurveyNumber": 143479,
"SurveySID": "4C2B4533-0EA1-364A-212B-345B38C6AF57",
"AccountName": "Sample Company",
"CountryLanguageID": 9,
"LengthOfInterview": 2,
"BidIncidence": 8,
"Conversion": 1,
"FieldBeginDate": "/Date(1431666000000-0500)/",
"FieldEndDate": "/Date(1432353600000-0500)/",
"IndustryID": 30,
"StudyTypeID": 1,
"Priority": 2,
"SurveyGroup": null,
"SurveyGroupID": null,
"SurveyGroupExists": 0,
"BidLengthOfInterview": 15,
"TerminationLengthOfInterview": 5,
"SurveyQuotaCalcTypeID": 1,
"IsTrueSample": false,
"SurveyMobileConversion": 0,
"SampleTypeID": null,
"CollectsPII": null
}
]
}
Returns a list of all live survey opportunities for which you have an allocation or entry link in the selected Country Language and the TotalQuota has changed since a specified date.
Arguments
Property | Type | Required | Description |
---|---|---|---|
CountryLanguageID | int | true | Country Language ID to filter with |
Date | string | true | Must follow the format YYYY-MM-DD |
SupplierCode | string | true | Unique code associated with a supplier account. |
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. |
Qualifications
The Qualification resource contains the questions and corresponding conditions associated with a survey. These qualifications make up the Marketplace prescreener and define the overall survey targeting criteria for suppliers.
Survey Qualification Model
Property | Type | Description |
---|---|---|
SurveyNumber | int | Unique number associated with the survey. |
Questions | array | Contains an array of Question models. |
Questions Model
Property | Type | Description |
---|---|---|
QuestionID | int | Unique number associated with the question. |
LogicalOperator | string | Defines the logical operation applied to the conditions. |
PreCodes | array | Qualification answer option identifier. |
GET Show Qualifications
Definition
GET https://api.samplicio.us/Supply/v1/SurveyQualifications/BySurveyNumberForOfferwall/{SurveyNumber}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/SurveyQualifications/BySurveyNumberForOfferwall/{SurveyNumber}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/SurveyQualifications/BySurveyNumberForOfferwall/{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/Supply/v1/SurveyQualifications/BySurveyNumberForOfferwall/{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/Supply/v1/SurveyQualifications/BySurveyNumberForOfferwall/{SurveyNumber}'
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/SurveyQualifications/BySurveyNumberForOfferwall/{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": "/Supply/v1/SurveyQualifications/BySurveyNumberForOfferwall/{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: GetOfferwallQualificationsBySurveyNumber successful."
],
"ResultCount": 10,
"SurveyQualification": {
"SurveyNumber": 254256,
"Questions": [
{
"QuestionID": 42,
"LogicalOperator": "Or",
"PreCodes": [
"18",
"19",
"20",
"21",
"22",
"23",
"24",
"25"
]
},
{
"QuestionID": 43,
"LogicalOperator": "Or",
"PreCodes": [
"1",
"2"
]
}
]
}
}
Returns a list of all standard and exposed custom qualifications associated with a survey.
Arguments
Property | Type | Required | Description |
---|---|---|---|
SurveyNumber | int | true | Unique number associated with the survey. |
Quotas
The quotas resource returns the number of completes available to you for each demographic cell in a survey. Quotas can be built on any qualification(s).
Response Properties
Property | Type | Description |
---|---|---|
SurveyNumber | int | Unique number associated with the survey. |
SurveyQuotas | array | Contains an array of Survey Quotas models. |
SurveyStatusCode | string | Code associated with the current status of the survey. See List Global Definitions for a map of survey status codes. |
SurveyStillLive | boolean | A simple check to determine whether a survey is open to respondents. This can be used interchangeably with SurveyStatusCode. |
Survey Quotas Model
Property | Type | Description |
---|---|---|
SurveyQuotaID | int | Unique number associated with the quota. |
SurveyQuotaType | 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. |
||
QuotaCPI | double | We recommend using Show an Allocated Survey and TargetCCPI to retrieve survey CPI. Gross payout per complete. This value is in US dollars and is before any applicable commissions or fees. |
Conversion | int | 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. |
NumberOfRespondents | int | Number of completes available in that quota group. |
Questions | array | Contains an array of Question models. |
Questions Model
Property | Type | Description |
---|---|---|
QuestionID | int | Unique number associated with the question. |
LogicalOperator | string | Defines the logical operation applied to the conditions. |
PreCodes | array | Qualification answer option identifier. |
GET Show Quotas
Definition
GET https://api.samplicio.us/Supply/v1/SurveyQuotas/BySurveyNumber/{SurveyNumber}/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/SurveyQuotas/BySurveyNumber/{SurveyNumber}/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/SurveyQuotas/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/SurveyQuotas/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/SurveyQuotas/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/SurveyQuotas/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/SurveyQuotas/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: GetSurveyQuotasBySurveyNumberAndSupplierCode successful."
],
"ResultCount": 3,
"SurveyNumber": 254256,
"SurveyQuotas": [
{
"SurveyQuotaID": 1564722,
"SurveyQuotaType": "Total",
"QuotaCPI": 0,
"Conversion": 0,
"NumberOfRespondents": 20,
"Questions": null
},
{
"SurveyQuotaID": 1781601,
"SurveyQuotaType": "Client",
"QuotaCPI": 0,
"Conversion": 0,
"NumberOfRespondents": 10,
"Questions": [
{
"QuestionID": 43,
"LogicalOperator": "OR",
"PreCodes": [
"1"
]
}
]
},
{
"SurveyQuotaID": 1781602,
"SurveyQuotaType": "Client",
"QuotaCPI": 0,
"Conversion": 0,
"NumberOfRespondents": 10,
"Questions": [
{
"QuestionID": 43,
"LogicalOperator": "OR",
"PreCodes": [
"2"
]
}
]
}
],
"SurveyStatusCode": "02",
"SurveyStillLive": false
}
Returns the total quota and client quotas associated with 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. |
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.
Supplier Link Model
Property | Type | Description |
---|---|---|
SupplierLinkTypeCode | string | Defines the type of buyer-supplier engagement and the respondent’s path in Lucid 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 Lucid Marketplace. |
TestLink | string | Test supplier-specific respondent entry link generated by Lucid 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 Lucid 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) |
PUT Update a Link
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 Lucid 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) |
GET Show a Link
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. |
Statistics
The Survey Statistics resource returns valuable survey performance statistics based on scope and timeframe. This resource is an important part of Yield Management which is the process of implementing business and API processes rank and order surveys to ensure high earnings-per-click (EPC) studies receive the most traffic and low EPC studies are removed from sample send.
Global Trailing Model
Property | Type | Description |
---|---|---|
EffectiveEPC | float | Global Effective EPC given the trailing conversion rate and current CPI of survey (TrailingConversion*CPI) |
LengthOfInterview | int | Global Trailing LOI. Median time for a respondent to complete the survey excluding the Marketplace prescreener in minutes. |
SystemConversion | float | Global trailing conversion rate (# Completes / # System Entrants) |
Supplier Lifetime Model
Property | Type | Description |
---|---|---|
EPC | float | Lifetime EPC |
SystemConversion | float | Lifetime conversion rate |
Supplier Trailing Model
Property | Type | Description |
---|---|---|
SystemConversion | float | Trailing conversion rate |
GET Show Statistics
Definition
GET https://api.samplicio.us/Supply/v1/SurveyStatistics/BySurveyNumber/{SurveyNumber}/{SupplierCode}/{Scope}/{Timespan}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/SurveyStatistics/BySurveyNumber/{SurveyNumber}/{SupplierCode}/{Scope}/{Timespan}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/SurveyStatistics/BySurveyNumber/{SurveyNumber}/{SupplierCode}/{Scope}/{Timespan}')
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/SurveyStatistics/BySurveyNumber/{SurveyNumber}/{SupplierCode}/{Scope}/{Timespan}";
$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/SurveyStatistics/BySurveyNumber/{SurveyNumber}/{SupplierCode}/{Scope}/{Timespan}'
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/SurveyStatistics/BySurveyNumber/{SurveyNumber}/{SupplierCode}/{Scope}/{Timespan}");
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/SurveyStatistics/BySurveyNumber/{SurveyNumber}/{SupplierCode}/{Scope}/{Timespan}",
"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: GetGlobalTrailingStatisticsBySurveyNumber successful."
],
"ResultCount": 1,
"SurveyStatistics": {
"EffectiveEPC": 2.73,
"LengthOfInterview": 5,
"SystemConversion": 0.28
}
}
Returns Marketplace conversion information (as a percentage) for a live study based on the Scope
and Timespan
.
Arguments
Property | Type | Required | Description |
---|---|---|---|
Survey Number | int | true | Unique ID associated with the study. |
SupplierCode | string | true | Your unique supplier code. |
Scope | string | true | Either “Global” or “Supplier”. |
Timespan | string | true | Either “Trailing” or “Lifetime”. Trailing returns data from the last 12 hours. |
GET List Statistics
Definition
GET https://api.samplicio.us/Supply/v1/SurveyStatistics/All/{SupplierCode}/{Scope}/{Timespan}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/SurveyStatistics/All/{SupplierCode}/{Scope}/{Timespan}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/SurveyStatistics/All/{SupplierCode}/{Scope}/{Timespan}')
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/SurveyStatistics/All/{SupplierCode}/{Scope}/{Timespan}";
$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/SurveyStatistics/All/{SupplierCode}/{Scope}/{Timespan}'
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/SurveyStatistics/All/{SupplierCode}/{Scope}/{Timespan}");
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/SurveyStatistics/All/{SupplierCode}/{Scope}/{Timespan}",
"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: GetAllGlobalTrailingStatistics successful."
],
"ResultCount": 2,
"SurveyStatistics": [
{
"SurveyNumber": 999,
"SystemConversion": 0.42
},
{
"SurveyNumber": 999,
"SystemConversion": 0.07
},
]
}
Returns Marketplace conversion information (as a percentage) based on the Scope and Timespan, for all live surveys which have received an entrant in the last 12 hours.
Arguments
Property | Type | Required | Description |
---|---|---|---|
Scope | string | true | Either “Global” or “Supplier”. |
Timespan | string | true | Either “Trailing” or “Lifetime”. Trailing returns the last 12 hours. |
SupplierCode | string | true | Your unique supplier code. |
Recruit
Buyers will use the Marketplace to recruit new respondents to their panel or community. The MarketingInformation resource allows suppliers to retrieve campaign marketing information when the study type is either Recruit – Panel
or Community Build
which can be presented to respondents.
Marketing Information Survey Model
Property | Type | Description |
---|---|---|
MarketingHeadline | string | A headline that describes the recruit offer |
MarketingText | string | Marketing text that describes the benefits the recruit offer |
MarketingImageLargeUrl | string | A company logo or image that represents the recruit offer |
MarketingImageSmallUrl | string | EA thumbnail image, usually company logo, that represents the recruit offer |
GET Show Marketing Info
Definition
GET https://api.samplicio.us/Supply/v1/Surveys/MarketingInformation/BySurveyNumber/{SurveyNumber}/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/Surveys/MarketingInformation/BySurveyNumber/{SurveyNumber}/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/v1/Surveys/MarketingInformation/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/MarketingInformation/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/MarketingInformation/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/MarketingInformation/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/MarketingInformation/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: GetMarketingInformationBySurveyNumber successful."
],
"ResultCount": 1,
"MarketingInformation": {
"MarketingHeadline": "All the headlines",
"MarketingText": "Come one, come all!",
"MarketingImageLargeUrl": "images.google.com/image_large.jpg",
"MarketingImageSmallUrl": "images.google.com/image_small.jpg"
}
}
Returns marketing information for a specific survey when study type is either Recruit – Panel
or Community Build
.
Property | Type | Required | Description |
---|---|---|---|
SurveyNumber | int | true | Unique number associated with the survey. |
SupplierCode | string | true | Unique code associated with the supplier performing the call. |
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/Supply/v1/SurveyQualifiedRespondents/BySurveyNumberSupplierCode/{SurveyNumber}/{SupplierCode}
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" https://api.samplicio.us/Supply/v1/SurveyQualifiedRespondents/BySurveyNumberSupplierCode/{SurveyNumber}/{SupplierCode}
require 'net/http'
uri = URI('https://api.samplicio.us/Supply/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/Supply/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/Supply/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/Supply/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": "/Supply/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": 2,
"ApiAccountStatus": 1,
"AccountCode": "AA",
"ApiMessages": [
"API Message: Response initialized.",
"API Message: SurveyQualifiedRespondentsBySurveyNumberSupplierCode successful."
],
"ResultCount": 4,
"SurveyQualifiedRespondents": [
{
"PID": "1111110",
"IsActive": true
},
{
"PID": "1111101",
"IsActive": true
},
{
"PID": "1111001",
"IsActive": true
},
{
"PID": "1110001",
"IsActive": true
}
]
}
Returns the list of PIDs by supplier for a specific Marketplace survey when study type is Recontact
.
Arguments
Property | Type | Required | Description |
---|---|---|---|
SurveyNumber | int | true | Unique number associated with the survey. |
SupplierCode | string | true | Unique code associated with the supplier performing the call. |
Sessions
The Sessions resource allows suppliers to monitor survey and session performance in real time. Suppliers will have access to identification values, breakdown of Marketplace and Client statuses, and the datetime information of a respondent session. Additionally, suppliers will be able to bucket these data points by panelist ID, survey ID, and/or by date.
Sessions Model
Property | Type | Description |
---|---|---|
fulcrum_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. |
panelist_id | string | A supplier’s unique respondent identifier. |
respondent_id | string | Unique session ID per study per respondent. |
session_id | string | Secondary panelist ID. |
parent_session_id | string | Parent session ID. |
survey_id | int | The ID associated with the Survey. |
quota_cpi | float | Gross payout per complete. This value is in US dollars and is before any applicable commissions or fees. |
target_cpi | float | Gross payout per targeted complete. This value is in US dollars and is before any applicable commissions or fees. |
reconciliation_date | datetime | The time at which a session was reconciled. |
GET Sessions
Returns a list of all sessions associated with a given survey and/or panelist ID for a supplier to analyze respondent-level data.
Definition
GET https://api.samplicio.us/Supply/v1/Sessions
Example Request
curl -H "Authorization: YOUR_API_KEY_HERE" "https://api.samplicio.us/Supply/v1/Sessions?supplier_code=1234&entry_date_after=2017-06-15T17:58:20Z&survey_id=100001&panelist_id=123456789&entry_date_before=2017-06-17T17:58:20Z"
require 'net/http'
uri = URI("https://api.samplicio.us/Supply/v1/Sessions?supplier_code=1234&entry_date_after=2017-06-15T17:58:20Z&survey_id=100001&panelist_id=123456789&entry_date_before=2017-06-17T17:58:20Z")
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/Sessions?supplier_code=1234&entry_date_after=2017-06-15T17:58:20Z&survey_id=100001&panelist_id=123456789&entry_date_before=2017-06-17T17:58:20Z";
$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/Sessions?supplier_code=1234&entry_date_after=2017-06-15T17:58:20Z&survey_id=100001&panelist_id=123456789&entry_date_before=2017-06-17T17:58:20Z"
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/Sessions?supplier_code=1234&entry_date_after=2017-06-15T17:58:20Z&survey_id=100001&panelist_id=123456789&entry_date_before=2017-06-17T17:58:20Z");
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/Sessions?supplier_code=1234&entry_date_after=2017-06-15T17:58:20Z&survey_id=100001&panelist_id=123456789&entry_date_before=2017-06-17T17:58:20Z",
"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
{
"sessions": [
{
"fulcrum_status": 3,
"entry_date": "2017-06-15T18:32:15Z",
"last_date": "2017-06-15T18:35:46Z",
"panelist_id": "XXXXX-XXXX",
"respondent_id": "XXXXX-XXXX",
"client_status": 11,
"session_id": "XXXXX-XXXX",
"parent_session_id": "XXXXX-XXXX",
"survey_id": 100001,
"quota_cpi": 1.25,
"target_cpi": 1.5,
"reconciliation_date": "2017-06-17T11:29:45Z"
},
{
"fulcrum_status": 41,
"entry_date": "2017-06-16T09:15:68Z",
"last_date": "2017-06-16T09:37:02Z",
"panelist_id": "XXXXX-XXXX",
"respondent_id": "XXXXX-XXXX",
"client_status": -1,
"session_id": "XXXXX-XXXX",
"parent_session_id": "XXXXX-XXXX",
"survey_id": 100001,
"quota_cpi": 2.5,
"target_cpi": 2.0,
"reconciliation_date": null
}
]
}
Query Arguments
Argument | Type | Required | Description |
---|---|---|---|
supplier_code | int | true | Unique code associated with a supplier account. |
survey_id | int | true, when panelist_id is not included | The ID associated with the Survey. |
panelist_id | string | true, when survey_id is not included | A supplier’s unique respondent identifier (panelist_id). |
entry_date_after | datetime | true | Lower bound on session entryDate. Lookback is limited to 90 days ago. (RFC-3339 Format) |
entry_date_before | datetime | false | Upper bound entryDate. (RFC-3339 Format) |
reconciled | boolean | false | If true, will return only reconciled sessions (sessions with Client Response Code 11, 26, 28, or 38). |
Marketplace 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. |
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 Lucid 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 Lucid 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: Lucid automatically protects against invalid respondent traffic. |
IsDedupe | boolean | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
IsGeoIP | boolean | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
IsFraudProfile | boolean | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
FraudProfileThreshold | int | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
IsTrueSample | boolean | Non-Functional: Lucid 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 Lucid 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 | false | 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. |
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 Lucid 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 Lucid 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: Lucid automatically protects against invalid respondent traffic. |
IsDedupe | boolean | false | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
IsGeoIP | boolean | false | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
IsFraudProfile | boolean | false | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
FraudProfileThreshold | int | false | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
IsTrueSample | boolean | false | Non-Functional: Lucid 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 Lucid 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 Marketplacesurvey.
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 Lucid 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: Lucid automatically protects against invalid respondent traffic. |
IsDedupe | boolean | true | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
IsGeoIP | boolean | true | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
IsFraudProfile | boolean | true | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
FraudProfileThreshold | int | true | Non-Functional: Lucid automatically protects against invalid respondent traffic. |
IsTrueSample | boolean | false | Non-Functional: Lucid 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 all 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 Marketplaceprescreener 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. |
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}' 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
}.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
}';
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
}
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
}";
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
};
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"
]
},
{
"Name": "GENDER",
"QuestionID": 43,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 0,
"IsActive": true,
"Order": 3,
"PreCodes": [
"1",
"2"
]
},
{
"Name": "ZIP",
"QuestionID": 45,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 0,
"IsActive": true,
"Order": 2,
"PreCodes": []
},
{
"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"
]
},
{
"Name": "ETHNICITY",
"QuestionID": 113,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 1,
"IsActive": true,
"Order": 5,
"PreCodes": [
"1",
"2",
"3"
]
},
{
"Name": "STANDARD_RELATIONSHIP",
"QuestionID": 632,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 1,
"IsActive": true,
"Order": 7,
"PreCodes": [
"1"
]
},
{
"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"
]
}
]
}
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 |
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}' 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
}.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
}';
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
}
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
}";
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
};
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"
]
},
{
"Name": "GENDER",
"QuestionID": 43,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 0,
"IsActive": true,
"Order": 3,
"PreCodes": [
"1",
"2"
]
},
{
"Name": "ZIP",
"QuestionID": 45,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 0,
"IsActive": true,
"Order": 2,
"PreCodes": []
},
{
"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"
]
},
{
"Name": "ETHNICITY",
"QuestionID": 113,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 1,
"IsActive": true,
"Order": 5,
"PreCodes": [
"1",
"2",
"3"
]
},
{
"Name": "STANDARD_RELATIONSHIP",
"QuestionID": 632,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 1,
"IsActive": true,
"Order": 7,
"PreCodes": [
"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"
]
}
]
}
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 |
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"
]
},
{
"Name": "GENDER",
"QuestionID": 43,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 0,
"IsActive": true,
"Order": 3,
"PreCodes": [
"1",
"2"
]
},
{
"Name": "ZIP",
"QuestionID": 45,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 0,
"IsActive": true,
"Order": 2,
"PreCodes": []
},
{
"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"
]
},
{
"Name": "ETHNICITY",
"QuestionID": 113,
"LogicalOperator": "OR",
"NumberOfRequiredConditions": 1,
"IsActive": true,
"Order": 5,
"PreCodes": [
"1",
"2",
"3"
]
},
{
"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"
]
}
]
}
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 complete the survey. Quotas must be built off of qualifications.
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 | Field Target associated with the quota. |
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 | Field Target associated with the quota. |
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 | Field Target associated with the quota. |
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 Templates
The Marketplace Templates resource returns all Marketplace Templates associated with an existing account as well as apply an existing Marketplace template to a survey. An Marketplace Template must first be created in the Marketplace UI. A Marketplace Template allows a buyer to quickly add a commonly used Monetization blend.
Marketplace Templates Model
Property | Type | Description |
---|---|---|
ID | int | ID associated with the Marketplace Template. |
AccountID | int | Unique account identifier. |
Name | string | Marketplace Template Name. Maximum length of 255. |
ExchangeAllocationPercentage | double | Percentage of total completes allocated to the Lucid Marketplace, expressed as a decimal from 0 to 1. |
ExchangeIsHedgeAccess | boolean | true gives the Lucid Marketplace access to any unallocated completes. true is recommended when using Lucid 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 Template. |
Name | string | Marketplace 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 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 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 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 Template. |
Marketplace Groups
Marketplace Groups allow buyers to allocate completes to a specific group of suppliers. Marketplace Groups contain a hedge property, which allows suppliers from Marketplace 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 Lucid 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 Lucid 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 Lucid 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 Lucid 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 Lucid 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 Lucid Marketplace. |
TestLink | string | Test supplier-specific respondent entry link generated by Lucid 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 Marketplacesurvey.
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 Marketplacesurvey.
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 Marketplacesurvey.
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 Lucid Marketplace. |
TrackingTypeCode | string | Defines how Lucid 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 Lucid Marketplace. |
TestLink | string | Test supplier-specific respondent entry link generated by Lucid 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