Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The Fraud API is a service which allows subscribers to request Pixalate's servers to retrieve the probability (risk score) and determine if a user's IP, DeviceID or User-Agent is compromised or performing malicious activity. Any fields included in the response, but not documented herein are subject to change without notice.
Base URLs:
Email: Pixalate, Inc. Web: Pixalate, Inc.
Code samples
# You can also use wget
curl -X GET https://fraud-api.pixalate.com/api/v2/fraud \
-H 'Accept: application/json' \
-H 'x-api-key: API_KEY'
GET /fraud
Retrieve probability of fraud for a specific IP, Device, or Agent. The Fraud Blocking API returns a probability (risk score) 0.01 to 1.0 representing the likelihood a given value is related to malicious or compromised devices. This risk scoring is calculated by Pixalate’s proprietary machine-learning algorithm and allows clients to set their own blocking thresholds based on the quality and scale of their supply inventory. The following is a general guideline for setting fraud blocking thresholds:
Pixalate does not recommend blocking any probabilities less than 0.5. When making adjustments to the probability threshold, Pixalate highly recommends regular checks and balances against impression delivery as lowering the probabilistic threshold can potentially impact the impression count.
Zero or more of the following parameters may be provided. If more than one parameter is specified, the probability returned is determined by assessing risk based on the combination of each parameter’s individual risk probability.
Not specifying an IP, Device, or Agent will return the metadata for fraud, including the user's current quota. See alternate response schema below.
Name | In | Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pretty | query | boolean | false | If true, return pretty JSON. Default is false. | ||||||||||||||||||||||||||||||||||||||||
ip | query | string | false | The internet protocol address. | ||||||||||||||||||||||||||||||||||||||||
deviceId | query | string | false | An ID that characterizes a mobile device. This is the actual mobile identifier. Various types are acceptable as follows:
| ||||||||||||||||||||||||||||||||||||||||
userAgent | query | string | false | The browser or device supplied agent string. |
Example responses
200 Response
{
"probability": 0.6
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request - Invalid parameters in request. | None |
401 | Unauthorized | Unauthorized - Invalid API Key. | None |
403 | Forbidden | Forbidden - Rate plan expired or quota has been exhausted. | None |
5XX | Unknown | Server Error - The API experienced an internal error. Contact support. | None |
Property | Value |
---|---|
timeUnit | minute |
timeUnit | hour |
timeUnit | day |
timeUnit | week |
timeUnit | month |
{
"database": {
"lastUpdated": "2022-04-30"
},
"quota": {
"available": 480,
"used": 520,
"expiry": "2022-05-01T12:45:23.234Z",
"limit": 1000,
"interval": 1000,
"timeUnit": "month"
}
}
Fraud metadata information.
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
database | object | false | none | The Fraud database state information. |
» lastUpdated | string(date) | false | none | The date when the Fraud database was last updated. The date format is YYYY-MM-DD. |
quota | object | false | none | Quota state information. |
» available | integer | false | none | The amount of quota available for use. |
» used | integer | false | none | The amount of quota used. |
» expiry | string(date) | false | none | The datetime when the quota will be refreshed back to the limit. The datetime format is YYYY-MM-DDTHH:MM:SS.SSSZ. |
» limit | integer | false | none | The amount of quota to be made available for use when the quota is refreshed. |
» interval | integer | false | none | The number of time units used in calculating the quota refresh datetime. |
» timeUnit | string | false | none | The time unit used in calculating the quota refresh datetime. |
Property | Value |
---|---|
timeUnit | minute |
timeUnit | hour |
timeUnit | day |
timeUnit | week |
timeUnit | month |
{
"probability": 0.6
}
Fraud information
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
probability | number | false | none | The probability of fraud (0.1 through 1.0). 0.0 indicates unknown. |