Overview
The Activation API switches the SEARCH duplicate check off or on for the traffic you specify. This guide shows how to send the request withPOST, passing the parameters as a JSON body. Only Type is required.
Like the Activity API, the Activation API runs on resdefio.com and is authorized with an authorization key that you send in the x-api-key header. See ACTIVATION for how the values combine and when a change takes effect.
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}.resdefio.com/activation
In the sample, set
ENVIRONMENT to "prod" or "stage".
Request body
Send the parameters as a JSON object. Separate several values in one parameter with commas.string
required
1 deactivates the matching traffic from the duplicate check. 2 activates it.string
The API the change applies to.
search (SEARCH API) is the default.string
Survey numbers, separated by commas. For example
"111,222,333".string
Session IDs. Optional.
string
IP address. Optional.
string
Cookie value. Optional.
string
Panel ID. Optional.
string
Hashed email address. Optional.
string
User agent. Optional.
When you send more than one parameter, the values are combined and a record must match all of them. A request processes at most 500 combined records. To check values independently, send them in separate requests. See How the values combine.
Sending more parameters
The sample sendsRoute, Type, and Survey_Number. To match on sessions or other values, set them at the top of the script and add them to the object in buildPayload(). For example, this body deactivates three sessions on any survey:
Response
Action reports what was done, and Message reports how many records were processed.
Example
- JavaScript
- cURL
activation-post.js
buildPayload(), which leaves out empty values. setActivation() 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.Activation integration with POST (HTML)
Activation integration with POST (HTML)
activation-post-integration.html
