Links
Create Links
POST
/
v2
/
surveys
/
streams
/
{StreamNumber}
/
link
Create Links
curl --request POST \
--url https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"SurveyCompleteLink": "https://www.supplier.com?pid=8629795&rid=[%rid%]",
"SurveyTermLink": "http://www.supplierredirect.com/term?rid=[%rid%]",
"SecurityFraudTermLink": "http://www.supplierredirect.com/security?rid=[%rid%]",
"SurveyOverquotaLink": "http://www.supplierredirect.com/overquota?rid=[%rid%]"
}
'import requests
url = "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link"
payload = {
"SurveyCompleteLink": "https://www.supplier.com?pid=8629795&rid=[%rid%]",
"SurveyTermLink": "http://www.supplierredirect.com/term?rid=[%rid%]",
"SecurityFraudTermLink": "http://www.supplierredirect.com/security?rid=[%rid%]",
"SurveyOverquotaLink": "http://www.supplierredirect.com/overquota?rid=[%rid%]"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
SurveyCompleteLink: 'https://www.supplier.com?pid=8629795&rid=[%rid%]',
SurveyTermLink: 'http://www.supplierredirect.com/term?rid=[%rid%]',
SecurityFraudTermLink: 'http://www.supplierredirect.com/security?rid=[%rid%]',
SurveyOverquotaLink: 'http://www.supplierredirect.com/overquota?rid=[%rid%]'
})
};
fetch('https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'SurveyCompleteLink' => 'https://www.supplier.com?pid=8629795&rid=[%rid%]',
'SurveyTermLink' => 'http://www.supplierredirect.com/term?rid=[%rid%]',
'SecurityFraudTermLink' => 'http://www.supplierredirect.com/security?rid=[%rid%]',
'SurveyOverquotaLink' => 'http://www.supplierredirect.com/overquota?rid=[%rid%]'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link"
payload := strings.NewReader("{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}"
response = http.request(request)
puts response.read_body{
"Status": 0,
"Message": "Success",
"Data": {
"LiveLinkUD": "d026d369-b370-4ffa-8177-c75cf46026f7",
"LiveLinkURL": "https://www-staging.researchdesk.com/landing2?fttsn=d026d369-b370-4ffa-8177-c75cf46026f7&rid=[%RID%]",
"TestLinkUD": "c4648ac7-9cff-4702-acab-bb244aef78ae",
"TestLinkURL": "https://www-staging.researchdesk.com/landing2?fttsn=c4648ac7-9cff-4702-acab-bb244aef78ae&rid=[%RID%]"
}
}Creates respondent “test” and “live” entry links for a Stream and registers the redirect URLs respondents should be sent to for each disposition.
Path Parameters
| Parameter | Description | Required | Example |
|---|---|---|---|
StreamNumber | The StreamNumber (integer) or StreamUd (UUID) of the stream. | Yes | 849 |
Request Body
| Field | Description | Required |
|---|---|---|
SurveyCompleteLink | Redirect used after a completion. | Yes |
SurveyTermLink | Redirect used after a termination. | Yes |
SecurityFraudTermLink | Redirect used after a quality/security termination. | Yes |
SurveyOverquotaLink | Redirect used after an over-quota termination. | Yes |
UseResearch Desk automatically appends additional variables to your redirect links on return, including[%rid%](case sensitive) in your redirect URLs to pass back the Respondent ID that was originally passed into the entry link as[%RID%].
isc status codes, the hashed key (hk), and SCPI (the respondent’s CPI on Stream entry). See Respondent Status Codes, Redirect Link Parameters, and Secure Redirects.Headers
Your obfuscated Supply API key (GUID), provided by Rep Data.
Path Parameters
StreamNumber (integer) or StreamUd (UUID).
Body
application/json
Redirect after a complete. Use [%rid%] to pass back the respondent ID.
Redirect after a termination.
Redirect after a quality/security termination.
Redirect after an over-quota termination.
Was this page helpful?
Create Links
curl --request POST \
--url https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"SurveyCompleteLink": "https://www.supplier.com?pid=8629795&rid=[%rid%]",
"SurveyTermLink": "http://www.supplierredirect.com/term?rid=[%rid%]",
"SecurityFraudTermLink": "http://www.supplierredirect.com/security?rid=[%rid%]",
"SurveyOverquotaLink": "http://www.supplierredirect.com/overquota?rid=[%rid%]"
}
'import requests
url = "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link"
payload = {
"SurveyCompleteLink": "https://www.supplier.com?pid=8629795&rid=[%rid%]",
"SurveyTermLink": "http://www.supplierredirect.com/term?rid=[%rid%]",
"SecurityFraudTermLink": "http://www.supplierredirect.com/security?rid=[%rid%]",
"SurveyOverquotaLink": "http://www.supplierredirect.com/overquota?rid=[%rid%]"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
SurveyCompleteLink: 'https://www.supplier.com?pid=8629795&rid=[%rid%]',
SurveyTermLink: 'http://www.supplierredirect.com/term?rid=[%rid%]',
SecurityFraudTermLink: 'http://www.supplierredirect.com/security?rid=[%rid%]',
SurveyOverquotaLink: 'http://www.supplierredirect.com/overquota?rid=[%rid%]'
})
};
fetch('https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'SurveyCompleteLink' => 'https://www.supplier.com?pid=8629795&rid=[%rid%]',
'SurveyTermLink' => 'http://www.supplierredirect.com/term?rid=[%rid%]',
'SecurityFraudTermLink' => 'http://www.supplierredirect.com/security?rid=[%rid%]',
'SurveyOverquotaLink' => 'http://www.supplierredirect.com/overquota?rid=[%rid%]'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link"
payload := strings.NewReader("{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"SurveyCompleteLink\": \"https://www.supplier.com?pid=8629795&rid=[%rid%]\",\n \"SurveyTermLink\": \"http://www.supplierredirect.com/term?rid=[%rid%]\",\n \"SecurityFraudTermLink\": \"http://www.supplierredirect.com/security?rid=[%rid%]\",\n \"SurveyOverquotaLink\": \"http://www.supplierredirect.com/overquota?rid=[%rid%]\"\n}"
response = http.request(request)
puts response.read_body{
"Status": 0,
"Message": "Success",
"Data": {
"LiveLinkUD": "d026d369-b370-4ffa-8177-c75cf46026f7",
"LiveLinkURL": "https://www-staging.researchdesk.com/landing2?fttsn=d026d369-b370-4ffa-8177-c75cf46026f7&rid=[%RID%]",
"TestLinkUD": "c4648ac7-9cff-4702-acab-bb244aef78ae",
"TestLinkURL": "https://www-staging.researchdesk.com/landing2?fttsn=c4648ac7-9cff-4702-acab-bb244aef78ae&rid=[%RID%]"
}
}