The IPQS Postback API allows you to alter previous Device Fingerprint API requests to our API based on new or additional data to receive a new fraud score. This API also supports conversion tracking and allows for the conversion status to be updated.
You can make requests to this API via POST or GET. Parameters passed to the API wrapped as an update[] array will update the original request. The API will use any parameters outside of the update[] array to look up the request.
While we recommend using the original request_id for all postback requests, we understand that not every caller can store the ID for each request. As a result, the API allows you to use custom variables instead. For the postback update to succeed, you must establish any custom tracking variables in your account settings before passing them with your initial request.
Below is the base postback URL:
JSON
XML
Suppose you are storing limited data upon the initial check with Startup.AfterResult(), such as the request_id, or would like to re-score a user based on changes you have made to your Custom Scoring Weights. In that case, you can retrieve updated data using the following example.
Replace YOUR_REQUEST_ID with the request_id of the request to retrieve:
Alternatively, suppose you didn't know the request_id and did not capture any data with Startup.AfterResult(), but you knew that the request used Startup.Store() to associate the lookup with userID = 99. You can retrieve this data by setting type to the correct tool and appending the userID. This approach supports any variables on your account's Custom Tracking Variables. It will always return the most recent request data that matches the search parameters.
Using the Startup.AfterResult() format before including the Device Fingerprinting script tag on your site will result in errors and failure of your function to fire. You can call Startup.AfterResult() multiple times while passing several different functions to it. Our library will execute each of them in the order passed.
Postback API requests do not consume an additional credit.
The result variable is an array. The keys and expected values are listed below.
Using the request_id to update the transactionID
Assume a request had a request_id of DWwJ and you wanted to update the transactionID associated with that request to be 100. You would make the following request to the API:
Using custom variables to update the transactionID
Assume you wanted to update the transactionID associated with a request to be 100, but you don't know the request_id of that request. You can instead look up the request using a custom variable.
Note: When using custom variables, the type variable is required. See the additional request parameters table below for accepted values. |
Parameter Name | Description | Expected Values | Update Example |
ConversionStatus | Allows you to flag a request as having lead to a conversion. | Boolean, string true or string false | update[ConversionStatus]=true |
ConversionDate | Allows you to set a date the request was made a conversion. | Date formatted yyyy-mm-dd or yyyy-mm-dd hh-mm-ss | update[ConversionDate]=2017-01-01 |
ClickDate | Allows you to alter the first seen date on a device. | Date formatted yyyy-mm-dd or yyyy-mm-dd hh-mm-ss | update[ClickDate]=2017-01-01 |
user_agent | Updates the user agent string. | String | update[user_agent]=Lynx/2.8.7dev.9%20libwww-FM/2.14 |
language | Updates the user's browser chosen language. | String | update[language]=en-US |
request_id | A unique ID is provided for each request. This can be used for lookups. | String | request_id=DWwJ |
type | Required for request lookups when you don't provide a "request_id". Fetches a request of this type. | String ("proxy", "email", "devicetracker", or "mobiletracker") | type=devicetracker |
tracker_id | This is an optional parameter used to narrow the scope of a variable lookup for a device tracker postback. | Integer (number associated with your tracker in the IPQS device tracker management screen.) | tracker_id=233 |
newest | Defaults to false. When true chooses the most recent request if there is more than one request with your specified parameters. | Boolean (true/false) | newest=true |