Overview
The PREDUPE API checks whether a respondent has already attempted surveys on a destination platform. You send the destination platform and the survey numbers to check, and the response reports, per survey, whether a duplicate was found. This guide shows how to send the request from the browser withPOST, passing the parameters as a JSON body.
Like the Activity API, PREDUPE is authorized with an authorization key that you send in the x-api-key header. It runs on search.resdefio.com.
Use
POST from the browser. Browsers do not send a request body with GET.Authentication
Send your authorization key in thex-api-key header of every request.
string
required
Your Research Defender authorization key.
Endpoint
string
POST https://{environment}.search.resdefio.com/predupes
In the sample, set
ENVIRONMENT to "prod" or "stage".
Request body
Send the parameters as a JSON object.array
required
The destination platforms to check. Each entry has a
Platform_Id and its Survey_Numbers.string
required
The destination key for the client to check the traffic with. Find it with the DESTINATION_PLATFORM lookup.
array
required
One or more survey numbers on that platform. A request supports 30 survey numbers in total; beyond that, entries are processed randomly.
string
The respondent’s session ID. Optional.
string
The panel ID. Optional.
string
The respondent’s hashed email address. Optional.
string
The supplier ID, for reporting only. Optional.
Sending more parameters
The sample sendsDestination and Session_Id. To send Panel_Id, Hashed_Email, or Supplier_Id, add them to the object in buildPayload(). A request body with every parameter looks like this:
Response
Each survey inDestination[].Surveys has a Flag (1 if a duplicate was found, 0 if not), Duplicate_Initial_UD, Survey_Number, Duplicate_Score (0 or 100), and Duplicate_Potential (low or high). The response also has a top-level Threat_Potential_Score. See PREDUPE for the field definitions.
Example
- JavaScript
- cURL
predupe-post.js
buildPayload(), which leaves out empty optional values. checkPredupes() sends the request with the Content-Type and x-api-key headers and shows the API’s message if the request fails.
Full HTML page
If you want a complete page you can open in a browser, use the sample below. Replace the placeholder values at the top of the script.Predupe integration with POST (HTML)
Predupe integration with POST (HTML)
predupe-post-integration.html
