Responses
Update Response
PATCH
/
responses
Responses
curl --request PATCH \
--url https://demand.researchdesk.com/responses \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"rdud": "bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68",
"survey_id": "a627c685-5163-4ede-9b99-9eecf6d7788b",
"reconciliation_status": "Rejected"
}
'import requests
url = "https://demand.researchdesk.com/responses"
payload = {
"rdud": "bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68",
"survey_id": "a627c685-5163-4ede-9b99-9eecf6d7788b",
"reconciliation_status": "Rejected"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rdud: 'bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68',
survey_id: 'a627c685-5163-4ede-9b99-9eecf6d7788b',
reconciliation_status: 'Rejected'
})
};
fetch('https://demand.researchdesk.com/responses', 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://demand.researchdesk.com/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'rdud' => 'bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68',
'survey_id' => 'a627c685-5163-4ede-9b99-9eecf6d7788b',
'reconciliation_status' => 'Rejected'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://demand.researchdesk.com/responses"
payload := strings.NewReader("{\n \"rdud\": \"bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68\",\n \"survey_id\": \"a627c685-5163-4ede-9b99-9eecf6d7788b\",\n \"reconciliation_status\": \"Rejected\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.patch("https://demand.researchdesk.com/responses")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rdud\": \"bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68\",\n \"survey_id\": \"a627c685-5163-4ede-9b99-9eecf6d7788b\",\n \"reconciliation_status\": \"Rejected\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demand.researchdesk.com/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rdud\": \"bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68\",\n \"survey_id\": \"a627c685-5163-4ede-9b99-9eecf6d7788b\",\n \"reconciliation_status\": \"Rejected\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"rdud": "bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68",
"survey_id": "28ce00a5-adb9-4312-acb0-3be6b05489e9",
"reconciliation_status": "Accepted"
}
}Used for reconciliation.
Rate limit: 6000 requests/minute
Note: The
GET method returns a list of objects, PATCH accepts and returns a single object
Query String Parameters (GET)
| Name | Description | Required | Example |
|---|---|---|---|
survey_id | The ID of a survey | Yes | ?id=1 |
rduds | Comma delimited value of the Response IDs being retrieved | No | ?rduds=1,2,3 |
statuses | Comma delimited value of the URL-encoded statuses associated with the Responses being retrieved. | No | ?statuses=complete,security termination |
page | Integer value of the page being retrieved | No; if omitted, the value defaults to 1 | ?page=2 |
page_size | Integer value dictating the number of objects returned per page. | No; if omitted, the value defaults to 50 | ?page_size=100 |
Response Object Definition
| Parameter | Required on PATCH | Description |
|---|---|---|
rdud | Yes | The ID of the associated Response object. |
status | System Assigned | The status associated with the Response object. |
reconciliation_status | Yes Note: Can only be Accepted or Rejected | The reconciliation status of a Response object. |
buyer_cpi | System Assigned | The price this respondent cost if it was complete. |
qualification_attributes | System Assigned | What qualification(s) the respondent had. |
quota_attributes | System Assigned | Which quota(s) the respondent fell under. |
Authorizations
Authentication token to be sent directly in the Authorization header (no '' prefix).
Body
application/json
Response
200 - application/json
Responses
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Responses
curl --request PATCH \
--url https://demand.researchdesk.com/responses \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"rdud": "bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68",
"survey_id": "a627c685-5163-4ede-9b99-9eecf6d7788b",
"reconciliation_status": "Rejected"
}
'import requests
url = "https://demand.researchdesk.com/responses"
payload = {
"rdud": "bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68",
"survey_id": "a627c685-5163-4ede-9b99-9eecf6d7788b",
"reconciliation_status": "Rejected"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rdud: 'bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68',
survey_id: 'a627c685-5163-4ede-9b99-9eecf6d7788b',
reconciliation_status: 'Rejected'
})
};
fetch('https://demand.researchdesk.com/responses', 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://demand.researchdesk.com/responses",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'rdud' => 'bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68',
'survey_id' => 'a627c685-5163-4ede-9b99-9eecf6d7788b',
'reconciliation_status' => 'Rejected'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://demand.researchdesk.com/responses"
payload := strings.NewReader("{\n \"rdud\": \"bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68\",\n \"survey_id\": \"a627c685-5163-4ede-9b99-9eecf6d7788b\",\n \"reconciliation_status\": \"Rejected\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.patch("https://demand.researchdesk.com/responses")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rdud\": \"bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68\",\n \"survey_id\": \"a627c685-5163-4ede-9b99-9eecf6d7788b\",\n \"reconciliation_status\": \"Rejected\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demand.researchdesk.com/responses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rdud\": \"bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68\",\n \"survey_id\": \"a627c685-5163-4ede-9b99-9eecf6d7788b\",\n \"reconciliation_status\": \"Rejected\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"rdud": "bb6e6bcf-ff27-4d2e-a6ed-f4e8d9169b68",
"survey_id": "28ce00a5-adb9-4312-acb0-3be6b05489e9",
"reconciliation_status": "Accepted"
}
}