Duplicate Checks API

This API is used to determine if a respondent is likely to be rejected from a number of survey because of our deduplication criteria.

Command

"livealert/duplicateChecks/1"



Inputs

The following values are expected in the JSON body:

Name Type Required Description
command String

Must be "livealert/duplicateChecks/1"

rfg_ids JSON

Array of project identifiers.

fingerprint String

The code to compute the fingerprint is available at https://hosting.researchforgood.com/js/df-fp.js
The fingerprint is computed using the following JavaScript:

function processDataForceFingerprint(fingerprint) {
        console.log("Please implement me!, fingerprint = " + fingerprint);
    }
    getDataForceFingerprint(processDataForceFingerprint);

If you are not able to generate the fingerprint, you can send fingerprint:0. In such cases, the rid value becomes mandatory. We will use the fingerprint value we have stored in our system for that respondent in order to determine if the respondent is likely to be ruled out because of deduplication. If the respondent has not started a session with us yet, then we will only consider the IP value. Please note that this is not the preferred option: if you are able to run javascript and generate a fingerprint, you should send the fingerprint value to us. Only use this workaround if you cannot run javascript on your site / app.print value to us. Only use this workaround if you cannot run javascript on your site / app.

ip String

IP of the respondent

rid String

Unique identifier for the respondent.

This value is mandatory when you send fingerprint:0. Please refer to the fingeprint description for more detail.


Outputs

Name Type Description
projects Date[]

JSON array of project objects where each entry includes:

Key Value
rfg_id The identifier of the project.
fingerprint Fingerprint of the respondent
ip IP of the respondent
isDuplicate True if the panelist will be rejected because of deduplication, false if it is not likely that the panelist will be rejected because of duplication.

Example Command

{
  "command": "livealert/duplicateChecks/1",
  "ip": "187.143.121.111",
  "fingerprint" : "c042ac342900efdfceee4a2edb549f5c",
  "rfg_ids": ["RFG546593-004", "RFG293028-002"]
}

Example Response

"response" : { 
    projects : {
        "rfg_id" : "RFG10016-005", 
        "fingerprint" : "c042ac342900efdfceee4a2edb549f5c", 
        "ip" : "166.78.136.138" , 
        "isDuplicate" : false
    },
    {
        "rfg_id" : "RFG10024-002", 
        "fingerprint" : "c042ac342900efdfceee4a2edb549f5c", 
        "ip" : "166.78.136.138" , 
        "isDuplicate" : true
    },
    {
        "rfg_id" : "RFG10054-003", 
        "fingerprint" : "c042ac342900efdfceee4a2edb549f5c", 
        "ip" : "166.78.136.138" , 
        "isDuplicate" : false
    },
    ...
}